1. Pypy
  2. Untitled project
  3. pypy

Commits

Brian Kearns  committed be67791

backout 7bf65ca5bf56 for python 2.6 compat

  • Participants
  • Parent commits 63be88a
  • Branches default

Comments (0)

Files changed (2)

File pypy/doc/test/test_whatsnew.py

View file
 import py
 import pypy
-from subprocess import check_output
+from commands import getoutput
 ROOT = py.path.local(pypy.__file__).dirpath().dirpath()
 
 
                       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
 

File pypy/tool/clean_old_branches.py

View file
 
 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: