Better repo detection for autorevision.sh.

Closes #3096.
master
cybersphinx 2012-02-01 05:18:58 +01:00
parent b8278a8064
commit 17596232cc
1 changed files with 3 additions and 3 deletions

View File

@ -77,12 +77,12 @@ function hgRepo {
}
if [[ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]]; then
if [[ -d .git ]] && [[ ! -z "$(git rev-parse HEAD 2>/dev/null)" ]]; then
gitRepo
elif [[ ! -z "$(hg id 2>/dev/null)" ]]; then
elif [[ -d .hg ]] && [[ ! -z "$(hg root 2>/dev/null)" ]]; then
hgRepo
else
echo "error: No repo detected."
echo "No repo detected."
exit 1
fi