SVN と Trac が実行されているサーバーから変更をコミットすると、コミット後のフックが正常に機能します。しかし、Mac からリモートでコミットすると、アクティビティは Trac のタイムラインに表示されますが、チケットは更新されません。
コマンドラインからだけでなく、Netbeans 7 でもこれを試しましたが、結果は同じでした。パスワードは異なりますが、サーバーと Mac の両方で同じユーザー名でログインしています。数日前まで、何ヶ月もの間、すべてが正常に機能していたので、これは問題ではないことはわかっています。
この機能を壊すために、私の Mac またはサーバーで何が変更されたのかはわかりません。
2011 年 7 月 26 日に追加された詳細情報:
Mac では svn+ssh:// を使用しており、サーバーでは file:/// を使用しています。
Trac のログ レベルを DEBUG に設定していますが、何を探すべきかよくわかりません。
コミット後のスクリプトを以下に示します。QA アップデートと Campfire ポストの両方が機能するため、ポストコミット自体が機能していることはわかっていることに注意してください。また、$TRAC_ENV、$REPOS、および $REV をファイルに出力しようとしましたが、すべての変数が適切に設定されています。
#!/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" commit-watchers@example.org
#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