From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id A0F69394343F for ; Mon, 19 Jul 2021 10:47:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0F69394343F Received: by mail-wm1-x335.google.com with SMTP id o30-20020a05600c511eb029022e0571d1a0so10185041wms.5 for ; Mon, 19 Jul 2021 03:47:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cdEcs3NKiod5X83N1ZQT8cnLpRpSC4N/bmer4iWca8s=; b=YKJfkvIzX2JpM7wMcazOR2r6fSj6SDO5XQDTEinIGsbUjzyibbfri5g+MAKC4CHPMF hYw321l/Mv1vlXoyFfctEaV9EtCknO603A/3QS5GbbAg7Yna0hmLQr3uE21kB4ABwB3v KFxkVKShUnPWtqDA16C3uusFGUJbeskGJC1vn+nykywrivMDt5/m+YoiIPJmUBNkaEKW knuvFiHubK9vfPM8H/yHtq0030Ra0NUs7pT6nOUv1YaOqFwJWntbh7GF+6+m9rZCP+Km CTGTqOIqqF7qsTAlUM5g/Bic37Tfxl/3lVuPyToDeIvuGyXvOKlJWEgTYZinaDwVcYZ8 92LQ== X-Gm-Message-State: AOAM5326ueSHRapM8RKA7sKdFtuULwB+edOApZ0HP+ftTR4SYKhJSJRk RgM3p8pQ6WHR1QF9lYkSGvQ= X-Google-Smtp-Source: ABdhPJxb3cZXOP+XA4rxlg722FCvVHX2olc1oygTXl6NjSJQKWgR5NN6K/koL/0l2aYs0xfxNSp5Gw== X-Received: by 2002:a7b:cb93:: with SMTP id m19mr32204752wmi.131.1626691623529; Mon, 19 Jul 2021 03:47:03 -0700 (PDT) Received: from [192.168.1.214] (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id z7sm15424630wmp.34.2021.07.19.03.47.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jul 2021 03:47:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v2] gcc_update: use human readable name for revision string in gcc/REVISION From: Iain Sandoe In-Reply-To: Date: Mon, 19 Jul 2021 11:47:01 +0100 Cc: Serge Belyshev , Jakub Jelinek , GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: References: <878s271je5.fsf@depni.sinp.msu.ru> <20210716072941.GC2380545@tucnak> <20210716093608.GF2380545@tucnak> <8735se1r4b.fsf_-_@depni.sinp.msu.ru> To: Richard Biener X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2021 10:47:06 -0000 > On 19 Jul 2021, at 11:39, Richard Biener via Gcc-patches = wrote: >=20 > On Fri, Jul 16, 2021 at 12:37 PM Serge Belyshev > wrote: >>=20 >> Based on discussion I've chosen open-coded version without commit = hash. >=20 > As said I'd prefer one with (shortened) hash, Likewise, I=E2=80=99ve been using a local change to produce = =E2=80=9Cr12-2447-gcca1e30db142=E2=80=9D since soon after change; I suspect that 12 digits is =E2=80=98enough=E2=80=99. It makes = it easier for the folks who want to find by=20 SHA1 as well as folks who want to find by revision number. > but then I'm not angry > if people agree on sth else. also likewise=E2=80=A6 >=20 >>>>>> ... Perhaps rename the r, o, rr and m temporaries. >>=20 >> I like it better with short names, there is no other code in that >> script to clash with. (Also, two adjacent case branches for hg and = svn >> are essentialy dead now). >>=20 >>>> ... Perhaps also replace both HEAD occurences with $revision >>=20 >> not sure about that: should not they be exactly equivalent in all = cases? >>=20 >> --- >> gcc_update: use human readable name for revision string in = gcc/REVISION >>=20 >> contrib/Changelog: >>=20 >> * gcc_update: derive human readable name for HEAD using git = describe >> like "git gcc-descr" does. Drop "revision" from gcc/REVISION. >> --- >> contrib/gcc_update | 19 +++++++++++++++++-- >> 1 file changed, 17 insertions(+), 2 deletions(-) >>=20 >> diff --git a/contrib/gcc_update b/contrib/gcc_update >> index 80fac9fc995..558926b3a2d 100755 >> --- a/contrib/gcc_update >> +++ b/contrib/gcc_update >> @@ -332,7 +332,22 @@ case $vcs_type in >> exit 1 >> fi >>=20 >> - revision=3D`$GCC_GIT log -n1 --pretty=3Dtformat:%p:%t:%H` >> + # Open-coded version of "git gcc-descr" from = contrib/gcc-git-customization.sh >> + revision=3D`$GCC_GIT log -n1 --pretty=3Dtformat:%h` >> + r=3D`$GCC_GIT describe --all --match 'basepoints/gcc-[0-9]*' = HEAD \ >> + | sed -n = 's,^\(tags/\)\?basepoints/gcc-\([0-9]\+\)-\([0-9]\+\)-g[0-9a-f]*$,r\2-\3,p= ;s,^\(tags/\)\?basepoints/gcc-\([0-9]\+\)$,r\2-0,p'`; >> + if test -n $r; then >> + o=3D`$GCC_GIT config --get gcc-config.upstream`; >> + rr=3D`echo $r | sed -n = 's,^r\([0-9]\+\)-[0-9]\+\(-g[0-9a-f]\+\)\?$,\1,p'`; >> + if $GCC_GIT rev-parse --verify --quiet = ${o:-origin}/releases/gcc-$rr >/dev/null; then >> + m=3Dreleases/gcc-$rr; >> + else >> + m=3Dmaster; >> + fi; >> + if $GCC_GIT merge-base --is-ancestor HEAD = ${o:-origin}/$m; then >> + revision=3D$r; >> + fi >> + fi >> branch=3D`$GCC_GIT name-rev --name-only HEAD || :` >> ;; >>=20 >> @@ -414,6 +429,6 @@ rm -f LAST_UPDATED gcc/REVISION >> date >> echo "`TZ=3DUTC date` (revision $revision)" >> } > LAST_UPDATED >> -echo "[$branch revision $revision]" > gcc/REVISION >> +echo "[$branch $revision]" > gcc/REVISION >>=20 >> touch_files_reexec