Track actual latest revnum (that changed the branch).
[jelmer/subvertpy.git] / pre-revprop-change.example
1 #!/bin/sh
2
3 # This is an example prev-revprop-change hook that 
4 # allows setting bzr revision properties on Subversion 
5 # revisions.
6
7 # This script is only needed if you would like to use 
8 # revision properties rather than file properties and 
9 # is not necessary when the server and client are 
10 # both running Subversion 1.5.
11
12 REPOS="$1"
13 REV="$2"
14 USER="$3"
15 PROPNAME="$4"
16 ACTION="$5"
17
18 if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
19
20 if [ "$ACTION" = "M" -a "$PROPNAME" = "bzr:gpg-signature" ]; then exit 0; fi
21
22 # Allow adding bzr-svn revision properties:
23 if [ "$ACTION" = "A" -a "`echo "$PROPNAME" | cut -d : -f 1`" = "bzr" ]; then exit 0; fi
24
25 echo "Changing revision properties other than svn:log or bzr:* is prohibited" >&2
26 exit 1