Author: Brian Kearns <[email protected]>
Branch:
Changeset: r60652:be67791c3bb2
Date: 2013-01-29 01:49 -0500
http://bitbucket.org/pypy/pypy/changeset/be67791c3bb2/
Log: backout 7bf65ca5bf56 for python 2.6 compat
diff --git a/pypy/doc/test/test_whatsnew.py b/pypy/doc/test/test_whatsnew.py
--- a/pypy/doc/test/test_whatsnew.py
+++ b/pypy/doc/test/test_whatsnew.py
@@ -1,6 +1,6 @@
import py
import pypy
-from subprocess import check_output
+from commands import getoutput
ROOT = py.path.local(pypy.__file__).dirpath().dirpath()
@@ -29,8 +29,8 @@
merge() and \
branch(default)) and \
not branch(default)' % (startrev, endrev)
- cmd = ['hg', 'log', '-R', str(path), '-r', revset, '--template',
'{branches}\n']
- out = check_output(cmd)
+ cmd = r'hg log -R "%s" -r "%s" --template "{branches}\n"' % (path, revset)
+ out = getoutput(cmd)
branches = set(map(str.strip, out.splitlines()))
return branches
diff --git a/pypy/tool/clean_old_branches.py b/pypy/tool/clean_old_branches.py
--- a/pypy/tool/clean_old_branches.py
+++ b/pypy/tool/clean_old_branches.py
@@ -6,15 +6,15 @@
import os
import sys
-import subprocess
+import commands
if not os.path.isdir('.hg'):
print 'Must run this script from the top-level directory.'
sys.exit(1)
def heads():
- result = subprocess.check_output(
- ['hg', 'heads', '--topo', '--closed', '--template',
'{node|short}:{branches}:{extras}\n'])
+ result = commands.getoutput(
+ "hg heads --topo --closed --template
'{node|short}:{branches}:{extras}\n'")
result = result.splitlines(False)
result = [s.split(':', 2) for s in result]
for line in result:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit