diff options
author | Michael Scherer <misc@mageia.org> | 2010-11-19 00:46:14 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-11-19 00:46:14 +0000 |
commit | 21785e5487d97f6ea61cdfc8ea91c2cce682c1df (patch) | |
tree | 1d645cbdae10e72f85013f0798be6a4daa8f6c5d /modules/subversion/templates | |
parent | 50830d1e9be5e6a6cefcbe48e63dd7c8dd9defce (diff) | |
download | puppet-21785e5487d97f6ea61cdfc8ea91c2cce682c1df.tar puppet-21785e5487d97f6ea61cdfc8ea91c2cce682c1df.tar.gz puppet-21785e5487d97f6ea61cdfc8ea91c2cce682c1df.tar.bz2 puppet-21785e5487d97f6ea61cdfc8ea91c2cce682c1df.tar.xz puppet-21785e5487d97f6ea61cdfc8ea91c2cce682c1df.zip |
add check for root and empty commit
Diffstat (limited to 'modules/subversion/templates')
-rw-r--r-- | modules/subversion/templates/no_empty_message | 12 | ||||
-rw-r--r-- | modules/subversion/templates/no_root_commit | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/modules/subversion/templates/no_empty_message b/modules/subversion/templates/no_empty_message new file mode 100644 index 00000000..96d184d9 --- /dev/null +++ b/modules/subversion/templates/no_empty_message @@ -0,0 +1,12 @@ +#!/bin/sh + +REP="$1" +TXN="$2" + +LOG=$(svnlook log -t "$TXN" "$REP") + +if ! echo "$LOG" | grep -qv '^$'; then + echo "no empty commit message allowed" >&2 + exit 1 +fi + diff --git a/modules/subversion/templates/no_root_commit b/modules/subversion/templates/no_root_commit new file mode 100644 index 00000000..5dab449f --- /dev/null +++ b/modules/subversion/templates/no_root_commit @@ -0,0 +1,12 @@ +#!/bin/sh + +REP="$1" +TXN="$2" + +author=$(svnlook author -t "$TXN" "$REP") + +if [ "$author" == 'root' ]; then + echo "no root commit allowed" >&2 + exit 1 +fi + |