Thursday, April 15, 2010

Subversion: making tags not modified if added once.

REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook

$SVNLOOK changed -t "$TXN" "$REPOS" | grep "^A\W.*\/tags\/[^\/][^\/]*\/..*" && /bin/echo "ADD: Cannot commit to tags!" 1>&2 && exit 1

$SVNLOOK changed -t "$TXN" "$REPOS" | grep "^U\W.*\/tags\/" && /bin/echo "UPDATE: Cannot commit to tags!" 1>&2 && exit 1

$SVNLOOK changed -t "$TXN" "$REPOS" | grep "^D\W.*\/tags\/" && /bin/echo "DELETE: Cannot commit to tags!" 1>&2 && exit 1

No comments:

Post a Comment