py3: add b'' prefixes in tests/test-revlog-ancestry.py
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 28 Feb 2018 22:03:29 +0530
changeset 36482 14d2371216ba
parent 36481 9660e629352b
child 36483 5a029f049854
py3: add b'' prefixes in tests/test-revlog-ancestry.py # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2506
tests/test-revlog-ancestry.py
--- a/tests/test-revlog-ancestry.py	Wed Feb 28 21:57:22 2018 +0530
+++ b/tests/test-revlog-ancestry.py	Wed Feb 28 22:03:29 2018 +0530
@@ -8,15 +8,15 @@
 
 u = uimod.ui.load()
 
-repo = hg.repository(u, 'test1', create=1)
+repo = hg.repository(u, b'test1', create=1)
 os.chdir('test1')
 
 def commit(text, time):
-    repo.commit(text=text, date="%d 0" % time)
+    repo.commit(text=text, date=b"%d 0" % time)
 
 def addcommit(name, time):
     f = open(name, 'w')
-    f.write('%s\n' % name)
+    f.write(b'%s\n' % name)
     f.close()
     repo[None].add([name])
     commit(name, time)
@@ -28,27 +28,27 @@
     merge.update(repo, rev, True, False)
 
 if __name__ == '__main__':
-    addcommit("A", 0)
-    addcommit("B", 1)
+    addcommit(b"A", 0)
+    addcommit(b"B", 1)
 
     update(0)
-    addcommit("C", 2)
+    addcommit(b"C", 2)
 
     merge_(1)
-    commit("D", 3)
+    commit(b"D", 3)
 
     update(2)
-    addcommit("E", 4)
-    addcommit("F", 5)
+    addcommit(b"E", 4)
+    addcommit(b"F", 5)
 
     update(3)
-    addcommit("G", 6)
+    addcommit(b"G", 6)
 
     merge_(5)
-    commit("H", 7)
+    commit(b"H", 7)
 
     update(5)
-    addcommit("I", 8)
+    addcommit(b"I", 8)
 
     # Ancestors
     print('Ancestors of 5')