From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10418 invoked by alias); 8 Aug 2007 14:22:08 -0000 Received: (qmail 10347 invoked by uid 22791); 8 Aug 2007 14:22:05 -0000 X-Spam-Check-By: sourceware.org Received: from alnrmhc11.comcast.net (HELO alnrmhc11.comcast.net) (206.18.177.51) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 14:22:00 +0000 Received: from lucon.org ([24.6.230.138]) by comcast.net (alnrmhc11) with ESMTP id <20070808142158b1100qvu5ae>; Wed, 8 Aug 2007 14:21:58 +0000 Received: by lucon.org (Postfix, from userid 500) id 018C7F81E8; Wed, 8 Aug 2007 07:21:57 -0700 (PDT) Date: Wed, 08 Aug 2007 14:22:00 -0000 From: "H.J. Lu" To: Ralf Wildenhues , Andreas Schwab , gcc-patches@gcc.gnu.org Subject: Re: PATCH: Report branch/revsion info from "gcc -v" Message-ID: <20070808142157.GA25652@lucon.org> References: <20070730162648.GA11130@lucon.org> <20070730172155.GA11553@lucon.org> <20070730181745.GA11859@lucon.org> <20070806211540.GC7874@ins.uni-bonn.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070806211540.GC7874@ins.uni-bonn.de> User-Agent: Mutt/1.5.14 (2007-02-12) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00509.txt.bz2 On Mon, Aug 06, 2007 at 11:15:41PM +0200, Ralf Wildenhues wrote: > Hello, > > A nit: > > * H.J. Lu wrote on Mon, Jul 30, 2007 at 08:17:45PM CEST: > > --- contrib/gcc_update (revision 127065) > > +++ contrib/gcc_update (working copy) > > @@ -258,8 +258,15 @@ if [ $? -ne 0 ]; then > > exit 1 > > fi > > > > +rm -f LAST_UPDATED gcc/REVISION > > + > > +revision=`svn info | awk '/Revision:/ { print $2 }'` > > +branch=`svn info | sed -ne "/URL:/ { s,.*/gcc/,,g; s,branches/,,; p; }"` > > POSIX sed requires that there be newlines both right after the `{' and > instead of each of the `;' inside the braced commands. No, I don't know > whether there exists an interesting sed implementation that needs this > (but autotools have been cleaned of this issue AFAIK). > > > { > > date > > - echo "`TZ=UTC date` (revision `svnversion .`)" > > + echo "`TZ=UTC date` (revision $revision)" > > } > LAST_UPDATED > Like this? H.J. 2007-08-08 H.J. Lu Andreas Schwab * gcc_update: Use "svn info" for revision number. Create gcc/REVISION with branch name and revision number. Index: contrib/gcc_update =================================================================== --- contrib/gcc_update (revision 127293) +++ contrib/gcc_update (working copy) @@ -255,8 +255,19 @@ if [ $? -ne 0 ]; then exit 1 fi +rm -f LAST_UPDATED gcc/REVISION + +revision=`svn info | awk '/Revision:/ { print $2 }'` +branch=`svn info | sed -ne "/URL:/ {\ +s,.*/gcc/,,g +s,branches/,, +p +}"` { date - echo "`TZ=UTC date` (revision `svnversion .`)" + echo "`TZ=UTC date` (revision $revision)" } > LAST_UPDATED + +echo "[$branch revision $revision]" > gcc/REVISION + touch_files_reexec