0

I am searching for a solution how to edit the svn pre-commit hook for checking the commit message for a certain package.

Normally, the commit message only contains the ticket number #123456

Now I want to check, if the commit message starts with that ticket number is maybe followed by some comments e.g. #123456 ticket partly done.

Do you know, if there is something like a pattern in the pre-commit to check this?

Thanks in advance

Vamiris
  • 91
  • 1
  • 10

1 Answers1

0

Pipe output of snvlook log to old good grep

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • You mean like this? ```REPOS="$1" TXN="$2" SVNLOOK=/usr/bin/svnlook ICONV=/usr/bin/iconv SVNLOOKOK=1 $SVNLOOK log -t "$TXN" "$REPOS" | \ grep "^#[123456789]\+.\=" > /dev/null || SVNLOOKOK=0 if [ $SVNLOOKOK = 0 ]; then echo "Something wrong" >&2 exit 1 fi set -e exit 0 ``` – Vamiris Nov 09 '15 at 13:49
  • Ok checked the regex, when I use ... $SVNLOOK log -t "$TXN" "$REPOS" | \ grep "[#][123456789]+" > /dev/null || SVNLOOKOK=0 ... with the message " #123 test description" , it does not work – Vamiris Nov 09 '15 at 14:11