common/bin/hgforest.sh

changeset 684
4c13b7994f38
parent 682
575f2ca947ab
child 790
6d7f27953da6
child 889
1378ccca1c79
     1.1 --- a/common/bin/hgforest.sh	Thu Apr 11 09:39:46 2013 -0700
     1.2 +++ b/common/bin/hgforest.sh	Tue Apr 16 08:10:59 2013 -0700
     1.3 @@ -30,7 +30,7 @@
     1.4  # Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
     1.5  # until a lot of time has passed! By passing -u to python, we get incremental updates
     1.6  # on stdout. Much nicer.
     1.7 -whichhg="`which hg`"
     1.8 +whichhg="`which hg 2> /dev/null | grep -v '^no hg in'`"
     1.9  
    1.10  if [ "${whichhg}" = "" ] ; then
    1.11    echo Cannot find hg!
    1.12 @@ -51,7 +51,7 @@
    1.13     bpython="`basename "$python"`"
    1.14  fi
    1.15  
    1.16 -if [ "python" = "$bpython" -a -x "$python" ] ; then
    1.17 +if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d ' '`" = "Python" ] ; then
    1.18    hg="${python} -u ${whichhg}"
    1.19  else
    1.20    echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.

mercurial