Patchwork [2,of,7] py3: pass the path in hg.repository() as bytes

login
register
mail settings
Submitter Pulkit Goyal
Date June 17, 2017, 12:45 p.m.
Message ID <24ed9e4abb5584a94614.1497703520@workspace>
Download mbox | patch
Permalink /patch/21455/
State Accepted
Headers show

Comments

Pulkit Goyal - June 17, 2017, 12:45 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1497690550 -19800
#      Sat Jun 17 14:39:10 2017 +0530
# Node ID 24ed9e4abb5584a94614e1e7506c69b2ebced69b
# Parent  9fc0c5a06ad8573d46b10212e856cd14cfef0e16
py3: pass the path in hg.repository() as bytes

This make test-ancestor.py pass on Python 3.

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -1,3 +1,4 @@ 
+test-ancestor.py
 test-check-execute.t
 test-check-shbang.t
 test-contrib-check-code.t
diff --git a/tests/test-ancestor.py b/tests/test-ancestor.py
--- a/tests/test-ancestor.py
+++ b/tests/test-ancestor.py
@@ -225,7 +225,7 @@ 
 def test_gca():
     u = uimod.ui.load()
     for i, dag in enumerate(dagtests):
-        repo = hg.repository(u, 'gca%d' % i, create=1)
+        repo = hg.repository(u, b'gca%d' % i, create=1)
         cl = repo.changelog
         if not util.safehasattr(cl.index, 'ancestors'):
             # C version not available