Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.42 KB | None | 0 0
  1. #!/bin/bash
  2. REPOS="$1"
  3. TXN="$2"
  4.  
  5. # Make sure that the log message contains some text.
  6. SVNLOOK=/usr/bin/svnlook
  7. $SVNLOOK log -t "$TXN" "$REPOS" | \
  8.    grep -E "\b^(T\: [0-9]*|Proj|C|S)\: .*$\b" > /dev/null ||
  9. echo "#######################################################################" >&2
  10. echo "You need to include a valid commit message, choose one of the following" >&2
  11. echo "Tickets:" >&2
  12. echo "T: <ticket #>: <description of commit/change/task >" >&2
  13. echo "Example: T: 12092: Changed CSS of item text to green" >&2
  14. echo "-----------------------------------------------------------------------" >&2
  15. echo "Projects:" >&2
  16. echo "Proj: <Project Name>: <description of commit/change/task>" >&2
  17. echo "Example: Proj: Toys: Block spiders from IDP" >&2
  18. echo "-----------------------------------------------------------------------" >&2
  19. echo "Creative:" >&2
  20. echo "C: <Message>" >&2
  21. echo "Example: C: Added gateway page" >&2
  22. echo "-----------------------------------------------------------------------" >&2
  23. echo "SEO:" >&2
  24. echo "S: <Message>" >&2
  25. echo "Example: S: Added URL Rewrite" >&2
  26. echo "#######################################################################" >&2
  27. exit 1
  28.  
  29. # Check that the author of this commit has the rights to perform
  30. # the commit on the files and directories being modified.
  31. commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
  32.  
  33. # All checks passed, so allow the commit.
  34. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement