]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - hook-examples/pre-revprop-change_example.bat
Fix typo in comment
[svn2svn.git] / hook-examples / pre-revprop-change_example.bat
1 @echo off
2 setlocal
3
4 set REPOS=%~1
5 set REV=%~2
6 set USER=%~3
7 set PROPNAME=%~4
8 set ACTION=%~5
9
10 rem Print out some debug info
11 echo pre-revprop-change: REPOS=%REPOS% REV=%REV% USER=%USER% PROPNAME=%PROPNAME% ACTION=%ACTION% >&2
12
13 rem Allow modifying certain properties
14 if "%PROPNAME%" == "svn:author" goto ALLOW
15 if "%PROPNAME%" == "svn:date" goto ALLOW
16
17 rem Reject everyting else
18 goto DENY
19
20 :DENY
21 echo Not allowed to change %PROPNAME% >&2
22 endlocal
23 @echo on
24 exit 1
25
26 :ALLOW
27 endlocal
28 @echo on
29 exit 0