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

login
register
mail settings
Submitter Augie Fackler
Date Sept. 20, 2013, 2:23 p.m.
Message ID <7f550b19c99c2913fe6a.1379687029@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/2558/
State Accepted
Commit 1b8054b98d6888eca2329ea1a12578c9af2f3a7c
Headers show

Comments

Augie Fackler - Sept. 20, 2013, 2:23 p.m.
# HG changeset patch
# User Augie Fackler <raf@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

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