diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
index a8dfa35a41308a76a0b230d2d4dd3b77a6b20206_Y29udHJpYi9weXRob24zLXdoaXRlbGlzdA==..ec9ed269edc330e7bcc14a184d3d6dd630756bf6_Y29udHJpYi9weXRob24zLXdoaXRlbGlzdA== 100644
--- 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
index a8dfa35a41308a76a0b230d2d4dd3b77a6b20206_dGVzdHMvdGVzdC1hbmNlc3Rvci5weQ==..ec9ed269edc330e7bcc14a184d3d6dd630756bf6_dGVzdHMvdGVzdC1hbmNlc3Rvci5weQ== 100644
--- 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