From tota@rtfm.jp  Mon Dec 31 14:16:49 2012
Return-Path: <tota@rtfm.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 8FED4A04;
	Mon, 31 Dec 2012 14:16:49 +0000 (UTC)
	(envelope-from tota@rtfm.jp)
Received: from rtfm.jp (rtfm.jp [219.94.242.231])
	by mx1.freebsd.org (Postfix) with ESMTP id F246A8FC13;
	Mon, 31 Dec 2012 14:16:48 +0000 (UTC)
Received: by rtfm.jp (Postfix, from userid 1001)
	id C4058B862; Mon, 31 Dec 2012 23:11:06 +0900 (JST)
Message-Id: <20121231141106.C4058B862@rtfm.jp>
Date: Mon, 31 Dec 2012 23:11:06 +0900 (JST)
From: TAKATSU Tomonari <tota@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: joemann@beefree.free.de, marcus@FreeBSD.org
Subject: [PATCH] ports-mgmt/porttools, ports-mgmt/portlint: Switch CVS to SVN
X-Send-Pr-Version: 3.113
X-GNATS-Notify: joemann@beefree.free.de

>Number:         174860
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/porttools, ports-mgmt/portlint: Switch CVS to SVN
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 31 14:20:00 UTC 2012
>Closed-Date:    Sat Mar 02 00:52:54 UTC 2013
>Last-Modified:  Sat Mar 02 00:52:54 UTC 2013
>Originator:     TAKATSU Tomonari
>Release:        FreeBSD 8.2-RELEASE-p9 amd64
>Organization:
none (private)
>Environment:
System: FreeBSD photon.local.lan 8.2-RELEASE-p9 FreeBSD 8.2-RELEASE-p9 #0: Mon Jun 11 23:00:11 UTC 2012
>Description:
- Switch the VCS tool for the ports tree from CVS to SVN
- Pet portlint in porttools
  * Use PORT_OPTIONS:MDOCS instead of NOPORTDOCS
  * Replace tab with space WWW: line in pkg-descr

Port maintainers (joemann@beefree.free.de, marcus@FreeBSD.org) are cc'd.

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
--- Makefile	(revision 309739)
+++ Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	porttools
 PORTVERSION=	0.99
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	SF
 
@@ -14,12 +14,9 @@
 
 RUN_DEPENDS=	portlint:${PORTSDIR}/ports-mgmt/portlint \
 		cdiff:${PORTSDIR}/textproc/cdiff \
-		sudo:${PORTSDIR}/security/sudo
+		sudo:${PORTSDIR}/security/sudo \
+		svn:${PORTSDIR}/devel/subversion
 
-.if !defined(NOPORTDOCS)
-INSTALL_TARGET=	install install-docs
-.endif
-
 MAKE_ENV=	DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}"
 # Make the version information of porttools itself
 # available for inclusion in the PRs generated by it.
@@ -45,4 +42,8 @@
 RUN_DEPENDS+=	newfile:${PORTSDIR}/devel/newfile
 .endif
 
+.if ${PORT_OPTIONS:MDOCS}
+INSTALL_TARGET=	install install-docs
+.endif
+
 .include <bsd.port.mk>
