equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 """ |
2 """ |
3 Tests the behavior of filelog w.r.t. data starting with '\1\n' |
3 Tests the behavior of filelog w.r.t. data starting with '\1\n' |
4 """ |
4 """ |
5 from __future__ import absolute_import |
5 from __future__ import absolute_import, print_function |
6 from mercurial import ( |
6 from mercurial import ( |
7 hg, |
7 hg, |
8 ui, |
8 ui, |
9 ) |
9 ) |
10 from mercurial.node import ( |
10 from mercurial.node import ( |
35 t.close() |
35 t.close() |
36 if lock: |
36 if lock: |
37 lock.release() |
37 lock.release() |
38 |
38 |
39 def error(text): |
39 def error(text): |
40 print 'ERROR: ' + text |
40 print('ERROR: ' + text) |
41 |
41 |
42 textwith = '\1\nfoo' |
42 textwith = '\1\nfoo' |
43 without = 'foo' |
43 without = 'foo' |
44 |
44 |
45 node = addrev(textwith) |
45 node = addrev(textwith) |
57 if fl.cmp(node, textwith) or not fl.cmp(node, without): |
57 if fl.cmp(node, textwith) or not fl.cmp(node, without): |
58 error('filelog.cmp for a renaming + data starting with \\1\\n') |
58 error('filelog.cmp for a renaming + data starting with \\1\\n') |
59 if fl.size(1) != len(textwith): |
59 if fl.size(1) != len(textwith): |
60 error('filelog.size for a renaming + data starting with \\1\\n') |
60 error('filelog.size for a renaming + data starting with \\1\\n') |
61 |
61 |
62 print 'OK.' |
62 print('OK.') |