Index: files/patch-cmd_diff.in =================================================================== --- files/patch-cmd_diff.in (revision 309739) +++ files/patch-cmd_diff.in (working copy) @@ -1,10 +1,11 @@ ---- cmd_diff.in.orig 2009-09-09 21:59:59.000000000 +0200 -+++ cmd_diff.in 2009-10-25 16:28:14.000000000 +0100 -@@ -21,6 +21,7 @@ +--- cmd_diff.in.orig 2009-09-10 04:59:59.000000000 +0900 ++++ cmd_diff.in 2012-12-27 20:13:30.000000000 +0900 +@@ -20,7 +20,7 @@ + Usage: port diff [-h] [-d ] -h - Display this usage summary -d - Select diff generation mode: - CVS - against CVS -+ CVSauto - against CVS, no cvs add/delete required +- CVS - against CVS ++ SVN - against SVN - against Ports tree in - against original port in EOF Index: files/patch-cmd_submit.in =================================================================== --- files/patch-cmd_submit.in (revision 309739) +++ files/patch-cmd_submit.in (working copy) @@ -1,10 +1,11 @@ ---- cmd_submit.in.orig 2009-09-09 20:59:59.000000000 +0100 -+++ cmd_submit.in 2012-03-04 12:02:36.697273154 +0000 -@@ -26,10 +26,12 @@ +--- cmd_submit.in.orig 2009-09-10 04:59:59.000000000 +0900 ++++ cmd_submit.in 2012-12-31 23:10:59.000000000 +0900 +@@ -25,11 +25,12 @@ + change - changing a port update - updating a port to newer version -d - Select diff generation mode: - CVS - against CVS -+ CVSauto - against CVS, no cvs add/delete required +- CVS - against CVS ++ SVN - against SVN - against Ports tree in - against original port in -s - Set PR's severity to @@ -13,7 +14,7 @@ -c - committer mode: more portlint(1) checks -L - Skip running portlint(1) EOF -@@ -41,9 +43,10 @@ +@@ -41,9 +42,10 @@ PRIORITY="low" COMMITTER="no" RUN_PORTLINT="yes" @@ -25,7 +26,7 @@ if [ $? != 0 ] then echo "Error: invalid arguments" -@@ -116,6 +119,10 @@ +@@ -116,6 +118,10 @@ -L) RUN_PORTLINT="no" ;; @@ -36,13 +37,18 @@ esac shift done -@@ -126,6 +133,15 @@ - [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new" +@@ -123,9 +129,19 @@ + # Determine if this is a new port + if [ "${MODE}" = "" ] + then +- [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new" ++ svn status Makefile 2>&1 1>/dev/null | grep -qs 'svn: warning: W155007:' ++ [ $? -eq 0 ] || [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new" fi +# util_diff will set +# - PORTBASENAME if PORTNAME != port's directory name -+# - DIFF_TYPE to CVS, CVSauto, ports, or suffix ++# - DIFF_TYPE to SVN, ports, or suffix +PORTBASENAME="" +DIFF_TYPE="" + @@ -52,7 +58,7 @@ # Run portlint(1) to validate port's sanity if [ "${RUN_PORTLINT}" = "yes" ] then -@@ -133,10 +149,24 @@ +@@ -133,10 +149,13 @@ FLAGS="-${PORTLINT_FLAGS:-abt}" [ "${COMMITTER}" = "yes" ] && FLAGS="${FLAGS} -c" [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N" @@ -64,22 +70,11 @@ + else + cat ${TEMPROOT}/.portlint.out echo "Error validating port" -+ if [ "$DIFF_MODE" = "CVSauto" ] -+ then -+ grep "^FATAL:" ${TEMPROOT}/.portlint.out > ${TEMPROOT}/.portlint.fatal -+ if ! egrep -qv '^FATAL:[[:space:]]+(file .+ not in CVS|CVS file .+ missing)' ${TEMPROOT}/.portlint.fatal -+ then -+ echo "All fatal portlint errors are CVS errors," -+ echo "consider using portlint without the -c flag or" -+ echo "use 'port submit -L' if all portlint messages are" -+ echo "caused by your intentional addition/deletion of files" -+ fi -+ fi + rm -rf ${TEMPROOT} exit 1 fi else -@@ -146,6 +176,12 @@ +@@ -146,6 +165,12 @@ # Collect information about the port PORTNAME="`make -V PKGNAMEPREFIX``make -V PORTNAME``make -V PKGNAMESUFFIX`" PORTVERSION="`make -V PORTVERSION`" @@ -92,7 +87,7 @@ PKGNAME="`make -V PKGNAME`" CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`" MAINTAINER="`make -V MAINTAINER`" -@@ -155,9 +191,6 @@ +@@ -155,9 +180,6 @@ RELEASE="`uname -srp`" SYSTEM="`uname -a | cut -d ' ' -f 1-12`" @@ -102,7 +97,7 @@ CC="" if [ "${MODE}" = "new" ] then -@@ -194,10 +227,10 @@ +@@ -194,10 +216,10 @@ # Override some parameters if submitting an update to a newer # version of an existing port CLASS="update" @@ -116,7 +111,7 @@ # Check to see if maintainership was requested MAINT_CHANGE="`grep '^[+-]MAINTAINER' ${PATCH} | wc -l`" if [ ${MAINT_CHANGE} -eq 2 ] -@@ -242,7 +275,12 @@ +@@ -242,7 +264,12 @@ fi # Generate Synopsis line @@ -130,7 +125,7 @@ echo "===> Generating PR form" PR_FORM="${TEMPROOT}/PR" -@@ -266,9 +304,10 @@ +@@ -266,9 +293,10 @@ SEND-PR: [ low | medium | high ] >Category: ports SEND-PR: @@ -144,7 +139,7 @@ >Class: ${CLASS} SEND-PR: [ sw-bug | doc-bug | change-request | update | maintainer-update ] >Release: ${RELEASE} -@@ -277,24 +316,33 @@ +@@ -277,25 +305,15 @@ >Description: EOF @@ -156,35 +151,24 @@ else echo -e ${DESCRIPTION} >> ${PR_FORM} -+ MODESTRING="${MODESTRING}, diff: ${DIFF_TYPE}" - # Get list of added/removed files - if [ "${DIFF_MODE}" = "CVS" ] - then - FILES_ADD=`grep --after-context=1 "^--- /dev/null" ${PATCH} | grep "^+++ " | awk '{print $2;}'` - FILES_DEL=`grep --before-context=1 "^+++ /dev/null" ${PATCH} | grep "^--- " | awk '{print $2;}'` -+ elif [ "${DIFF_MODE}" = "CVSauto" ] -+ then -+ FILES_ADD=`sed -n -e '/^diff -uN / { N;N;N;N;s/^diff -uN \(.*\)\.orig \1\n--- \1\.orig [-+:.[:digit:] ]\{19,\}\n+++ \1 [-+:.[:digit:] ]\{19,\}\n@@ [-+,[:digit:] ]\{9,\} @@\n+.*$/\1/p; }' ${PATCH}` -+ FILES_DEL=`sed -n -e '/^diff -uN / { N;N;N;N;s/^diff -uN \(.*\)\.orig \1\n--- \1\.orig [-+:.[:digit:] ]\{19,\}\n+++ \1 [-+:.[:digit:] ]\{19,\}\n@@ [-+,[:digit:] ]\{9,\} @@\n-.*$/\1/p; }' ${PATCH}` - else +- # Get list of added/removed files +- if [ "${DIFF_MODE}" = "CVS" ] +- then +- FILES_ADD=`grep --after-context=1 "^--- /dev/null" ${PATCH} | grep "^+++ " | awk '{print $2;}'` +- FILES_DEL=`grep --before-context=1 "^+++ /dev/null" ${PATCH} | grep "^--- " | awk '{print $2;}'` +- else - TEMP=`mktemp -t porttools` || exit 1 - find -s ${ORIG_DIR} -type f | sed -e "s#${ORIG_DIR}/##" > ${TEMP} - CURR_DIR=`pwd` - FILES_ADD=`find -s ${CURR_DIR} -type f | sed -e "s#${CURR_DIR}/##" | comm -23 - ${TEMP}` - FILES_DEL=`find -s ${CURR_DIR} -type f | sed -e "s#${CURR_DIR}/##" | comm -13 - ${TEMP}` - rm -f ${TEMP} -+ TEMPORIG=`mktemp -t porttools` || exit 1 -+ TEMPNEW=`mktemp -t porttools` || exit 1 -+ CVS_FILTER="egrep -v /CVS/[^/]*$" -+ find -s ${ORIG_DIR} -type f | ${CVS_FILTER} | sed -e "s#^${ORIG_DIR}/##" > ${TEMPORIG} -+ find -s . -type f | ${CVS_FILTER} | sed -e "s#^\./##" > ${TEMPNEW} -+ FILES_ADD=`comm -13 ${TEMPORIG} ${TEMPNEW}` -+ FILES_DEL=`comm -23 ${TEMPORIG} ${TEMPNEW}` -+ rm -f ${TEMPORIG} ${TEMPNEW} - fi +- fi ++ MODESTRING="${MODESTRING}, diff: ${DIFF_TYPE}" if [ -n "${FILES_ADD}" ] -@@ -326,14 +374,14 @@ + then +@@ -326,14 +344,14 @@ cat >> ${PR_FORM} <<- EOF Index: files/patch-port.1 =================================================================== --- files/patch-port.1 (revision 309739) +++ files/patch-port.1 (working copy) @@ -1,16 +1,30 @@ ---- port.1.orig 2009-09-09 20:59:59.000000000 +0100 -+++ port.1 2012-03-04 12:04:12.799204352 +0000 -@@ -125,6 +125,9 @@ +--- port.1.orig 2009-09-10 04:59:59.000000000 +0900 ++++ port.1 2012-12-27 19:26:53.000000000 +0900 +@@ -123,8 +123,8 @@ + .It Fl d Ar mode + select diff generation mode: .Bl -tag -width ".Pa suffix" - .It CVS - diff against CVS repository (default). -+.It CVSauto -+diff against CVS repository, no cvs add/delete required. -+Useful with read-only CVS servers that don't support add/delete. +-.It CVS +-diff against CVS repository (default). ++.It SVN ++diff against SVN repository (default). .It Pa dir diff against original version of the port in the Ports tree with root at .Pa dir -@@ -215,6 +218,8 @@ +@@ -141,10 +141,10 @@ + .Pp + Example: + .Pp +-.Dl % port diff -d CVS ++.Dl % port diff -d SVN + .Pp + This would generate unified diff of modified checked-out working copy +-of the port against local or remote CVS repo. ++of the port against SVN repo. + .It Ar fetch + Fetch one or more distfiles of new or updated port version + and updates checksums. +@@ -215,6 +215,8 @@ .Bl -tag -width ".Fl s Ar severity" .It Fl h display usage summary for this command. @@ -19,7 +33,7 @@ .It Fl m Ar mode Overrides automatic detection of operation mode: .Bl -tag -width update -@@ -245,6 +250,10 @@ +@@ -245,6 +247,10 @@ Skips running .Xr portlint 1 . Using this option will generate a warning and it strongly discouraged. @@ -30,3 +44,12 @@ .El .It Ar test Automates the process of testing a new port (or a port update) +@@ -347,7 +353,7 @@ + for detailed description of the format. + .El + .Sh SEE ALSO +-.Xr cvs 1 , ++.Xr svn 1 , + .Xr cdiff 1 , + .Xr diff 1 , + .Xr more 1 , Index: files/patch-port.in =================================================================== --- files/patch-port.in (revision 0) +++ files/patch-port.in (working copy) @@ -0,0 +1,11 @@ +--- port.in.orig 2009-09-10 04:59:59.000000000 +0900 ++++ port.in 2012-12-27 19:30:02.000000000 +0900 +@@ -19,7 +19,7 @@ + ORGANIZATION="" + BUILDROOT="/tmp" + ARCHIVE_DIR="" +- DIFF_MODE="CVS" ++ DIFF_MODE="SVN" + DIFF_VIEWER="more" + PORTLINT_FLAGS="abct" + EOF