Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2014 15:57:36 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-svnadmin@freebsd.org
Subject:   svn commit: r339925 - svnadmin/hooks/scripts
Message-ID:  <201401161557.s0GFvaRK069607@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401161557.s0GFvaRK069607>