Show More
@@ -153,6 +153,7 b' test-extdiff.t' | |||||
153 | test-extra-filelog-entry.t |
|
153 | test-extra-filelog-entry.t | |
154 | test-filebranch.t |
|
154 | test-filebranch.t | |
155 | test-filecache.py |
|
155 | test-filecache.py | |
|
156 | test-filelog.py | |||
156 | test-fileset-generated.t |
|
157 | test-fileset-generated.t | |
157 | test-fix-topology.t |
|
158 | test-fix-topology.t | |
158 | test-flags.t |
|
159 | test-flags.t |
@@ -14,21 +14,21 b' from mercurial import (' | |||||
14 | ) |
|
14 | ) | |
15 |
|
15 | |||
16 | myui = uimod.ui.load() |
|
16 | myui = uimod.ui.load() | |
17 | repo = hg.repository(myui, path='.', create=True) |
|
17 | repo = hg.repository(myui, path=b'.', create=True) | |
18 |
|
18 | |||
19 | fl = repo.file('foobar') |
|
19 | fl = repo.file(b'foobar') | |
20 |
|
20 | |||
21 | def addrev(text, renamed=False): |
|
21 | def addrev(text, renamed=False): | |
22 | if renamed: |
|
22 | if renamed: | |
23 | # data doesn't matter. Just make sure filelog.renamed() returns True |
|
23 | # data doesn't matter. Just make sure filelog.renamed() returns True | |
24 | meta = {'copyrev': hex(nullid), 'copy': 'bar'} |
|
24 | meta = {b'copyrev': hex(nullid), b'copy': b'bar'} | |
25 | else: |
|
25 | else: | |
26 | meta = {} |
|
26 | meta = {} | |
27 |
|
27 | |||
28 | lock = t = None |
|
28 | lock = t = None | |
29 | try: |
|
29 | try: | |
30 | lock = repo.lock() |
|
30 | lock = repo.lock() | |
31 | t = repo.transaction('commit') |
|
31 | t = repo.transaction(b'commit') | |
32 | node = fl.add(text, meta, t, 0, nullid, nullid) |
|
32 | node = fl.add(text, meta, t, 0, nullid, nullid) | |
33 | return node |
|
33 | return node | |
34 | finally: |
|
34 | finally: | |
@@ -40,8 +40,8 b' def addrev(text, renamed=False):' | |||||
40 | def error(text): |
|
40 | def error(text): | |
41 | print('ERROR: ' + text) |
|
41 | print('ERROR: ' + text) | |
42 |
|
42 | |||
43 | textwith = '\1\nfoo' |
|
43 | textwith = b'\1\nfoo' | |
44 | without = 'foo' |
|
44 | without = b'foo' | |
45 |
|
45 | |||
46 | node = addrev(textwith) |
|
46 | node = addrev(textwith) | |
47 | if not textwith == fl.read(node): |
|
47 | if not textwith == fl.read(node): |
General Comments 0
You need to be logged in to leave comments.
Login now