Patchwork [3,of,5,RFC,py3,support] run-tests: find mercurial path with syntax valid on both py2 and py3

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2013, 8:08 p.m.
Message ID <2870d243f30b33a807d2.1379621292@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/2543/
State Superseded
Headers show

Comments

Augie Fackler - Sept. 19, 2013, 8:08 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1379618968 14400
#      Thu Sep 19 15:29:28 2013 -0400
# Node ID 2870d243f30b33a807d2e9854f6ee4b9db24f7cd
# Parent  34cc5cc44a9fabc463b52834b0a667f27bb156aa
run-tests: find mercurial path with syntax valid on both py2 and py3

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1048,7 +1048,7 @@ 
     if _hgpath is not None:
         return _hgpath
 
-    cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
+    cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"'
     pipe = os.popen(cmd % PYTHON)
     try:
         _hgpath = pipe.read().strip()