0
votes

So I followed the instructions of the great post left here Post Commit Hook with Trac and SVN and the associated posts mentioned for Trac + VisualSVN on windows.

I have set everything up - and when I run the "post-commit.cmd" - I get no errors at all.

My problem is - that Trac does not update tickets after I submit a commit and I cannot figure out why ?

Does anyone have any ideas how I can somehow figure out why its not updating Tickets from the SVN ?

Edit: So I turned Logging on in Trac - and when I run the post-commit.cmd script from the hooks folder i get

Trac[svn_fs] DEBUG: Subversion bindings imported

But no tickets update?

1

1 Answers

1
votes

First question -- the post you reference (not yours), mentions issuing the comment "#1 fixed.", which I think will fail. If you're using that syntax as well, have you tried "Fixed #1.", which is the correct order for the regex which parses comments?

If it's not that simple, I've got no direct experience with the default script -- I use the one associated with the Timing and Estimation plugin -- but, I'd start by swiping some code from the T&E plugin:


logfile = "/var/trac/commithook.log"
LOG = False

if LOG:
    f = open (logfile,"w")
    f.write("Begin Log\n")
    f.close()
    def log (s, *params):
        f = open (logfile,"a")
        f.write(s % params)
        f.write("\n")
        f.close()
else:
    def log (s, *params):
        pass

with appropriate modifications for your environment; then insert some logging.

The only problem I've ever run into was an update to the T&E script which lost case-insensitivity, long ago resolved. That doesn't look like an issue with the base script, though.