8011178: improve common/bin/hgforest.sh python detection (MacOS)

Reviewed-by: ohair
This commit is contained in:
Mike Duigou 2013-04-01 21:11:51 -07:00
parent ecc23551a5
commit 01ab1da058

View File

@ -51,7 +51,7 @@ if [ "#!" = "$has_hash_bang" ] ; then
bpython="`basename "$python"`"
fi
if [ "python" = "$bpython" -a -x "$python" ] ; then
if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then
hg="${python} -u ${whichhg}"
else
echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.