From nobody Tue Feb 06 21:18:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TTx1Y4HLXz5B00h; Tue, 6 Feb 2024 21:18:25 +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 4TTx1Y3bM3z4YxY; Tue, 6 Feb 2024 21:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707254305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mc9DpDGoUNS5Cm0xoNlDHcfKC6uy0YcNg7dlbdR6RHY=; b=ZmrcolGIuyqZOkq42POFAKqCN2lJe/ZR3xLR9buYDhmYADthIuB1AuJ2oQbqUf+dL+olOT iPX0rG5lg6wZiSDp3EB76TfN73Gh0xrs6q/DInImvPQKHm+5dU/wCRtbq2nIa7kxZelWj9 BGIP8TH89vvQWN6XNt+AhBXLIzkXIMQEaNBpwatFGvJMBBOAJyrq/fEY+IlECkQOX0qh8p nCURdaIKoTxm12btwo2EJ6OJ+aD5EYXOjnb1Lub6Inal/jXyhBtRqQttdZBxcdFKCWj5XY a9aM61u9M2vjOM1aoMlttV5Dgly1VzKQlgqWhwK9TrEqSpCe/bMbl0ZIzpWwhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707254305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mc9DpDGoUNS5Cm0xoNlDHcfKC6uy0YcNg7dlbdR6RHY=; b=VgSHpI3DXRJZU9+1ZXKU3H86P8mX59mvT8tavIcKsano6HZNffSfEP5eMhFs8Rct8hlqu4 MOGWU0Wc9F8zMSoPBfSkTb5rC8Vi8w39UG34XTsLsf8azURsP6LNdx3JvI32Ws8bKNn6iq wXXOK0dJu+s7qCq7FeNxsYAsOjL8CNpVg7TZ1QdsnjyFu4PGo2yL7ZbbTH/rSsnIPFoW77 fHQKWDLBYXKQ7ihhdQJYvlgmmflXp0BsvNLdoVYCfRhuuGZ5kCsi4vbg0obHbBvGz6UKBi jclCoJRkpKkrw750EbaE9QeANszGEPmlpSTzWC3awrwIzT2a+G6n5W8aFNb+Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707254305; a=rsa-sha256; cv=none; b=YjYh20UlWCKiP7z+Irt4SSgdOOWPKhMiAChunwQ4KIMO/uiAQplsDqxP0YUjg9eEwci1Ih lM1jZgoBV+2DGfKDqg1vKTqOdj/tBpmb2vau55oZMHqJFHmil60ryy6EfavCqDFUXRniSp cH3LV5bf55sHJJFOfyulxCT1RFIiCdQ7NTdnQUMZzdNEHyaj+vwUxGBM/raTcIae0EoGqF yyExnJSWKcjJK0gGGPCs4+S2DxUVF54jxGnufIwLqMcjuYyIlFFJZtwIsLh6dFQHZmZLl0 K5JphQDm4zQaOZ3WR3aq7MBy5vsLso2FHsERscF1/Y9xUo6vkrTEgxZjh21QNQ== 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 4TTx1Y2fJFzgD6; Tue, 6 Feb 2024 21:18:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 416LIPIW054369; Tue, 6 Feb 2024 21:18:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 416LIP7t054366; Tue, 6 Feb 2024 21:18:25 GMT (envelope-from git) Date: Tue, 6 Feb 2024 21:18:25 GMT Message-Id: <202402062118.416LIP7t054366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e1735b35e3e4 - main - git-arc: Retain color status messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1735b35e3e4a61f2552fb0a551973066f2bde34 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1735b35e3e4a61f2552fb0a551973066f2bde34 commit e1735b35e3e4a61f2552fb0a551973066f2bde34 Author: Warner Losh AuthorDate: 2024-02-06 21:16:51 +0000 Commit: Warner Losh CommitDate: 2024-02-06 21:16:51 +0000 git-arc: Retain color status messages Newer versions of archanist have an --ansi option to always include the ansi colors when doing an arc list (or any command really). Add this to the arc list that's relevant. Add filter to filter out the 'bolding' though since that interferes with our parsing. This should restore the color output after df834e06bbc7. Fixes: df834e06bbc7 Sponsored by: Netflix Reviewed by: markj, jhb Differential Revision: https://reviews.freebsd.org/D43459 --- tools/tools/git/git-arc.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 316e160abeed..c74577e2d5d7 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -159,12 +159,12 @@ arc_call_conduit() } # -# Filter the output of arc list to remove the warnings as above, as well as any -# stray escape sequences that are in the list (it interferes with the parsing) +# Filter the output of arc list to remove the warnings as above, as well as +# the bolding sequence (the color sequence remains intact). # arc_list() { - arc list "$@" | sed 's/\x1b\[[0-9;]*m//g' | grep -v '^Warning: ' + arc list "$@" | grep -v '^Warning: ' | sed -E 's/\x1b\[1m//g;s/\x1b\[m//g' } diff2phid() @@ -219,7 +219,7 @@ title2diff() local title title=$(echo $1 | sed 's/"/\\"/g') - arc_list | + arc_list --no-ansi | awk -F': ' '{ if (substr($0, index($0, FS) + length(FS)) == "'"$title"'") { print substr($1, match($1, "D[1-9][0-9]*")) @@ -430,7 +430,7 @@ gitarc__list() local chash commit commits diff openrevs title commits=$(build_commit_list "$@") - openrevs=$(arc_list) + openrevs=$(arc_list --ansi) for commit in $commits; do chash=$(git show -s --format='%C(auto)%h' "$commit") @@ -449,7 +449,7 @@ gitarc__list() awk -F'D[1-9][0-9]*: ' \ '{if ($2 == "'"$(echo $title | sed 's/"/\\"/g')"'") print $0}') if [ -z "$diff" ]; then - echo "No Review : $title" + echo "No Review : $title" elif [ "$(echo "$diff" | wc -l)" -ne 1 ]; then echo -n "Ambiguous Reviews: " echo "$diff" | grep -E -o 'D[1-9][0-9]*:' | tr -d ':' \