RFR : 80111342 : hgforest.sh : 'python --version' not supported on older python
Brad Wetmore
bradford.wetmore at oracle.com
Tue Apr 2 22:18:18 UTC 2013
Approved, thanks Mike!
Brad
On 4/2/2013 3:00 PM, Mike Duigou wrote:
> Hello all;
>
> Brad Wetmore noticed that yesterday's fix for 8011178 did not work on older versions of python which lack support for the --version long option. Enclosed is a patch which uses the more widely supported -V option instead.
>
> Mike
>
> diff -r 760074bec012 common/bin/hgforest.sh
> --- a/common/bin/hgforest.sh Mon Apr 01 21:11:51 2013 -0700
> +++ b/common/bin/hgforest.sh Tue Apr 02 14:53:47 2013 -0700
> @@ -51,7 +51,7 @@
> bpython="`basename "$python"`"
> fi
>
> -if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then
> +if [ -x "$python" -a ! -d "$python" -a "`${python} -V 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.
>
More information about the build-dev
mailing list