public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc_update: use gcc-descr git alias for revision string in gcc/REVISION
@ 2021-07-15 19:12 Serge Belyshev
  2021-07-16  7:06 ` Richard Biener
  0 siblings, 1 reply; 16+ messages in thread
From: Serge Belyshev @ 2021-07-15 19:12 UTC (permalink / raw)
  To: gcc-patches

This is to make development version string more readable, and
to simplify navigation through gcc-testresults.

Currently gcc_update uses git log --pretty=tformat:%p:%t:%H to
generate version string, which is somewhat excessive since conversion
to git because commit hashes are now stable.

Even better, gcc-git-customization.sh script provides gcc-descr alias
which makes prettier version string, and thus use it instead (or just
abbreviated commit hash when the alias is not available).

Before: [master revision b25edf6e6fe:e035f180ebf:7094a69bd62a14dfa311eaa2fea468f221c7c9f3]
After: [master r12-2331]

OK for mainline?

contrib/Changelog:

	* gcc_update: Use gcc-descr alias for revision string if it exists, or
	abbreviated commit hash instead. Drop "revision" from gcc/REVISION.
---
 contrib/gcc_update | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/gcc_update b/contrib/gcc_update
index 80fac9fc995..8f712e37616 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -332,7 +332,7 @@ case $vcs_type in
             exit 1
 	fi
 
-	revision=`$GCC_GIT log -n1 --pretty=tformat:%p:%t:%H`
+	revision=`$GCC_GIT gcc-descr || $GCC_GIT log -n1 --pretty=tformat:%h`
 	branch=`$GCC_GIT name-rev --name-only HEAD || :`
 	;;    
 
@@ -414,6 +414,6 @@ rm -f LAST_UPDATED gcc/REVISION
     date
     echo "`TZ=UTC date` (revision $revision)"
 } > LAST_UPDATED
-echo "[$branch revision $revision]" > gcc/REVISION
+echo "[$branch $revision]" > gcc/REVISION
 
 touch_files_reexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-09-06 13:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 19:12 [PATCH] gcc_update: use gcc-descr git alias for revision string in gcc/REVISION Serge Belyshev
2021-07-16  7:06 ` Richard Biener
2021-07-16  7:29   ` Jakub Jelinek
2021-07-16  9:22     ` Richard Biener
2021-07-16  9:36       ` Jakub Jelinek
2021-07-16  9:39         ` Richard Biener
2021-07-16 10:37           ` [PATCH v2] gcc_update: use human readable name " Serge Belyshev
2021-07-19 10:39             ` Richard Biener
2021-07-19 10:47               ` Iain Sandoe
2021-07-19 11:09                 ` Jakub Jelinek
2021-07-19 11:23                   ` [PATCH v3] " Serge Belyshev
2021-09-06  9:49                     ` Serge Belyshev
2021-09-06  9:54                       ` Jakub Jelinek
2021-09-06 13:01                         ` Serge Belyshev
2021-07-19 13:53     ` [PATCH] gcc_update: use gcc-descr git alias " Richard Earnshaw
2021-07-19 14:09       ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).