Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- REPOS="$1"
- TXN="$2"
- # Make sure that the log message contains some text.
- SVNLOOK=/usr/bin/svnlook
- $SVNLOOK log -t "$TXN" "$REPOS" | \
- grep -E "\b^(T\: [0-9]*|Proj|C|S)\: .*$\b" > /dev/null ||
- echo "#######################################################################" >&2
- echo "You need to include a valid commit message, choose one of the following" >&2
- echo "Tickets:" >&2
- echo "T: <ticket #>: <description of commit/change/task >" >&2
- echo "Example: T: 12092: Changed CSS of item text to green" >&2
- echo "-----------------------------------------------------------------------" >&2
- echo "Projects:" >&2
- echo "Proj: <Project Name>: <description of commit/change/task>" >&2
- echo "Example: Proj: Toys: Block spiders from IDP" >&2
- echo "-----------------------------------------------------------------------" >&2
- echo "Creative:" >&2
- echo "C: <Message>" >&2
- echo "Example: C: Added gateway page" >&2
- echo "-----------------------------------------------------------------------" >&2
- echo "SEO:" >&2
- echo "S: <Message>" >&2
- echo "Example: S: Added URL Rewrite" >&2
- echo "#######################################################################" >&2
- exit 1
- # Check that the author of this commit has the rights to perform
- # the commit on the files and directories being modified.
- commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
- # All checks passed, so allow the commit.
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement