setlocalversion: print correct subversion revision
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 2 Dec 2008 20:58:05 +0000 (21:58 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 3 Dec 2008 21:58:29 +0000 (22:58 +0100)
Output svn revision of latest change, instead of repo revision as thats
what we're interested in (especially when working on a branch/tag).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/setlocalversion

index 72d2335..81d984b 100755 (executable)
@@ -51,7 +51,7 @@ if hgid=`hg id 2>/dev/null`; then
 fi
 
 # Check for svn and a svn repo.
-if rev=`svn info 2>/dev/null | grep '^Revision'`; then
+if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
        rev=`echo $rev | awk '{print $NF}'`
        changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l`