Browse code

Read "Last Changed Rev" field instead of "Revision" field to avoid being affected by changes in other directories (such as branches).

Originally committed as revision 21252 to svn://svn.ffmpeg.org/ffmpeg/trunk

Ramiro Polla authored on 2010/01/17 03:29:52
Showing 1 changed files
... ...
@@ -2,8 +2,8 @@
2 2
 
3 3
 # check for SVN revision number
4 4
 revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
5
-test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
6
-test $revision || revision=$(cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
5
+test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4)
6
+test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2)
7 7
 test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n
8 8
 p
9 9
 q