Patchwork plan9: update util.py for cpython 2.7 build

login
register
mail settings
Submitter jas@corpus-callosum.com
Date Sept. 13, 2013, 8:46 p.m.
Message ID <9fd088ed9cf59542387d.1379105211@acme.buf.io>
Download mbox | patch
Permalink /patch/2444/
State Accepted
Commit dfefb719eb92ed6cb72a2101db9ea5ccb70650fa
Headers show

Comments

jas@corpus-callosum.com - Sept. 13, 2013, 8:46 p.m.
# HG changeset patch
# User Jeff Sickel <jas@corpus-callosum.com>
# Date 1379104804 18000
#      Fri Sep 13 15:40:04 2013 -0500
# Node ID 9fd088ed9cf59542387d09fac002d5ffc1ab0e74
# Parent  3de0893bdd5e12e91169bb820e49ead77940b877
plan9: update util.py for cpython 2.7 build
Matt Mackall - Sept. 14, 2013, 11:28 p.m.
On Fri, 2013-09-13 at 15:46 -0500, Jeff Sickel wrote:
> # HG changeset patch
> # User Jeff Sickel <jas@corpus-callosum.com>
> # Date 1379104804 18000
> #      Fri Sep 13 15:40:04 2013 -0500
> # Node ID 9fd088ed9cf59542387d09fac002d5ffc1ab0e74
> # Parent  3de0893bdd5e12e91169bb820e49ead77940b877
> plan9: update util.py for cpython 2.7 build

Queued for default with a line length fix, thanks. Please run check-code
in the future.
jas@corpus-callosum.com - Jan. 2, 2014, 7:14 p.m.
On Sep 14, 2013, at 6:28 PM, Matt Mackall <mpm@selenic.com> wrote:

> On Fri, 2013-09-13 at 15:46 -0500, Jeff Sickel wrote:
>> # HG changeset patch
>> # User Jeff Sickel <jas@corpus-callosum.com>
>> # Date 1379104804 18000
>> #      Fri Sep 13 15:40:04 2013 -0500
>> # Node ID 9fd088ed9cf59542387d09fac002d5ffc1ab0e74
>> # Parent  3de0893bdd5e12e91169bb820e49ead77940b877
>> plan9: update util.py for cpython 2.7 build
> 
> Queued for default with a line length fix, thanks. Please run check-code
> in the future.

I’ve noticed that this patch didn’t make it into stable for the
2.8.x releases.  Without it the new Plan 9 builds succeed, but
fail to generate the mercurial/__version__.py file:


% python setup.py
stderr from '/bin/python hg log -r . --template {tags}
':
  <open file '<fdopen>', mode 'rb' at 0x5A2390>
stderr from '/bin/python hg id -i':
  <open file '<fdopen>', mode 'rb' at 0x5A2498>
stderr from '/bin/python hg parents --template {latesttag}+{latesttagdistance}-':
  <open file '<fdopen>', mode 'rb' at 0x5A25A0>
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied
Matt Mackall - Jan. 31, 2014, 7:48 a.m.
On Thu, 2014-01-02 at 13:14 -0600, Jeff Sickel wrote:
> On Sep 14, 2013, at 6:28 PM, Matt Mackall <mpm@selenic.com> wrote:
> 
> > On Fri, 2013-09-13 at 15:46 -0500, Jeff Sickel wrote:
> >> # HG changeset patch
> >> # User Jeff Sickel <jas@corpus-callosum.com>
> >> # Date 1379104804 18000
> >> #      Fri Sep 13 15:40:04 2013 -0500
> >> # Node ID 9fd088ed9cf59542387d09fac002d5ffc1ab0e74
> >> # Parent  3de0893bdd5e12e91169bb820e49ead77940b877
> >> plan9: update util.py for cpython 2.7 build
> > 
> > Queued for default with a line length fix, thanks. Please run check-code
> > in the future.
> 
> I’ve noticed that this patch didn’t make it into stable for the
> 2.8.x releases.  Without it the new Plan 9 builds succeed, but
> fail to generate the mercurial/__version__.py file:

This patch is present as:

changeset:   19729:dfefb719eb92
user:        Jeff Sickel <jas@corpus-callosum.com>
date:        Fri Sep 13 15:40:04 2013 -0500
summary:     plan9: update util.py for cpython 2.7 build

Patch

diff -r 3de0893bdd5e -r 9fd088ed9cf5 mercurial/util.py
--- a/mercurial/util.py	Mon Aug 12 17:48:27 2013 -0500
+++ b/mercurial/util.py	Fri Sep 13 15:40:04 2013 -0500
@@ -465,7 +465,7 @@ 
         return str(val)
     origcmd = cmd
     cmd = quotecommand(cmd)
-    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:
         if not cwd is None: