Version detection: re-order SVN and Hg after git and .ottdrev-vc

This commit is contained in:
Jonathan G Rennison
2015-12-09 23:54:58 +00:00
parent 69f3844d2e
commit 6a780ffde2
2 changed files with 38 additions and 38 deletions

View File

@@ -1052,7 +1052,11 @@ check_params() {
fi
fi
if [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
if [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then
log 1 "checking revision... source release version"
elif [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
log 1 "checking revision... svn detection"
elif [ -d "$ROOT_DIR/../.svn" ] && [ -n "`svn help 2>/dev/null`" ] && [ -n "`LC_ALL=C svn info $ROOT_DIR/.. | grep '^URL:.*tags$'`" ]; then
# subversion changed its behaviour; now not all folders have a .svn folder,
@@ -1060,12 +1064,8 @@ check_params() {
# of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)"
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection"
elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then
log 1 "checking revision... source release version"
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
log 1 "checking revision... source tarball"
else