From owner-svn-ports-head@FreeBSD.ORG Sat Mar 2 00:40:56 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 78813B8D; Sat, 2 Mar 2013 00:40:56 +0000 (UTC) (envelope-from tota@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0311EDD; Sat, 2 Mar 2013 00:40:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r220euLu059616; Sat, 2 Mar 2013 00:40:56 GMT (envelope-from tota@svn.freebsd.org) Received: (from tota@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r220esHp059602; Sat, 2 Mar 2013 00:40:54 GMT (envelope-from tota@svn.freebsd.org) Message-Id: <201303020040.r220esHp059602@svn.freebsd.org> From: TAKATSU Tomonari Date: Sat, 2 Mar 2013 00:40:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r313176 - in head/ports-mgmt: portlint portlint/src porttools porttools/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Mar 2013 00:40:56 -0000 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 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 ] -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 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 - 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 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/