Index: svnadmin/hooks/scripts/detect-filename.sh =================================================================== --- svnadmin/hooks/scripts/detect-filename.sh (revision 455192) +++ svnadmin/hooks/scripts/detect-filename.sh (revision 455193) @@ -1,42 +1,45 @@ #!/bin/sh # pre-commit hook to detect files containing not allowed characters # $FreeBSD$ REPO=$1 TXN=$2 SVNLOOK=/usr/local/bin/svnlook # Check arguments if [ -z "$REPO" -o -z "$TXN" ]; then echo "Syntax: $0 path_to_repos txn_id" >&2 exit 1 fi # Approved by portmgr gets a free pass $SVNLOOK log -t "$TXN" "$REPO" | grep -q 'portmgr' && exit 0 +# Look for python ports. +if $SVNLOOK changed -t "$TXN" "$REPO" | grep -q -E '^.*/py-'; then + echo "Temorary ban on committing to py- ports while the final touch to" >&2 + echo "the Python FLAVORS is being worked on and tested." >&2 + exit 1 +fi + # Look for new py3 ports if $SVNLOOK changed -t "$TXN" "$REPO" | grep -q -E '^A.*/py3'; then - echo "Please do not add new py3 slave ports at this time. FLAVORS" >&2 - echo "support is coming soon which will remove the need for these kind of" >&2 - echo "slave ports. Having new ones come in slows down development for" >&2 - echo "FLAVORS support." >&2 - echo "It also confuses users if a new slave is added and then is" >&2 - echo "suddenly gone in a few weeks due to FLAVORS replacing it." >&2 + echo "Adding new py3- ports is forbidden." >&2 + echo "The Python ports have flavors and do not need the py3- ports." >&2 exit 1 fi # We scan through the transaction diff, looking for files with colon in the name if $SVNLOOK changed -t "$TXN" "$REPO" | grep -q -E '^A.*[:@]'; then echo "Some files in your commit have a colon (:) or (@) in the name" >&2 echo "which is not allowed. Use _ instead for patches." >&2 echo "Or even better, generate your patches with make makepatch." >&2 echo "For further information please read:" >&2 echo "http://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html" >&2 echo "Please fix this and try committing again." >&2 exit 1 fi # No files with invalid chars were detected exit 0