Index: files/patch-README
===================================================================
--- files/patch-README	(revision 0)
+++ files/patch-README	(working copy)
@@ -0,0 +1,61 @@
+--- README.orig	2009-09-10 04:59:59.000000000 +0900
++++ README	2012-12-27 19:22:20.000000000 +0900
+@@ -7,7 +7,7 @@
+ 
+ FreeBSD Port Tools consist of the several small scripts run from
+ port(1) front-end:
+-- port commit: commit a port into the FreeBSD Ports CVS Repository
++- port commit: commit a port into the FreeBSD Ports SVN Repository
+ - port create: create a new port from a template
+ - port diff: generate a diff against a previous version of the port
+ - port fetch: fetch distfile(s) of a new version of the port
+@@ -43,42 +43,35 @@
+ Let us assume you are interested in helping out with one of the ports.
+ The most convenient way of doing that with the Port Tools is the following.
+ Even though the Port Tools have 3 most of diff generation, the recommended is 
+-CVS (default). Do not be scared away at this point - it is very simple.
++SVN (default). Do not be scared away at this point - it is very simple.
+ Let me give a quick overview:
+ 
+-1. Set up CVSROOT environment variable
+-
+-   sgk@elf% export CVSROOT=":pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs"
+-
+-   NOTE: you may want to check the Handbook for a list of anonymous CVS servers
+-   (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html).
+-
+-2. Check out a working copy of the port. I usually do it in ~/ports directory:
++1. Check out a working copy of the port. I usually do it in ~/ports directory:
+    (NOTE: my ~/ports directory contains only those ports I am interested in,
+    i.e. either maitain or send changes/updates to. Thus, it does not have
+    to contain the whole FreeBSD Ports tree)
+ 
+    sgk@elf:~% cd ~/ports
+-   sgk@elf:~/ports% cvs co ipsvd
++   sgk@elf:~/ports% svn co ipsvd
+ 
+    ipsvd is the sample port name.
+ 
+-3. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
++2. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
+ 
+    sgk@elf:~/ports/ipsvd% cd ipsvd
+    sgk@elf:~/ports/ipsvd% vim Makefile
+ 
+-4. At this moment we need to fetch the new distfile and run "make makesum" 
++3. At this moment we need to fetch the new distfile and run "make makesum" 
+    to update the distinfo file. There is even simpler way to accomplish this 
+    with the Port Tools version 0.50 or later:
+ 
+    sgk@elf:~/ports/ipsvd% port fetch
+ 
+-5. Now we want to make sure that the port compiles, installs and works fine:
++4. Now we want to make sure that the port compiles, installs and works fine:
+ 
+    sgk@elf:~/ports/ipsvd% port test
+ 
+-6. Once I am satisfied with the results, let us submit a PR 
++5. Once I am satisfied with the results, let us submit a PR 
+    with the port update:
+ 
+    sgk@elf:~/ports/ipsvd% port submit

Property changes on: files/patch-README
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: files/patch-cmd_commit.in
===================================================================
--- files/patch-cmd_commit.in	(revision 0)
+++ files/patch-cmd_commit.in	(working copy)
@@ -0,0 +1,67 @@
+--- cmd_commit.in.orig	2009-09-10 04:59:59.000000000 +0900
++++ cmd_commit.in	2012-12-31 21:42:13.000000000 +0900
+@@ -1,6 +1,6 @@
+ # cmd_commit
+ # Module for port(1)
+-# SUMMARY: commit a port into the FreeBSD Ports CVS Repository
++# SUMMARY: commit a port into the FreeBSD Ports SVN Repository
+ #
+ # $Id: cmd_commit.in,v 1.2 2009/09/09 19:58:30 skolobov Exp $
+ #
+@@ -59,13 +59,14 @@
+ 
+ # Determine if this is a new port
+ MODE="update"
+-[ "`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"
+ 
+ # Run portlint(1) to validate port's sanity
+ echo "===> Pre-commit portlint check"
+ FLAGS="-C"
+ [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N"
+-PL_CVS_IGNORE='^\d+$|^pr-patch$|^cvs-msg$' \
++PL_SVN_IGNORE='^\d+$|^pr-patch$|^svn-msg$' \
+ portlint ${FLAGS}
+ if [ $? -ne 0 ]
+ then
+@@ -79,15 +80,12 @@
+ then
+ 	${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME}
+ else
+-	# Initialize CVS environment
+-	PCVS="cvs -d ${FREEFALL_USERNAME}@pcvs.FreeBSD.org:/home/pcvs"
+-
+ 	# Make sure we are working with up-to-date version
+-	echo "===> Pre-commit CVS update"
+-	${PCVS} update
++	echo "===> Pre-commit SVN update"
++	svn update
+ 
+-	# See if CVS message already exists, and use that for commit log
+-	MSG="cvs-msg"
++	# See if SVN message already exists, and use that for commit log
++	MSG="svn-msg"
+ 	FLAGS=""
+ 	if [ -e ${MSG} ]
+ 	then
+@@ -99,16 +97,16 @@
+ 			echo '============================================='
+ 			cat ${MSG}
+ 			echo '============================================='
+-			read -p "Is the CVS message above correct? (y/n)" ANSWER
++			read -p "Is the SVN message above correct? (y/n)" ANSWER
+ 			[ "${ANSWER}" = "y" ] && break
+ 			${VISUAL:-vi} ${MSG}
+ 		done
+ 	fi 
+ 	# Commit the port update
+ 	echo "===> Committing port update"
+-	${PCVS} commit ${FLAGS}
++	svn commit ${FLAGS}
+ 	
+-	# Remove CVS message file only if commit was successful
++	# Remove SVN message file only if commit was successful
+ 	[ $? -eq 0 -a -e ${MSG} ] && rm ${MSG}
+ fi
+ 

Property changes on: files/patch-cmd_commit.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
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 <diff mode>]
  	-h	- Display this usage summary
  	-d <diff mode> - Select diff generation mode:
- 		CVS - against CVS
-+		CVSauto - against CVS, no cvs add/delete required
+-		CVS - against CVS
++		SVN - against SVN
  		<dir> - against Ports tree in <dir>
  		<pattern> - against original port in <pwd><pattern>
  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 <diff mode> - Select diff generation mode:
- 		CVS - against CVS
-+		CVSauto - against CVS, no cvs add/delete required
+-		CVS - against CVS
++		SVN - against SVN
  		<dir> - against Ports tree in <dir>
  		<pattern> - against original port in <pwd><pattern>
  	-s <severity> - Set PR's severity to <severity>
@@ -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: <choose from the list of categories below (one line)>
@@ -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

Property changes on: files/patch-port.in
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: files/patch-porttools.5
===================================================================
--- files/patch-porttools.5	(revision 309739)
+++ files/patch-porttools.5	(working copy)
@@ -1,11 +1,11 @@
---- porttools.5.orig	2009-09-09 21:59:59.000000000 +0200
-+++ porttools.5	2009-10-25 19:09:02.000000000 +0100
+--- porttools.5.orig	2009-09-10 04:59:59.000000000 +0900
++++ porttools.5	2012-12-27 19:46:53.000000000 +0900
 @@ -51,7 +51,7 @@
  Default to
  .Pa /tmp .
  .It Ev DIFF_MODE
 -Selects diff generation mode. Valid values are: CVS, directory
-+Selects diff generation mode. Valid values are: CVS, CVSauto, directory
++Selects diff generation mode. Valid values are: SVN, directory
  .Pq e.g. Pa /usr/ports ,
  or suffix
  .Pq e.g. Pa .orig .
Index: files/patch-util_diff.in
===================================================================
--- files/patch-util_diff.in	(revision 309739)
+++ files/patch-util_diff.in	(working copy)
@@ -1,6 +1,16 @@
---- ./util_diff.in.orig	2009-09-09 21:59:59.000000000 +0200
-+++ ./util_diff.in	2011-11-28 21:54:50.000000000 +0100
-@@ -37,49 +37,122 @@
+--- util_diff.in.orig	2009-09-10 04:59:59.000000000 +0900
++++ util_diff.in	2012-12-31 21:44:44.000000000 +0900
+@@ -14,7 +14,8 @@
+ # 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
+ 
+ # Create a temporary dir for generated files (patch/shar, PR form)
+@@ -37,49 +38,96 @@
  	fi
  	cd ${SAVE_CWD}
  else
@@ -14,25 +24,20 @@
 +	if [ "${DIFF_MODE}" = "" ]
  	then
 -		DIFF_MODE="/usr/ports"
-+		if [ -d CVS ]
++		if [ -d /usr/ports/.svn ]
 +		then
-+			if grep -iq ":pserver:anoncvs@anoncvs.fr.FreeBSD.org:" CVS/Root
-+			then
-+				DIFF_MODE="CVSauto"
-+			else
-+				DIFF_MODE="CVS"
-+			fi
++			DIFF_MODE="SVN"
 +		else
 +			DIFF_MODE="/usr/ports"
 +		fi
 +		echo "Default diff mode is ${DIFF_MODE}"
-+	elif [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
++	elif [ "${DIFF_MODE}" = "SVN" ]
 +	then
-+		# If there is no CVS subdirectory then
++		# If there is no .svn directory then
 +		# fallback to diffing against /usr/ports tree
-+		if [ ! -d CVS ]
++		if [ ! -d /usr/ports/.svn ]
 +		then
-+			echo "Diff mode was set to ${DIFF_MODE}, but there's no CVS subdirectory"
++			echo "Diff mode was set to ${DIFF_MODE}, but there's no .svn directory"
 +			echo -n "Trying /usr/ports ... "
 +			if [ -d /usr/ports ]
 +			then
@@ -47,48 +52,33 @@
  	fi
  
 -	if [ "${DIFF_MODE}" = "CVS" ]
-+	if [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
++	if [ "${DIFF_MODE}" = "SVN" ]
  	then
+-		# Test for ~/.cvspass and create if necessary
+-		test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
 +		DIFF_TYPE=${DIFF_MODE}
- 		# Test for ~/.cvspass and create if necessary
- 		test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
  
- 		# Run 'cvs update' first
- 		echo "===> Updating from CVS"
+-		# Run 'cvs update' first
+-		echo "===> Updating from CVS"
 -		cvs -R update -Pd
 -		if [ $? -ne 0 ]
-+		if [ "${DIFF_MODE}" = "CVSauto" ]
-+		then
-+			cvs -R update -Pd 2> ${TEMPROOT}/.cvs.err > ${TEMPROOT}/.cvs.out
-+			status=$?
-+			cat ${TEMPROOT}/.cvs.err ${TEMPROOT}/.cvs.out
-+		else
-+			cvs -R update -Pd
-+			status=$?
-+		fi
++		# Run 'svn update' first
++		echo "===> Updating from SVN"
++		svn update
++		status=$?
 +		if [ $status -ne 0 ]
  		then
- 			echo "Error updating CVS"
+-			echo "Error updating CVS"
++			echo "Error updating SVN"
  			rm -rf ${TEMPROOT}
  			exit 1
  		fi
 -
 -		DIFF_CMD="cvs -R diff -uN"
-+		PORTBASENAME=`sed -E -e 's%.*/([^/]+)$%\1%' CVS/Repository`
-+		if [ "${DIFF_MODE}" = "CVSauto" ]
-+		then
-+			sort -k 2,666 ${TEMPROOT}/.cvs.out | \
-+			sed -nE	-e 's/^[?A] (.*)$/echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" /p' \
-+				-e 's/^U (.*)$/mv "\1" "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
-+				-e 's/^R (.*)$/cvs -R -q update -p "\1" > "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
-+				-e 's/^M (.*)$/cvs -R diff -u "\1"/p' \
-+				> ${TEMPROOT}/.cvs.diff_cmd
-+			DIFF_CMD="sh -x ${TEMPROOT}/.cvs.diff_cmd"
-+		else
-+			DIFF_CMD="cvs -R diff -uN"
-+		fi
++		DIFF_CMD="svn diff"
  	else 
- 		# Non-CVS modes
+-		# Non-CVS modes
++		# Non-SVN modes
 +		DIRBASENAME=`basename \`pwd\``
 +		PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile`
 +		if [ "${DIRBASENAME}" != "${PORTBASENAME_HEADER}" ]
@@ -141,12 +131,12 @@
  		fi
  
  		# Check to see if the original version of port exist 
-@@ -90,7 +163,7 @@
+@@ -90,7 +138,7 @@
  			exit 1
  		fi
  		
 -		DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} `pwd`"
-+		DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} ."
++		DIFF_CMD="diff -ruN ${ORIG_DIR} ."
  	fi
  
  	# Generate patch
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 309739)
+++ pkg-descr	(working copy)
@@ -6,4 +6,4 @@
 - port submit: submit a PR with new port, or port change/update
 - port test: automate testing a new port or a port update
 
-WWW:	http://sourceforge.net/projects/porttools/
+WWW: http://sourceforge.net/projects/porttools/

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Dec 31 14:20:09 UTC 2012 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174860 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: joemann@beefree.free.de
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/174860: [PATCH] ports-mgmt/porttools, ports-mgmt/portlint: Switch CVS to SVN
Date: Mon, 31 Dec 2012 14:20:09 UT

 Maintainer of ports-mgmt/porttools,
 
 Please note that PR ports/174860 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/174860
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/174860: commit references a PR
Date: Sat,  2 Mar 2013 00:41:08 +0000 (UTC)

 Author: tota
 Date: Sat Mar  2 00:40:53 2013
 New Revision: 313176
 URL: http://svnweb.freebsd.org/changeset/ports/313176
 
 Log:
   - Switch the VCS tool for the ports tree from CVS to SVN
   - Pet portlint in porttools
     * Use PORT_OPTIONS:MDOCS instead of NOPORTDOCS
     * Replace tab with space WWW: line in pkg-descr
   
   PR:		ports/174860
   Submitted by:	tota (myself)
   Approved by:	maintainers (timeout > 2 months)
 
 Added:
   head/ports-mgmt/porttools/files/patch-README   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-cmd_commit.in   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-port.in   (contents, props changed)
 Modified:
   head/ports-mgmt/portlint/Makefile
   head/ports-mgmt/portlint/src/portlint.pl
   head/ports-mgmt/porttools/Makefile
   head/ports-mgmt/porttools/files/patch-cmd_diff.in   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-cmd_submit.in   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-port.1   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-porttools.5   (contents, props changed)
   head/ports-mgmt/porttools/files/patch-util_diff.in   (contents, props changed)
   head/ports-mgmt/porttools/pkg-descr
 Directory Properties:
   head/ports-mgmt/porttools/files/patch-Makefile   (props changed)
   head/ports-mgmt/porttools/files/patch-cmd_test.in   (props changed)
 
 Modified: head/ports-mgmt/portlint/Makefile
 ==============================================================================
 --- head/ports-mgmt/portlint/Makefile	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/portlint/Makefile	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -6,6 +6,7 @@
  
  PORTNAME=	portlint
  PORTVERSION=	2.14.1
 +PORTREVISION=	1
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	# none
  DISTFILES=	# none
 
 Modified: head/ports-mgmt/portlint/src/portlint.pl
 ==============================================================================
 --- head/ports-mgmt/portlint/src/portlint.pl	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/portlint/src/portlint.pl	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -161,7 +161,7 @@ foreach my $i (@osdep) {
  
  # The PORTSDIR environment variable overrides our defaults.
  $portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} );
 -$ENV{'PL_CVS_IGNORE'} //= '';
 +$ENV{'PL_SVN_IGNORE'} //= '';
  my $mfile_moved = "${portsdir}/MOVED";
  my $mfile_uids = "${portsdir}/UIDs";
  my $mfile_gids = "${portsdir}/GIDs";
 
 Modified: head/ports-mgmt/porttools/Makefile
 ==============================================================================
 --- head/ports-mgmt/porttools/Makefile	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/Makefile	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	porttools
  PORTVERSION=	0.99
 -PORTREVISION=	6
 +PORTREVISION=	7
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	SF
  
 @@ -14,11 +14,8 @@ LICENSE=	BSD
  
  RUN_DEPENDS=	portlint:${PORTSDIR}/ports-mgmt/portlint \
  		cdiff:${PORTSDIR}/textproc/cdiff \
 -		sudo:${PORTSDIR}/security/sudo
 -
 -.if !defined(NOPORTDOCS)
 -INSTALL_TARGET=	install install-docs
 -.endif
 +		sudo:${PORTSDIR}/security/sudo \
 +		svn:${PORTSDIR}/devel/subversion
  
  MAKE_ENV=	DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}"
  # Make the version information of porttools itself
 @@ -45,4 +42,8 @@ NEWFILE_DESC=	Enable newfile support
  RUN_DEPENDS+=	newfile:${PORTSDIR}/devel/newfile
  .endif
  
 +.if ${PORT_OPTIONS:MDOCS}
 +INSTALL_TARGET=	install install-docs
 +.endif
 +
  .include <bsd.port.mk>
 
 Added: head/ports-mgmt/porttools/files/patch-README
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/ports-mgmt/porttools/files/patch-README	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -0,0 +1,61 @@
 +--- README.orig	2009-09-10 04:59:59.000000000 +0900
 ++++ README	2012-12-27 19:22:20.000000000 +0900
 +@@ -7,7 +7,7 @@
 + 
 + FreeBSD Port Tools consist of the several small scripts run from
 + port(1) front-end:
 +-- port commit: commit a port into the FreeBSD Ports CVS Repository
 ++- port commit: commit a port into the FreeBSD Ports SVN Repository
 + - port create: create a new port from a template
 + - port diff: generate a diff against a previous version of the port
 + - port fetch: fetch distfile(s) of a new version of the port
 +@@ -43,42 +43,35 @@
 + Let us assume you are interested in helping out with one of the ports.
 + The most convenient way of doing that with the Port Tools is the following.
 + Even though the Port Tools have 3 most of diff generation, the recommended is 
 +-CVS (default). Do not be scared away at this point - it is very simple.
 ++SVN (default). Do not be scared away at this point - it is very simple.
 + Let me give a quick overview:
 + 
 +-1. Set up CVSROOT environment variable
 +-
 +-   sgk@elf% export CVSROOT=":pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs"
 +-
 +-   NOTE: you may want to check the Handbook for a list of anonymous CVS servers
 +-   (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html).
 +-
 +-2. Check out a working copy of the port. I usually do it in ~/ports directory:
 ++1. Check out a working copy of the port. I usually do it in ~/ports directory:
 +    (NOTE: my ~/ports directory contains only those ports I am interested in,
 +    i.e. either maitain or send changes/updates to. Thus, it does not have
 +    to contain the whole FreeBSD Ports tree)
 + 
 +    sgk@elf:~% cd ~/ports
 +-   sgk@elf:~/ports% cvs co ipsvd
 ++   sgk@elf:~/ports% svn co ipsvd
 + 
 +    ipsvd is the sample port name.
 + 
 +-3. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
 ++2. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
 + 
 +    sgk@elf:~/ports/ipsvd% cd ipsvd
 +    sgk@elf:~/ports/ipsvd% vim Makefile
 + 
 +-4. At this moment we need to fetch the new distfile and run "make makesum" 
 ++3. At this moment we need to fetch the new distfile and run "make makesum" 
 +    to update the distinfo file. There is even simpler way to accomplish this 
 +    with the Port Tools version 0.50 or later:
 + 
 +    sgk@elf:~/ports/ipsvd% port fetch
 + 
 +-5. Now we want to make sure that the port compiles, installs and works fine:
 ++4. Now we want to make sure that the port compiles, installs and works fine:
 + 
 +    sgk@elf:~/ports/ipsvd% port test
 + 
 +-6. Once I am satisfied with the results, let us submit a PR 
 ++5. Once I am satisfied with the results, let us submit a PR 
 +    with the port update:
 + 
 +    sgk@elf:~/ports/ipsvd% port submit
 
 Added: head/ports-mgmt/porttools/files/patch-cmd_commit.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/ports-mgmt/porttools/files/patch-cmd_commit.in	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -0,0 +1,67 @@
 +--- cmd_commit.in.orig	2009-09-10 04:59:59.000000000 +0900
 ++++ cmd_commit.in	2012-12-31 21:42:13.000000000 +0900
 +@@ -1,6 +1,6 @@
 + # cmd_commit
 + # Module for port(1)
 +-# SUMMARY: commit a port into the FreeBSD Ports CVS Repository
 ++# SUMMARY: commit a port into the FreeBSD Ports SVN Repository
 + #
 + # $Id: cmd_commit.in,v 1.2 2009/09/09 19:58:30 skolobov Exp $
 + #
 +@@ -59,13 +59,14 @@
 + 
 + # Determine if this is a new port
 + MODE="update"
 +-[ "`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"
 + 
 + # Run portlint(1) to validate port's sanity
 + echo "===> Pre-commit portlint check"
 + FLAGS="-C"
 + [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N"
 +-PL_CVS_IGNORE='^\d+$|^pr-patch$|^cvs-msg$' \
 ++PL_SVN_IGNORE='^\d+$|^pr-patch$|^svn-msg$' \
 + portlint ${FLAGS}
 + if [ $? -ne 0 ]
 + then
 +@@ -79,15 +80,12 @@
 + then
 + 	${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME}
 + else
 +-	# Initialize CVS environment
 +-	PCVS="cvs -d ${FREEFALL_USERNAME}@pcvs.FreeBSD.org:/home/pcvs"
 +-
 + 	# Make sure we are working with up-to-date version
 +-	echo "===> Pre-commit CVS update"
 +-	${PCVS} update
 ++	echo "===> Pre-commit SVN update"
 ++	svn update
 + 
 +-	# See if CVS message already exists, and use that for commit log
 +-	MSG="cvs-msg"
 ++	# See if SVN message already exists, and use that for commit log
 ++	MSG="svn-msg"
 + 	FLAGS=""
 + 	if [ -e ${MSG} ]
 + 	then
 +@@ -99,16 +97,16 @@
 + 			echo '============================================='
 + 			cat ${MSG}
 + 			echo '============================================='
 +-			read -p "Is the CVS message above correct? (y/n)" ANSWER
 ++			read -p "Is the SVN message above correct? (y/n)" ANSWER
 + 			[ "${ANSWER}" = "y" ] && break
 + 			${VISUAL:-vi} ${MSG}
 + 		done
 + 	fi 
 + 	# Commit the port update
 + 	echo "===> Committing port update"
 +-	${PCVS} commit ${FLAGS}
 ++	svn commit ${FLAGS}
 + 	
 +-	# Remove CVS message file only if commit was successful
 ++	# Remove SVN message file only if commit was successful
 + 	[ $? -eq 0 -a -e ${MSG} ] && rm ${MSG}
 + fi
 + 
 
 Modified: head/ports-mgmt/porttools/files/patch-cmd_diff.in
 ==============================================================================
 --- head/ports-mgmt/porttools/files/patch-cmd_diff.in	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/files/patch-cmd_diff.in	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -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 <diff mode>]
   	-h	- Display this usage summary
   	-d <diff mode> - Select diff generation mode:
 - 		CVS - against CVS
 -+		CVSauto - against CVS, no cvs add/delete required
 +-		CVS - against CVS
 ++		SVN - against SVN
   		<dir> - against Ports tree in <dir>
   		<pattern> - against original port in <pwd><pattern>
   EOF
 
 Modified: head/ports-mgmt/porttools/files/patch-cmd_submit.in
 ==============================================================================
 --- head/ports-mgmt/porttools/files/patch-cmd_submit.in	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/files/patch-cmd_submit.in	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -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 <diff mode> - Select diff generation mode:
 - 		CVS - against CVS
 -+		CVSauto - against CVS, no cvs add/delete required
 +-		CVS - against CVS
 ++		SVN - against SVN
   		<dir> - against Ports tree in <dir>
   		<pattern> - against original port in <pwd><pattern>
   	-s <severity> - Set PR's severity to <severity>
 @@ -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: <choose from the list of categories below (one line)>
 @@ -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
   
 
 Modified: head/ports-mgmt/porttools/files/patch-port.1
 ==============================================================================
 --- head/ports-mgmt/porttools/files/patch-port.1	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/files/patch-port.1	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -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 ,
 
 Added: head/ports-mgmt/porttools/files/patch-port.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/ports-mgmt/porttools/files/patch-port.in	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -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
 
 Modified: head/ports-mgmt/porttools/files/patch-porttools.5
 ==============================================================================
 --- head/ports-mgmt/porttools/files/patch-porttools.5	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/files/patch-porttools.5	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -1,11 +1,11 @@
 ---- porttools.5.orig	2009-09-09 21:59:59.000000000 +0200
 -+++ porttools.5	2009-10-25 19:09:02.000000000 +0100
 +--- porttools.5.orig	2009-09-10 04:59:59.000000000 +0900
 ++++ porttools.5	2012-12-27 19:46:53.000000000 +0900
  @@ -51,7 +51,7 @@
   Default to
   .Pa /tmp .
   .It Ev DIFF_MODE
  -Selects diff generation mode. Valid values are: CVS, directory
 -+Selects diff generation mode. Valid values are: CVS, CVSauto, directory
 ++Selects diff generation mode. Valid values are: SVN, directory
   .Pq e.g. Pa /usr/ports ,
   or suffix
   .Pq e.g. Pa .orig .
 
 Modified: head/ports-mgmt/porttools/files/patch-util_diff.in
 ==============================================================================
 --- head/ports-mgmt/porttools/files/patch-util_diff.in	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/files/patch-util_diff.in	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -1,6 +1,16 @@
 ---- ./util_diff.in.orig	2009-09-09 21:59:59.000000000 +0200
 -+++ ./util_diff.in	2011-11-28 21:54:50.000000000 +0100
 -@@ -37,49 +37,122 @@
 +--- util_diff.in.orig	2009-09-10 04:59:59.000000000 +0900
 ++++ util_diff.in	2012-12-31 21:44:44.000000000 +0900
 +@@ -14,7 +14,8 @@
 + # 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
 + 
 + # Create a temporary dir for generated files (patch/shar, PR form)
 +@@ -37,49 +38,96 @@
   	fi
   	cd ${SAVE_CWD}
   else
 @@ -14,25 +24,20 @@
  +	if [ "${DIFF_MODE}" = "" ]
   	then
  -		DIFF_MODE="/usr/ports"
 -+		if [ -d CVS ]
 ++		if [ -d /usr/ports/.svn ]
  +		then
 -+			if grep -iq ":pserver:anoncvs@anoncvs.fr.FreeBSD.org:" CVS/Root
 -+			then
 -+				DIFF_MODE="CVSauto"
 -+			else
 -+				DIFF_MODE="CVS"
 -+			fi
 ++			DIFF_MODE="SVN"
  +		else
  +			DIFF_MODE="/usr/ports"
  +		fi
  +		echo "Default diff mode is ${DIFF_MODE}"
 -+	elif [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
 ++	elif [ "${DIFF_MODE}" = "SVN" ]
  +	then
 -+		# If there is no CVS subdirectory then
 ++		# If there is no .svn directory then
  +		# fallback to diffing against /usr/ports tree
 -+		if [ ! -d CVS ]
 ++		if [ ! -d /usr/ports/.svn ]
  +		then
 -+			echo "Diff mode was set to ${DIFF_MODE}, but there's no CVS subdirectory"
 ++			echo "Diff mode was set to ${DIFF_MODE}, but there's no .svn directory"
  +			echo -n "Trying /usr/ports ... "
  +			if [ -d /usr/ports ]
  +			then
 @@ -47,48 +52,33 @@
   	fi
   
  -	if [ "${DIFF_MODE}" = "CVS" ]
 -+	if [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
 ++	if [ "${DIFF_MODE}" = "SVN" ]
   	then
 +-		# Test for ~/.cvspass and create if necessary
 +-		test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
  +		DIFF_TYPE=${DIFF_MODE}
 - 		# Test for ~/.cvspass and create if necessary
 - 		test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
   
 - 		# Run 'cvs update' first
 - 		echo "===> Updating from CVS"
 +-		# Run 'cvs update' first
 +-		echo "===> Updating from CVS"
  -		cvs -R update -Pd
  -		if [ $? -ne 0 ]
 -+		if [ "${DIFF_MODE}" = "CVSauto" ]
 -+		then
 -+			cvs -R update -Pd 2> ${TEMPROOT}/.cvs.err > ${TEMPROOT}/.cvs.out
 -+			status=$?
 -+			cat ${TEMPROOT}/.cvs.err ${TEMPROOT}/.cvs.out
 -+		else
 -+			cvs -R update -Pd
 -+			status=$?
 -+		fi
 ++		# Run 'svn update' first
 ++		echo "===> Updating from SVN"
 ++		svn update
 ++		status=$?
  +		if [ $status -ne 0 ]
   		then
 - 			echo "Error updating CVS"
 +-			echo "Error updating CVS"
 ++			echo "Error updating SVN"
   			rm -rf ${TEMPROOT}
   			exit 1
   		fi
  -
  -		DIFF_CMD="cvs -R diff -uN"
 -+		PORTBASENAME=`sed -E -e 's%.*/([^/]+)$%\1%' CVS/Repository`
 -+		if [ "${DIFF_MODE}" = "CVSauto" ]
 -+		then
 -+			sort -k 2,666 ${TEMPROOT}/.cvs.out | \
 -+			sed -nE	-e 's/^[?A] (.*)$/echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" /p' \
 -+				-e 's/^U (.*)$/mv "\1" "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
 -+				-e 's/^R (.*)$/cvs -R -q update -p "\1" > "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
 -+				-e 's/^M (.*)$/cvs -R diff -u "\1"/p' \
 -+				> ${TEMPROOT}/.cvs.diff_cmd
 -+			DIFF_CMD="sh -x ${TEMPROOT}/.cvs.diff_cmd"
 -+		else
 -+			DIFF_CMD="cvs -R diff -uN"
 -+		fi
 ++		DIFF_CMD="svn diff"
   	else 
 - 		# Non-CVS modes
 +-		# Non-CVS modes
 ++		# Non-SVN modes
  +		DIRBASENAME=`basename \`pwd\``
  +		PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile`
  +		if [ "${DIRBASENAME}" != "${PORTBASENAME_HEADER}" ]
 @@ -141,12 +131,12 @@
   		fi
   
   		# Check to see if the original version of port exist 
 -@@ -90,7 +163,7 @@
 +@@ -90,7 +138,7 @@
   			exit 1
   		fi
   		
  -		DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} `pwd`"
 -+		DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} ."
 ++		DIFF_CMD="diff -ruN ${ORIG_DIR} ."
   	fi
   
   	# Generate patch
 
 Modified: head/ports-mgmt/porttools/pkg-descr
 ==============================================================================
 --- head/ports-mgmt/porttools/pkg-descr	Fri Mar  1 23:52:16 2013	(r313175)
 +++ head/ports-mgmt/porttools/pkg-descr	Sat Mar  2 00:40:53 2013	(r313176)
 @@ -6,4 +6,4 @@ FreeBSD Port Tools includes the followin
  - port submit: submit a PR with new port, or port change/update
  - port test: automate testing a new port or a port update
  
 -WWW:	http://sourceforge.net/projects/porttools/
 +WWW: http://sourceforge.net/projects/porttools/
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: tota 
State-Changed-When: Sat Mar 2 00:52:27 UTC 2013 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174860 
>Unformatted:
