Patchwork imported patch plan9

login
register
mail settings
Submitter jas@corpus-callosum.com
Date June 4, 2013, 9:55 p.m.
Message ID <876e02936c16211a672c.1370382844@acme.buf.io>
Download mbox | patch
Permalink /patch/1701/
State Rejected, archived
Headers show

Comments

jas@corpus-callosum.com - June 4, 2013, 9:55 p.m.
User-Agent: Mercurial-patchbomb/2.6.1+1-77ac7beae694+20130530
Date: Tue, 04 Jun 2013 16:54:04 -0500
From: Jeff Sickel <jas@corpus-callosum.com>
To: mercurial-devel@selenic.com
Cc: jas@buf.io, quanstro@quanstro.net, sstallion@gmail.com

# HG changeset patch
# User Jeff Sickel <jas@corpus-callosum.com>
# Date 1370288383 18000
#      Mon Jun 03 14:39:43 2013 -0500
# Branch stable
# Node ID 876e02936c16211a672cbc1e8e2edfa8c88565ce
# Parent  cceaf7af4c9e9e6fa2dbfdcfe9856c5da69c4ffd
imported patch plan9
Matt Mackall - June 4, 2013, 10:54 p.m.
On Tue, 2013-06-04 at 16:55 -0500, jas@corpus-callosum.com wrote:
> User-Agent: Mercurial-patchbomb/2.6.1+1-77ac7beae694+20130530
> Date: Tue, 04 Jun 2013 16:54:04 -0500
> From: Jeff Sickel <jas@corpus-callosum.com>
> To: mercurial-devel@selenic.com
> Cc: jas@buf.io, quanstro@quanstro.net, sstallion@gmail.com
> 
> # HG changeset patch
> # User Jeff Sickel <jas@corpus-callosum.com>
> # Date 1370288383 18000
> #      Mon Jun 03 14:39:43 2013 -0500
> # Branch stable
> # Node ID 876e02936c16211a672cbc1e8e2edfa8c88565ce
> # Parent  cceaf7af4c9e9e6fa2dbfdcfe9856c5da69c4ffd
> imported patch plan9

http://mercurial.selenic.com/wiki/ContributingChanges#Patch_descriptions

Patch

diff -r cceaf7af4c9e -r 876e02936c16 contrib/plan9/9mail
--- /dev/null
+++ b/contrib/plan9/9mail
@@ -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 cceaf7af4c9e -r 876e02936c16 contrib/plan9/hgrc.d/9diff.rc
--- a/contrib/plan9/hgrc.d/9diff.rc
+++ b/contrib/plan9/hgrc.d/9diff.rc
@@ -4,4 +4,4 @@ 
 extdiff =
 
 [extdiff]
-9diff = 9diff -cm $parent $child $root
+9diff = /bin/mercurial/9diff -cm $parent $child $root
diff -r cceaf7af4c9e -r 876e02936c16 contrib/plan9/hgrc.d/9mail.rc
--- /dev/null
+++ b/contrib/plan9/hgrc.d/9mail.rc
@@ -0,0 +1,4 @@ 
+# The 9mail to support patchbomb and other email wrappers
+[email]
+method = /bin/mercurial/9mail
+
diff -r cceaf7af4c9e -r 876e02936c16 contrib/plan9/mkfile
--- a/contrib/plan9/mkfile
+++ b/contrib/plan9/mkfile
@@ -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 cceaf7af4c9e -r 876e02936c16 contrib/plan9/proto
--- a/contrib/plan9/proto
+++ b/contrib/plan9/proto
@@ -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 cceaf7af4c9e -r 876e02936c16 hgext/factotum.py
--- a/hgext/factotum.py
+++ b/hgext/factotum.py
@@ -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 cceaf7af4c9e -r 876e02936c16 setup.py
--- a/setup.py
+++ b/setup.py
@@ -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)