# HG changeset patch # User diego # Date 1235517326 0 # Node ID 406b0b7a6dae1170d9fc00b685df22f4d4a0e332 # Parent e170dcb4cfa3d230d54de18e322af4f10e86a4b3 Read revision string from the file snapshot_version if available. This will be used by daily snapshots without Subversion metadata. diff -r e170dcb4cfa3 -r 406b0b7a6dae version.sh --- 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