public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Serge Belyshev <belyshev@depni.sinp.msu.ru>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Iain Sandoe <idsandoe@googlemail.com>,
	Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH v3] gcc_update: use human readable name for revision string in gcc/REVISION
Date: Mon, 6 Sep 2021 11:54:02 +0200	[thread overview]
Message-ID: <20210906095402.GR920497@tucnak> (raw)
In-Reply-To: <87v93eghk1.fsf@depni.sinp.msu.ru>

On Mon, Sep 06, 2021 at 12:49:18PM +0300, Serge Belyshev wrote:
	* gcc_update: derive human readable name for HEAD using git describe

After : start with upper case, ^^^ Derive

	like "git gcc-descr" with short commit hash.  Drop "revision" from gcc/REVISION.

Too long line.

Otherwise LGTM.

> > --- a/contrib/gcc_update
> > +++ b/contrib/gcc_update
> > @@ -332,7 +332,22 @@ case $vcs_type in
> >              exit 1
> >  	fi
> >  
> > -	revision=`$GCC_GIT log -n1 --pretty=tformat:%p:%t:%H`
> > +	# Open-coded version of "git gcc-descr" from contrib/gcc-git-customization.sh
> > +	revision=`$GCC_GIT log -n1 --pretty=tformat:%h`
> > +	r=`$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=`$GCC_GIT config --get gcc-config.upstream`;
> > +		rr=`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=releases/gcc-$rr;
> > +		else
> > +			m=master;
> > +		fi;
> > +		if $GCC_GIT merge-base --is-ancestor HEAD ${o:-origin}/$m; then
> > +			revision=${r}-g${revision};
> > +		fi
> > +	fi
> >  	branch=`$GCC_GIT name-rev --name-only HEAD || :`
> >  	;;    
> >  
> > @@ -414,6 +429,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

	Jakub


  reply	other threads:[~2021-09-06  9:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 19:12 [PATCH] gcc_update: use gcc-descr git alias " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906095402.GR920497@tucnak \
    --to=jakub@redhat.com \
    --cc=belyshev@depni.sinp.msu.ru \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).