This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc_release script, snapshots, and LAST_UPDATED version


I've been reviewing the maintainer-scripts/gcc_release shell script
for use in making gupc snapshots, and noticed that it may be using the
wrong svn revision number when updating the LAST_CHANGED file.

Here's the code:

   SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'`
   [...]
   echo "Obtained from SVN: ${SVNBRANCH} revision ${SVNREV}" > LAST_UPDATED

If we take a recent 4.5 snapshot as an example, we see the following:

$ cat gcc-core-4.5-20101216/LAST_UPDATED
Obtained from SVN: branches/gcc-4_5-branch revision 167957

If we obtain the info on that branch revision, we see
the following:

   svn info -r167957 file:///svn/gcc/branches/gcc-4_5-branch
   Path: gcc-4_5-branch
   URL: file:///svn/gcc/branches/gcc-4_5-branch
   Repository Root: file:///svn/gcc
   Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
   Revision: 167957
   Node Kind: directory
   Last Changed Author: rguenth
   Last Changed Rev: 167948
   Last Changed Date: 2010-12-16 06:34:03 -0800 (Thu, 16 Dec 2010)

Trying to query that rev. on the 4.5 branch turns up nothing:
   $ svn log -r167957 file:///svn/gcc/branches/gcc-4_5-branch | head -20
But, as expected, querying the last changed rev. works just fine.
   $ svn log -r167948 file:///svn/gcc/branches/gcc-4_5-branch | head -20

Based on the discussion above, I think that the following change
would generate the correct version number in LAST_UPDATED:

   Index: maintainer-scripts/gcc_release
   ===================================================================
   --- maintainer-scripts/gcc_release      (revision 168012)
   +++ maintainer-scripts/gcc_release      (working copy)
   @@ -167,7 +167,7 @@ EOF
	  error "Could not tag sources"
	SVNBRANCH=${TAG}
      fi
   -  SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'`
   +  SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/^Last Changed Rev:/ {print $4}'`
    
      # Export the current sources.
      inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH})"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]