Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top