[PATCH] plan9 updates for new cpython fork

Augie Fackler raf at durin42.com
Tue Jul 16 10:16:40 CDT 2013


On Mon, Jul 15, 2013 at 12:04:10PM -0500, Jeff Sickel wrote:
> plan9: support new cpython fork for Plan 9
>
> A new CPython fork has been created at http://bitbucket.org/jas/cpython
> specifically to update the Plan 9 Python version to v2.7.5 and add new
> architectures beyond 386.  The new Python v2.7.5 port supports a more
> typical `python setup.py` configuration which allows us to modify the
> mercurial build process for the platform.

I see at least 4 patches here:

1) 9mail: new script to add support for upas/marshal
2) 9diff: update path to 9diff for $REASON
3) plan9: update setup.py and mkfile to support new cpython
4) factotum: not sure offhand what this patch is

Please split the commit into more workable chunks along lines like
this and resend the series. Thanks!

>
>
>
> # HG changeset patch
> # User Jeff Sickel <jas at corpus-callosum.com>
> # Date 1373318098 18000
> #      Mon Jul 08 16:14:58 2013 -0500
> # Branch stable
> # Node ID 09613e3b3a179c026658398fb12e6b4016434d85
> # Parent  009794acc6e37a650f0fae37872e733382ac1c0c
> imported patch plan9
>
> diff -r 009794acc6e3 -r 09613e3b3a17 contrib/plan9/9mail
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/contrib/plan9/9mail	Mon Jul 08 16:14:58 2013 -0500
> @@ -0,0 +1,26 @@
> +#!/bin/rc
> +# 9mail - Mercurial email wrapper for upas/marshal
> +
> +fn usage {
> +	echo >[1=2] usage: mercurial/9mail -f from to [cc]
> +	exit usage
> +}
> +
> +from=()
> +cc=()
> +to=()
> +
> +switch($1){
> +case -f
> +	from=$2
> +case *
> +	usage
> +}
> +
> +to=($3)
> +if(~ $#* 4)
> +	cc=(-C $4)
> +
> +upasname=$from
> +upas/marshal $cc $to
> +
> diff -r 009794acc6e3 -r 09613e3b3a17 contrib/plan9/hgrc.d/9diff.rc
> --- a/contrib/plan9/hgrc.d/9diff.rc	Mon Jul 01 11:09:29 2013 -0300
> +++ b/contrib/plan9/hgrc.d/9diff.rc	Mon Jul 08 16:14:58 2013 -0500
> @@ -4,4 +4,4 @@
>  extdiff =
>
>  [extdiff]
> -9diff = 9diff -cm $parent $child $root
> +9diff = /bin/mercurial/9diff -cm $parent $child $root
> diff -r 009794acc6e3 -r 09613e3b3a17 contrib/plan9/hgrc.d/9mail.rc
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/contrib/plan9/hgrc.d/9mail.rc	Mon Jul 08 16:14:58 2013 -0500
> @@ -0,0 +1,4 @@
> +# The 9mail to support patchbomb and other email wrappers
> +[email]
> +method = /bin/mercurial/9mail
> +
> diff -r 009794acc6e3 -r 09613e3b3a17 contrib/plan9/mkfile
> --- a/contrib/plan9/mkfile	Mon Jul 01 11:09:29 2013 -0300
> +++ b/contrib/plan9/mkfile	Mon Jul 08 16:14:58 2013 -0500
> @@ -3,8 +3,6 @@
>
>  PYTHON=python
>  PYTHONBIN=/rc/bin
> -SH=ape/psh
> -
>  PURE=--pure
>  ROOT=../..
>
> @@ -15,23 +13,28 @@
>  build:VQ:
>       @{
>               cd $ROOT
> -		$SH -c '$PYTHON setup.py $PURE build_py build_scripts'
> +		$PYTHON setup.py $PURE build_py build_scripts
>       }
>
>  clean:VQ:
>       @{
>               cd $ROOT
> -		$SH -c '$PYTHON setup.py $PURE clean --all'
> +		$PYTHON setup.py $PURE clean --all
> +		rm -f */*.pyc
> +		rm mercurial/__version__.py
>       }
>
>  install:VQ:	build
>       @{
>               cd $ROOT
> -		$SH -c '$PYTHON setup.py $PURE install \
> +		$PYTHON setup.py $PURE install \
> +			--prefix /sys \
>                       --install-scripts $PYTHONBIN \
>                       --skip-build \
> -			--force'
> +			--force
>       }
>       mkdir -p /lib/mercurial/hgrc.d
> -	dircp hgrc.d /lib/mercurial/hgrc.d/
> -	cp 9diff /rc/bin/
> +	mkdir -p /rc/bin/mercurial
> +	dircp hgrc.d /lib/mercurial/hgrc.d
> +	cp -x 9diff /rc/bin/mercurial
> +	cp -x 9mail /rc/bin/mercurial
> diff -r 009794acc6e3 -r 09613e3b3a17 contrib/plan9/proto
> --- a/contrib/plan9/proto	Mon Jul 01 11:09:29 2013 -0300
> +++ b/contrib/plan9/proto	Mon Jul 08 16:14:58 2013 -0500
> @@ -5,19 +5,20 @@
>                       factotum.rc	- sys sys
>  rc	- sys sys
>       bin	- sys sys
> -		9diff	- sys sys
> +		mercurial - sys sys
> +			9diff	- sys sys
> +			9mail	- sys sys
>               hg	- sys sys
>  sys	- sys sys
>       lib	- sys sys
> -		python	- sys sys
> +		python2.7	- sys sys
>                       lib	- sys sys
> -				python2.5	- sys sys
> -					site-packages	- sys sys
> -						hgext	- sys sys
> -							+	- sys sys
> -						mercurial	- sys sys
> -							+	- sys sys
> -						mercurial-VERSION-py2.5.egg-info	- sys sys
> +				site-packages	- sys sys
> +					hgext	- sys sys
> +						+	- sys sys
> +					mercurial	- sys sys
> +						+	- sys sys
> +						mercurial-VERSION-py2.7.egg-info	- sys sys
>       src	- sys sys
>               cmd	- sys sys
>                       hg	- sys sys
> diff -r 009794acc6e3 -r 09613e3b3a17 hgext/factotum.py
> --- a/hgext/factotum.py	Mon Jul 01 11:09:29 2013 -0300
> +++ b/hgext/factotum.py	Mon Jul 08 16:14:58 2013 -0500
> @@ -101,7 +101,7 @@
>          user, passwd = auth.get('username'), auth.get('password')
>      if not user or not passwd:
>          if not prefix:
> -            prefix = '*'
> +            prefix = realm.split(' ')[0].lower()
>          params = 'service=%s prefix=%s' % (_service, prefix)
>          if user:
>              params = '%s user=%s' % (params, user)
> diff -r 009794acc6e3 -r 09613e3b3a17 setup.py
> --- a/setup.py	Mon Jul 01 11:09:29 2013 -0300
> +++ b/setup.py	Mon Jul 08 16:14:58 2013 -0500
> @@ -129,7 +129,7 @@
>      py2exeloaded = False
>
>  def runcmd(cmd, env):
> -    if sys.platform == 'plan9':
> +    if sys.platform == 'plan9' and (sys.version_info[0] == 2 and sys.version_info[1] < 7):
>          # subprocess kludge to work around issues in half-baked Python
>          # ports, notably bichued/python:
>          _, out, err = os.popen3(cmd)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list