changeset 28693:406b0b7a6dae

Read revision string from the file snapshot_version if available. This will be used by daily snapshots without Subversion metadata.
author diego
date Tue, 24 Feb 2009 23:15:26 +0000
parents e170dcb4cfa3
children f04e62bba9ef
files version.sh
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/version.sh	Tue Feb 24 23:01:06 2009 +0000
+++ b/version.sh	Tue Feb 24 23:15:26 2009 +0000
@@ -2,7 +2,10 @@
 
 test "$1" && extra="-$1"
 
-svn_revision=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
+# Extract revision number from file used by daily tarball snapshots
+# or from the places different Subversion versions have it.
+svn_revision=$(cat snapshot_version 2> /dev/null)
+test $svn_revision || svn_revision=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
 test $svn_revision || svn_revision=$(grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
 test $svn_revision || svn_revision=$(sed -n -e '/^dir$/{n;p;q;}' .svn/entries 2>/dev/null)
 test $svn_revision || svn_revision=UNKNOWN