Btrfs: Fix version.sh when used outside of an hg repo
authorChris Mason <chris.mason@oracle.com>
Tue, 29 Jul 2008 20:11:35 +0000 (16:11 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:05 +0000 (11:04 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/version.sh

index fd9b53d398602fac7bdea67597b5843b5f544d63..4d06497d2ec55236e411ed27e99cc6d207ea35db 100644 (file)
@@ -6,10 +6,10 @@
 # Copyright 2008, Oracle
 # Released under the GNU GPLv2
  
-v="Btrfs v0.15"
+v="v0.15"
 
 which hg > /dev/null
-if [ $? == 0 ]; then
+if [ -d .hg ] && [ $? == 0 ]; then
        last=$(hg tags | grep -m1 -o '^v[0-9.]\+')
         
        # now check if the repo has commits since then...