##// END OF EJS Templates
py3: add b'' prefixes in tests/test-revlog-ancestry.py...
Pulkit Goyal -
r36500:14d23712 default
parent child Browse files
Show More
@@ -8,15 +8,15 b' from mercurial import ('
8
8
9 u = uimod.ui.load()
9 u = uimod.ui.load()
10
10
11 repo = hg.repository(u, 'test1', create=1)
11 repo = hg.repository(u, b'test1', create=1)
12 os.chdir('test1')
12 os.chdir('test1')
13
13
14 def commit(text, time):
14 def commit(text, time):
15 repo.commit(text=text, date="%d 0" % time)
15 repo.commit(text=text, date=b"%d 0" % time)
16
16
17 def addcommit(name, time):
17 def addcommit(name, time):
18 f = open(name, 'w')
18 f = open(name, 'w')
19 f.write('%s\n' % name)
19 f.write(b'%s\n' % name)
20 f.close()
20 f.close()
21 repo[None].add([name])
21 repo[None].add([name])
22 commit(name, time)
22 commit(name, time)
@@ -28,27 +28,27 b' def merge_(rev):'
28 merge.update(repo, rev, True, False)
28 merge.update(repo, rev, True, False)
29
29
30 if __name__ == '__main__':
30 if __name__ == '__main__':
31 addcommit("A", 0)
31 addcommit(b"A", 0)
32 addcommit("B", 1)
32 addcommit(b"B", 1)
33
33
34 update(0)
34 update(0)
35 addcommit("C", 2)
35 addcommit(b"C", 2)
36
36
37 merge_(1)
37 merge_(1)
38 commit("D", 3)
38 commit(b"D", 3)
39
39
40 update(2)
40 update(2)
41 addcommit("E", 4)
41 addcommit(b"E", 4)
42 addcommit("F", 5)
42 addcommit(b"F", 5)
43
43
44 update(3)
44 update(3)
45 addcommit("G", 6)
45 addcommit(b"G", 6)
46
46
47 merge_(5)
47 merge_(5)
48 commit("H", 7)
48 commit(b"H", 7)
49
49
50 update(5)
50 update(5)
51 addcommit("I", 8)
51 addcommit(b"I", 8)
52
52
53 # Ancestors
53 # Ancestors
54 print('Ancestors of 5')
54 print('Ancestors of 5')
General Comments 0
You need to be logged in to leave comments. Login now