Edgewall Software

Changes between Version 14 and Version 15 of 1.3/TracRepositoryAdmin


Ignore:
Timestamp:
Sep 28, 2017, 6:20:47 AM (7 years ago)
Author:
Ryan J Ollos
Comment:

Mention that variables can be exported from the caller hook.

Legend:

Unmodified
Added
Removed
Modified
  • 1.3/TracRepositoryAdmin

    v14 v15  
    136136In a Unix environment, the simplest way to configure explicit synchronization is by using the [trac:source:trunk/contrib/trac-svn-hook contrib/trac-svn-hook] script. `trac-svn-hook` starts `trac-admin` asynchronously to avoid slowing the commit and log editing operations. The script comes with a number of safety checks and usage advice. Output is written to a log file with prefix `svn-hooks-` in the environment `log` directory, which can make configuration issues easier to debug.
    137137
     138There's no equivalent `trac-svn-hook.bat` for Windows yet, but the script can be run by Cygwin's bash. The documentation header of `trac-svn-hook` contains a Cygwin configuration example.
     139
    138140Follow the help in the documentation header of the script to configure `trac-svn-hook`. You'll need to minimally set the `TRAC_ENV` variable, and may also need to set `TRAC_PATH` and `TRAC_LD_LIBRARY_PATH` for a non-standard installation or a virtual environment.
    139141
    140 There's no equivalent `trac-svn-hook.bat` for Windows yet, but the script can be run by Cygwin's bash. The documentation header of `trac-svn-hook` contains a Cygwin configuration example.
    141 
    142 Configuring the hook environment variables is even easier in Subversion 1.8 and later using the [http://svnbook.red-bean.com/en/1.8/svn.reposadmin.create.html#svn.reposadmin.hooks.configuration hook script environment] configuration. Rather than directly editing `trac-svn-hook` to set the environment variables, they can be configured through the repository `conf/hooks-env` file.
     142Configuring the hook environment variables is even easier in Subversion 1.8 and later using the [http://svnbook.red-bean.com/en/1.8/svn.reposadmin.create.html#svn.reposadmin.hooks.configuration hook script environment] configuration. Rather than directly editing `trac-svn-hook` to set the environment variables, or exporting them from the hook that invokes `trac-svn-hook`, they can be configured through the repository `conf/hooks-env` file.
    143143
    144144Here is an example, using a Python virtual environment at `/usr/local/venv`: