common/bin/hgforest.sh

changeset 679
760074bec012
parent 645
5b0b6ef58dbf
child 681
7320922b694e
equal deleted inserted replaced
678:26a4456cb19e 679:760074bec012
49 if [ "#!" = "$has_hash_bang" ] ; then 49 if [ "#!" = "$has_hash_bang" ] ; then
50 python="`head -n 1 ${whichhg} | cut -b 3-`" 50 python="`head -n 1 ${whichhg} | cut -b 3-`"
51 bpython="`basename "$python"`" 51 bpython="`basename "$python"`"
52 fi 52 fi
53 53
54 if [ "python" = "$bpython" -a -x "$python" ] ; then 54 if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then
55 hg="${python} -u ${whichhg}" 55 hg="${python} -u ${whichhg}"
56 else 56 else
57 echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout. 57 echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
58 hg="hg" 58 hg="hg"
59 fi 59 fi

mercurial