4 [ -n "$TOPDIR" ] && cd $TOPDIR
7 [ -f version
] ||
return 1
13 [ -d .svn
] ||
return 1
14 REV
="$(svn info -r COMMITTED | awk '/^Revision:/ { print $2 }')"
20 [ -d .git
] ||
return 1
21 REV
="$(git log | grep -m 1 git-svn-id | awk '{ gsub(/.*@/, "", $2); print $2 }')"
27 [ -d .hg
] ||
return 1
28 REV
="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')"
33 try_version || try_svn || try_git || try_hg || REV
="unknown"