From owner-dev-commits-ports-main@freebsd.org Tue Apr 6 09:03:33 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FB785C5DF6; Tue, 6 Apr 2021 09:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF1ln0qXrz3np3; Tue, 6 Apr 2021 09:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0EDB1E4E; Tue, 6 Apr 2021 09:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13693WGw060676; Tue, 6 Apr 2021 09:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13693Wtx060675; Tue, 6 Apr 2021 09:03:32 GMT (envelope-from git) Date: Tue, 6 Apr 2021 09:03:32 GMT Message-Id: <202104060903.13693Wtx060675@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Rene Ladan Subject: git: 88a97c47423c - main - Tools/scripts/tindex: update for git MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rene X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88a97c47423cfefc85efd108ec31cadef59c19af Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2021 09:03:33 -0000 The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=88a97c47423cfefc85efd108ec31cadef59c19af commit 88a97c47423cfefc85efd108ec31cadef59c19af Author: Rene Ladan AuthorDate: 2021-04-06 09:01:21 +0000 Commit: Rene Ladan CommitDate: 2021-04-06 09:01:21 +0000 Tools/scripts/tindex: update for git Reviewed by: uqs Differential Revision: https://reviews.freebsd.org/D29451 --- Tools/scripts/tindex | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex index 9fe704f159e6..9adbfc4e7b80 100755 --- a/Tools/scripts/tindex +++ b/Tools/scripts/tindex @@ -6,7 +6,7 @@ # that 'make fetchindex' sees it. # # When INDEX is broken, assemble the list of committers who touched files -# on the most recent 'svn update', and put those committers "on the hook". +# on the most recent 'git pull', and put those committers "on the hook". # These committers all stay on the hook until INDEX is buildable again. # # MAINTAINER= portmgr@FreeBSD.org @@ -44,10 +44,7 @@ fi blame() { # Find out who is responsible for current version of file $1 - # Fastest way to extract is from svn info - who=$(${SVN} info $1 2>/dev/null | grep '^Last Changed Author' | awk '{print $4}') - - echo $who + git log --no-patch --max-count=1 --format='%ce' $1 } indexfail() { @@ -78,7 +75,7 @@ indexfail() { # Find out which committers are on the hook - commits=$(grep ^U ${PORTSDIR}/svn.log | grep -v INDEX | awk '{print $2}') + commits=$(${GIT} diff --name-only ${OLD_HEAD}) for i in ${commits}; do blame $i >> ${PORTSDIR}/hook done @@ -89,8 +86,8 @@ indexfail() { tr -s '\n' ' ' < ${PORTSDIR}/hook echo echo - echo "Most recent SVN update was:"; - grep -v '/work$' svn.log | grep -v '^\?' + echo "Most recent Git update was:"; + (IFS=""; echo ${commits}) ) | mail -s "INDEX build failed for ${BRANCH}" ${REPORT_ADDRESS} exit 1 } @@ -131,10 +128,10 @@ OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR cd ${PORTSDIR} rm -f INDEX-11 INDEX-11.bz2 INDEX-12 INDEX-12.bz2 INDEX-13 INDEX-13.bz2 INDEX-14 INDEX-14.bz2 -(${SVN} up 2>1 ) > svn.log -if grep -q ^C svn.log ; then - (echo "svn update failed with conflicts:"; - grep ^C svn.log) | mail -s "Ports svn up failed" ${ERROR_ADDRESS} +OLD_HEAD=$(${GIT} rev-parse HEAD) +if ! ${GIT} pull --ff-only > git.log 2>&1 ; then + (echo "Git update failed with conflicts:"; + cat git.log) | mail -s "Ports Git update failed" ${ERROR_ADDRESS} exit 1 fi @@ -148,7 +145,7 @@ for branch in 11.x 12.x 13.x 14.x; do echo "Building INDEX for ${branch} with OSVERSION=${OSVERSION}" cd ${PORTSDIR} - ((make index 2> index.err) > index.out) || indexfail ${branch} + ( (make index 2> index.err) > index.out) || indexfail ${branch} if [ -s index.err ]; then indexfail ${branch} fi