changeset 729:760074bec012

8011178: improve common/bin/hgforest.sh python detection (MacOS) Reviewed-by: ohair
author mduigou
date Mon, 01 Apr 2013 21:11:51 -0700
parents 26a4456cb19e
children bcbdbcfe7ed8
files common/bin/hgforest.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/bin/hgforest.sh	Tue Mar 26 13:41:36 2013 -0400
+++ b/common/bin/hgforest.sh	Mon Apr 01 21:11:51 2013 -0700
@@ -51,7 +51,7 @@
    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.