進入 YourRepository\hooks 目錄,新建檔案「pre-revprop-change.bat」
內容
DOS:
-
#!/bin/sh
-
-
# PRE-REVPROP-CHANGE HOOK
-
#
-
# The pre-revprop-change hook is invoked before a revision property
-
# is added, modified or deleted. Subversion runs this hook by invoking
-
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
-
# arguments:
-
#
-
# [1] REPOS-PATH (the path to this repository)
-
# [2] REVISION (the revision being tweaked)
-
# [3] USER (the username of the person tweaking the property)
-
# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)
-
#
-
# [STDIN] PROPVAL ** the new property value is passed via STDIN.
-
#
-
# If the hook program exits with success, the propchange happens; but
-
# The hook program can use the 'svnlook' utility to examine the
-
# existing value of the revision property.
-
#
-
# will behave as if the hook were present, but failed. The reason
-
# for this is that revision properties are UNVERSIONED, meaning that
-
# a successful propchange is destructive; the old value is gone
-
# forever. We recommend the hook back up the old value somewhere.
-
#
-
# On a Unix system, the normal procedure is to have 'pre-revprop-change'
-
# work itself too.
-
#
-
# Note that 'pre-revprop-change' must be executable by the user(s) who will
-
# invoke it (typically the user httpd runs as), and that user must
-
# have filesystem-level permission to access the repository.
-
#
-
# On a Windows system, you should name the hook program
-
# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
-
# but the basic idea is the same.
-
#
-
# The hook program typically does not inherit the environment of
-
# that subprograms fail to launch unless invoked via absolute path.
-
# If you're having unexpected problems with a hook program, the
-
# culprit may be unusual (or missing) environment variables.
-
#
-
# Here is an example hook script, for a Unix /bin/sh interpreter.
-
# the Subversion repository at
-
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
-
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
-
-
-
# the Subversion repository at
-
# [url]http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/[/url] and
-
# [url]http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/[/url]
-
rem Only allow log messages to be changed.
-
exit 1