# Changes between Version 8 and Version 9 of TracRepositoryAdmin

Ignore:
Timestamp:
Aug 3, 2010, 2:10:41 AM (10 years ago)
Comment:

Added a note about using sudo.

### Legend:

Unmodified
 v8 The following examples are complete post-commit and post-revprop-change scripts for Subversion. They should be edited for the specific environment, marked executable (where applicable) and placed in the hooks directory of each repository. On Unix (post-commit): {{{ #!sh {{{#!sh #!/bin/sh export PYTHON_EGG_CACHE="/path/to/dir" }}} On Windows (post-commit.cmd): {{{ #!application/x-dos-batch {{{#!application/x-dos-batch @C:\Python26\Scripts\trac-admin.exe C:\path\to\env changeset added "%1" "%2" }}} The post-revprop-change hook for Subversion is very similar. On Unix (post-revprop-change): {{{ #!sh {{{#!sh #!/bin/sh export PYTHON_EGG_CACHE="/path/to/dir" }}} On Windows (post-revprop-change.cmd): {{{ #!application/x-dos-batch {{{#!application/x-dos-batch @C:\Python26\Scripts\trac-admin.exe C:\path\to\env changeset modified "%1" "%2" }}} The Unix variants above assume that the user running the Subversion commit has write access to the Trac environment, which is the case in the standard configuration where both the repository and Trac are served by the web server. If you access the repository through another means, for example svn+ssh://, you may have to run trac-admin with different privileges, for example by using sudo. Note that calling trac-admin in your Subversion hooks can slow down the commit and log editing operations on the client side. You might want to use the [trac:source:trunk/contrib/trac-svn-hook contrib/trac-svn-hook] script which starts trac-admin in an asynchronous way. The script also comes with a number of safety checks and usage advices which should make it easier to set up and test your hooks. There's no equivalent trac-svn-hook.bat for Windows yet, but the script can be run by Cygwin's bash.