[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Pre-commit

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-09-21 21:28:25 CEST

Pre-Commit hooks are now working.

I thought I would post this here to see if anyone is in favour:

--- /dev/null Tue Jul 3 15:21:52 2001
+++ /home/kevin/projects/svn-test/greek-repo/hooks/pre-commit Fri Sep 21 09:30:18 2001
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# pre-commit: A simple script which exits with an error if the log message
+# does not contain an alphanumeric character.
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] TXN-NAME (the name of the txn about to be committed)
+#
+SVNLOOK=/usr/local/svn/bin/svnlook
+LOG=`${SVNLOOK} ${1} txn ${2} log`
+echo ${LOG} | grep "[a-zA-Z0-9]" > /dev/null || exit 1
+exit 0

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.