svn commit: r431188 - svnadmin/hooks/scripts

Mathieu Arnold mat at FreeBSD.org
Wed Jan 11 15:08:55 UTC 2017


Author: mat
Date: Wed Jan 11 15:08:54 2017
New Revision: 431188
URL: https://svnweb.freebsd.org/changeset/ports/431188

Log:
  Forbid commits to vuln.xml on branches.
  
  Approved by:	feld
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D9105

Modified:
  svnadmin/hooks/scripts/vulnxml-unique.sh

Modified: svnadmin/hooks/scripts/vulnxml-unique.sh
==============================================================================
--- svnadmin/hooks/scripts/vulnxml-unique.sh	Wed Jan 11 15:07:53 2017	(r431187)
+++ svnadmin/hooks/scripts/vulnxml-unique.sh	Wed Jan 11 15:08:54 2017	(r431188)
@@ -28,12 +28,22 @@ for line in $(svnlook changed -t $TXN $R
 		head/security/vuxml/vuln.xml)
 			VULN_XML=1
 			;;
+		branches/*/security/vuxml/vuln.xml)
+			if [ ${type} != 'A' ]; then
+				VULN_XML=2
+			fi
+			;;
 		*)
 			OTHER=1
 			;;
 	esac
 done
 
+if [ $VULN_XML -eq 2 ]; then
+	echo "Commits to security/vuxml/vuln.xml are only allowed on HEAD" 1>&2
+	exit 1
+fi
+
 # yell
 if [ $VULN_XML -gt 0 -a $OTHER -gt 0 ] ; then
 	echo "Commit to security/vuxml/vuln.xml first, and then other files" 1>&2


More information about the svn-ports-svnadmin mailing list