(svn r25107) -Change: be slightly more lenient with trying to detect a subversion repository in case someone has a sparse tags checkout. In that case the .svn folder misses from the $ROOT_DIR because it is in the $ROOT_DIR/.. (i.e. tags) folder

This commit is contained in:
rubidium 2013-03-18 06:18:06 +00:00
parent ea34cc631a
commit a9af895fbb
2 changed files with 7 additions and 1 deletions

View File

@ -1012,6 +1012,12 @@ check_params() {
if [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then if [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
log 1 "checking revision... svn detection" 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,
# but only the root folder. Since making tags requires a (sparse) checkout
# 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 elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection" log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then

View File

@ -70,7 +70,7 @@ ROOT_DIR=`pwd`
# Determine if we are using a modified version # Determine if we are using a modified version
# Assume the dir is not modified # Assume the dir is not modified
MODIFIED="0" MODIFIED="0"
if [ -d "$ROOT_DIR/.svn" ]; then if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
# We are an svn checkout # We are an svn checkout
if [ -n "`svnversion | grep 'M'`" ]; then if [ -n "`svnversion | grep 'M'`" ]; then
MODIFIED="2" MODIFIED="2"