svn commit: r339925 - svnadmin/hooks/scripts
Baptiste Daroussin
bapt at FreeBSD.org
Thu Jan 16 15:57:36 UTC 2014
Author: bapt
Date: Thu Jan 16 15:57:36 2014
New Revision: 339925
URL: http://svnweb.freebsd.org/changeset/ports/339925
QAT: https://qat.redports.org/buildarchive/r339925/
Log:
Add a new hook to forbid adding not staged new port
Will be extended later to forbid committing to a non-staged ports without staging at the same time. But we are not there yet
Added:
svnadmin/hooks/scripts/stage-only.sh (contents, props changed)
Added: svnadmin/hooks/scripts/stage-only.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ svnadmin/hooks/scripts/stage-only.sh Thu Jan 16 15:57:36 2014 (r339925)
@@ -0,0 +1,26 @@
+#!/bin/sh
+# $FreeBSD$
+
+REPO=$1
+TXN=$2
+
+OIFS=${IFS}
+IFS=$'\n'
+# svnlook log -r "${TXN}" "${REPO}" | grep -q portmgr && exit 0
+for line in $(svnlook changed -t $TXN $REPO) ; do
+ IFS=${OIFS}
+ set -- $line
+ type=$1
+ fpath=$2
+ case $type in
+ [^A]*) continue;;
+ esac
+ case $fpath in
+ /head/*/*/Makefile*)
+ if svnlook cat -t ${TXN} ${REPO} $fpath | grep -q "^NO_STAGE" ; then
+ echo "Do not commit new ports with NO_STAGE"
+ exit 1
+ fi
+ ;;
+ esac
+done
More information about the svn-ports-svnadmin
mailing list