From owner-svn-ports-all@freebsd.org Sun Sep 2 11:30:21 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CC44FEC7A1; Sun, 2 Sep 2018 11:30:21 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F387B752DB; Sun, 2 Sep 2018 11:30:20 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDEC7189FA; Sun, 2 Sep 2018 11:30:20 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w82BUKu8031853; Sun, 2 Sep 2018 11:30:20 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w82BUKqq031852; Sun, 2 Sep 2018 11:30:20 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201809021130.w82BUKqq031852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Sun, 2 Sep 2018 11:30:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478786 - head/Tools/scripts X-SVN-Group: ports-head X-SVN-Commit-Author: rene X-SVN-Commit-Paths: head/Tools/scripts X-SVN-Commit-Revision: 478786 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2018 11:30:21 -0000 Author: rene Date: Sun Sep 2 11:30:20 2018 New Revision: 478786 URL: https://svnweb.freebsd.org/changeset/ports/478786 Log: Tools/scrips/rmport: improve usability - if svn is not found, look for svnlite - improve workflow of removing ports Submitted by: blackend via email Approved by: maintainer (crees) Modified: head/Tools/scripts/rmport Modified: head/Tools/scripts/rmport ============================================================================== --- head/Tools/scripts/rmport Sun Sep 2 11:26:11 2018 (r478785) +++ head/Tools/scripts/rmport Sun Sep 2 11:30:20 2018 (r478786) @@ -49,6 +49,16 @@ SED="sed -i .orig -E" # use ~/.ssh/config to set up the desired username if different than $LOGNAME SVNREPO=${SVNREPO:-svn+ssh://repo.FreeBSD.org/ports} +if [ -n "$(command -v svn 2>/dev/null)" ]; then + SVN=svn +elif [ -n "$(command -v svnlite 2>/dev/null)" ]; then + SVN=svnlite +else + echo "Neither svn(1) nor svnlite(1) found. Please install devel/subversion." + exit 1 +fi + + if ! CDIFF=$(which cdiff) ; then CDIFF=${PAGER} fi @@ -134,8 +144,8 @@ mkcodir() co_common() { log "getting ports/MOVED and ports/LEGAL from repository" - svn co --depth empty ${SVNREPO}/head ports - svn up ports/MOVED ports/LEGAL + ${SVN} co --depth empty ${SVNREPO}/head ports + ${SVN} up ports/MOVED ports/LEGAL } # check if some ports depend on the given port @@ -276,8 +286,8 @@ co_port() port=${2} log "${cat}/${port}: getting ${cat}/Makefile and port's files from repository" - svn up --depth empty ports/${cat} ports/$cat/Makefile - svn up ports/${cat}/${port} + ${SVN} up --depth empty ports/${cat} ports/$cat/Makefile + ${SVN} up ports/${cat}/${port} } # check if anything about the port is mentioned in ports/LEGAL @@ -342,7 +352,7 @@ rm_port() log "${catport}: removing port's files" - svn rm ports/${catport} + ${SVN} rm ports/${catport} } append_Template() @@ -361,6 +371,8 @@ append_Template() msg="${msg}: ${DEPRECATED}" fi + echo "This is the commit message, please edit it." >> ./svnlog + log "${catport}: adding entry to commit message template" echo "${msg}" >> ./svnlog @@ -373,7 +385,7 @@ diff() diffout=${codir}/diff - svn diff --no-diff-deleted ports > ${diffout} 2>&1 || : + ${SVN} diff --no-diff-deleted ports > ${diffout} 2>&1 || : read -p "hit to view svn diff output" dummy @@ -386,14 +398,24 @@ diff() commit() { log "running svn update" - svn up --quiet ports 2>&1 |${PAGER:-less} - + ${SVN} up --quiet ports 2>&1 |${PAGER:-less} + + echo >> svnlog + echo $EDITOR svnlog - answer=`ask "do you want to commit?"` + log "Your commit message is:" + echo svnlog + answer=`ask "Do you want to edit again your commit message?"` if [ "${answer}" = "y" ] ; then - svn ci --file svnlog ports + $EDITOR svnlog + fi + + answer=`ask "Do you want to commit now?"` + + if [ "${answer}" = "y" ] ; then + ${SVN} ci --file svnlog ports fi }