aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/templates
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-19 00:46:14 +0000
committerMichael Scherer <misc@mageia.org>2010-11-19 00:46:14 +0000
commit21785e5487d97f6ea61cdfc8ea91c2cce682c1df (patch)
tree1d645cbdae10e72f85013f0798be6a4daa8f6c5d /modules/subversion/templates
parent50830d1e9be5e6a6cefcbe48e63dd7c8dd9defce (diff)
downloadpuppet-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_message12
-rw-r--r--modules/subversion/templates/no_root_commit12
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
+