[PATCH 11 of 13 V2 py3 support] run-tests: find mercurial path with syntax valid on both py2 and py3

Augie Fackler raf at durin42.com
Fri Sep 20 09:23:49 CDT 2013


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1379618968 14400
#      Thu Sep 19 15:29:28 2013 -0400
# Node ID 7f550b19c99c2913fe6ae147ba8e1ce793ddd07f
# Parent  12b7e3cb4bac7859201a39179df42cad6511ba1f
run-tests: find mercurial path with syntax valid on both py2 and py3

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()


More information about the Mercurial-devel mailing list