summaryrefslogtreecommitdiff
path: root/tools/version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/version.sh')
-rwxr-xr-xtools/version.sh26
1 files changed, 0 insertions, 26 deletions
diff --git a/tools/version.sh b/tools/version.sh
index 04c7651192..a1535aafc4 100755
--- a/tools/version.sh
+++ b/tools/version.sh
@@ -60,30 +60,6 @@ gitversion() {
60 fi 60 fi
61} 61}
62 62
63# Work out the latest svn id and also the latest bzr revno
64bzrversion() {
65
66 # look for a svn revno in the current head
67 svnver=`LANG=C bzr log -l1 $1 | grep '^ *svn revno: ' | cut -d : -f2 | cut -d ' ' -f 2`
68
69 if [ -n "$svnver" ]; then
70 # current head is a svn version so we don't care about bzr
71 version="r$svnver"
72 else
73 # look for a svn revno anywhere in history including in merges
74 svnver=`LANG=C bzr log -n0 $1 | grep '^ *svn revno: ' | head -n 1 | cut -d : -f2 | cut -d ' ' -f 2`
75 if [ -n "$svnver" ]; then
76 version="r$svnver+bzr`bzr revno $1`"
77 else
78 version="bzr`bzr revno $1`"
79 fi
80 fi
81 if ! bzr diff $1 >/dev/null; then
82 mod="M"
83 fi
84 echo "${version}${mod}"
85}
86
87# 63#
88# First locate the top of the src tree (passed in usually) 64# First locate the top of the src tree (passed in usually)
89# 65#
@@ -98,8 +74,6 @@ if [ -z $VERSION ]; then
98 # Ok, we need to derive it from the Version Control system 74 # Ok, we need to derive it from the Version Control system
99 if [ -d "$TOP/.git" ]; then 75 if [ -d "$TOP/.git" ]; then
100 VER=`gitversion $TOP` 76 VER=`gitversion $TOP`
101 elif [ -d "$TOP/.bzr" ]; then
102 VER=`bzrversion $TOP`
103 else 77 else
104 VER=`svnversion_safe $TOP`; 78 VER=`svnversion_safe $TOP`;
105 if [ "$VER" = "unknown" ]; then 79 if [ "$VER" = "unknown" ]; then