The post-commit hook works fine when I commit changes from the server where SVN and Trac are running. When I commit remotely from my Mac however, the activity shows up in Trac's timeline, but the ticket doesn't get updated.
I've tried this in Netbeans 7 as well as from the command line — same result. I'm logged in with the same username on both server and Mac, although with a different password. I know this shouldn't matter though, because everything had been working fine for months, up until a few days ago.
I'm not sure of what might have changed on my Mac or the server to break this functionality.
Some more info, added 7/26/2011:
On my Mac I'm using svn+ssh://, on the server using file:///
I do have the Trac log level set to DEBUG, but I'm not quite sure what I should be looking for.
My post-commit script appears below. Please note that I know the post-commit itself is working, because the QA update and Campfire post both work. I've also tried outputting $TRAC_ENV, $REPOS, and $REV to a file, and all vars are set properly.
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
<<<more comments, yada, yada>>>
#
# Here is an example hook script, for a Unix /bin/sh interpreter.
# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
REPOS="$1"
REV="$2"
TRAC_ENV=/usr/share/trac/projects/main
#commit-email.pl "$REPOS" "$REV" [email protected]
#log-commit.py --repository "$REPOS" --revision "$REV"
# update the qa working copy
/usr/bin/ruby /usr/local/svn-repo/hooks/scripts/svn-dev-wc-update.rb $REPOS $REV
# send a message to Trac concerning this commit
/usr/bin/trac-admin $TRAC_ENV changeset added $REPOS $REV
# send a message to Campfire's Engineering room
/usr/bin/ruby /usr/local/svn-repo/hooks/scripts/campfire-announce.rb $REPOS $REV
Can you post the contents of your post-commit hook script?
When you commit from the server, how are you accessing the repository? Are you using the
file://syntax for the repository, or are you using the samesvn+ssh://URL that you use when committing remotely? Do you get the same results if you try both of these access methods?Also, try turning Trac's logging options up to the maximum and see if anything useful ends up in the logfile.