3
votes

I'm using trac v1 (which includes the Git plugin) on linux to trac multiple git repositories within the same trac installation. When I add a new repository to this trac installation it tells me:

"You should also set up a post-commit hook on the repository to call trac-admin $ENV changeset added "kontrolla-sample" $REV for each committed changeset."

Can someone show an example of how the post-commit file should be edited to achieve this?

1

1 Answers

4
votes

See http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync for examples and details about what is needed from a post-commit hook script (or more accurately, post-receive for git). Essentially, the script needs to call trac-admin /your/trac/path/here changeset added "(default)" <revision>. If the commit is to a repository other than the default repo, change (default) to the name of the repository.