summaryrefslogtreecommitdiff
path: root/findversion.sh
diff options
context:
space:
mode:
Diffstat (limited to 'findversion.sh')
-rwxr-xr-xfindversion.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/findversion.sh b/findversion.sh
index 94e48413e..2e542cae4 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -112,6 +112,11 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
HASH=`LC_ALL=C hg id -i | cut -c1-12`
REV="h`echo $HASH | cut -c1-8`"
BRANCH=`hg branch | sed 's@^default$@@'`
+ TAG=`hg id -t`
+ if [ -n "$TAG" ] && [ $TAG != "tip" ]; then
+ BRANCH=""
+ REV=$TAG
+ fi
REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc}\n" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
# We are an exported source bundle