Subversion POST-COMMIT hook script parameters

PATH

A path to a temporary file which contains all the paths for which the operation was started. Each path is on a separate line in the temp file.

DEPTH

The depth with which the commit/update is done.

Possible values are:

-2

svn_depth_unknown

-1

svn_depth_exclude

0

svn_depth_empty

1

svn_depth_files

2

svn_depth_immediates

3

svn_depth_infinity

MESSAGEFILE

Path to a file containing the log message for the commit. The file contains the text in UTF-8 encoding. After successful execution of the start-commit hook, the log message is read back, giving the hook a chance to modify it.

REVISION

The repository revision to which the update should be done or after a commit completes.

ERROR

Path to a file containing the error message. If there was no error, the file will be empty.

CWD

The current working directory with which the script is run. This is set to the common root directory of all affected paths.

Note that although we have given these parameters names for convenience, you do not have to refer to those names in the hook settings. All parameters listed for a particular hook are always passed, whether you want them or not ;-)

If you want the Subversion operation to hold off until the hook has completed, check Wait for the script to finish.

Normally you will want to hide ugly DOS boxes when the script runs, so Hide the script while running is checked by default.

Sample client hook scripts can be found in the contrib folder in the TortoiseSVN repository . (Section 3, “TortoiseSVN is free!” explains how to access the repository).

Published 10-21-2009 14:17 by peterw