Show More
@@ -1,4 +1,4 b'' | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import, print_function | |
2 | import struct |
|
2 | import struct | |
3 | from mercurial import ( |
|
3 | from mercurial import ( | |
4 | bdiff, |
|
4 | bdiff, | |
@@ -11,13 +11,13 b' def test1(a, b):' | |||||
11 | if d: |
|
11 | if d: | |
12 | c = mpatch.patches(a, [d]) |
|
12 | c = mpatch.patches(a, [d]) | |
13 | if c != b: |
|
13 | if c != b: | |
14 |
print |
|
14 | print("***", repr(a), repr(b)) | |
15 |
print |
|
15 | print("bad:") | |
16 |
print |
|
16 | print(repr(c)[:200]) | |
17 |
print |
|
17 | print(repr(d)) | |
18 |
|
18 | |||
19 | def test(a, b): |
|
19 | def test(a, b): | |
20 |
print |
|
20 | print("***", repr(a), repr(b)) | |
21 | test1(a, b) |
|
21 | test1(a, b) | |
22 | test1(b, a) |
|
22 | test1(b, a) | |
23 |
|
23 | |||
@@ -48,23 +48,23 b' def showdiff(a, b):' | |||||
48 | while pos < len(bin): |
|
48 | while pos < len(bin): | |
49 | p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12]) |
|
49 | p1, p2, l = struct.unpack(">lll", bin[pos:pos + 12]) | |
50 | pos += 12 |
|
50 | pos += 12 | |
51 |
print |
|
51 | print(p1, p2, repr(bin[pos:pos + l])) | |
52 | pos += l |
|
52 | pos += l | |
53 | showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\nx\n\nz\n") |
|
53 | showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\nx\n\nz\n") | |
54 | showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\ny\n\nx\n\nz\n") |
|
54 | showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\ny\n\nx\n\nz\n") | |
55 |
|
55 | |||
56 |
print |
|
56 | print("done") | |
57 |
|
57 | |||
58 | def testfixws(a, b, allws): |
|
58 | def testfixws(a, b, allws): | |
59 | c = bdiff.fixws(a, allws) |
|
59 | c = bdiff.fixws(a, allws) | |
60 | if c != b: |
|
60 | if c != b: | |
61 |
print |
|
61 | print("*** fixws", repr(a), repr(b), allws) | |
62 |
print |
|
62 | print("got:") | |
63 |
print |
|
63 | print(repr(c)) | |
64 |
|
64 | |||
65 | testfixws(" \ta\r b\t\n", "ab\n", 1) |
|
65 | testfixws(" \ta\r b\t\n", "ab\n", 1) | |
66 | testfixws(" \ta\r b\t\n", " a b\n", 0) |
|
66 | testfixws(" \ta\r b\t\n", " a b\n", 0) | |
67 | testfixws("", "", 1) |
|
67 | testfixws("", "", 1) | |
68 | testfixws("", "", 0) |
|
68 | testfixws("", "", 0) | |
69 |
|
69 | |||
70 |
print |
|
70 | print("done") |
@@ -53,7 +53,6 b'' | |||||
53 | tests/svn-safe-append.py not using absolute_import |
|
53 | tests/svn-safe-append.py not using absolute_import | |
54 | tests/svnxml.py not using absolute_import |
|
54 | tests/svnxml.py not using absolute_import | |
55 | tests/test-atomictempfile.py not using absolute_import |
|
55 | tests/test-atomictempfile.py not using absolute_import | |
56 | tests/test-bdiff.py requires print_function |
|
|||
57 | tests/test-context.py not using absolute_import |
|
56 | tests/test-context.py not using absolute_import | |
58 | tests/test-context.py requires print_function |
|
57 | tests/test-context.py requires print_function | |
59 | tests/test-demandimport.py not using absolute_import |
|
58 | tests/test-demandimport.py not using absolute_import | |
@@ -250,7 +249,6 b'' | |||||
250 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
249 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
251 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
250 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
252 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
251 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
253 | tests/test-bdiff.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
|||
254 | tests/test-context.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
252 | tests/test-context.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
255 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
253 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
256 | tests/test-duplicateoptions.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
254 | tests/test-duplicateoptions.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now