Show More
@@ -62,7 +62,6 b'' | |||||
62 | tests/test-manifest.py not using absolute_import |
|
62 | tests/test-manifest.py not using absolute_import | |
63 | tests/test-pathencode.py not using absolute_import |
|
63 | tests/test-pathencode.py not using absolute_import | |
64 | tests/test-pathencode.py requires print_function |
|
64 | tests/test-pathencode.py requires print_function | |
65 | tests/test-revlog-ancestry.py requires print_function |
|
|||
66 | tests/test-run-tests.py not using absolute_import |
|
65 | tests/test-run-tests.py not using absolute_import | |
67 | tests/test-simplemerge.py not using absolute_import |
|
66 | tests/test-simplemerge.py not using absolute_import | |
68 | tests/test-status-inprocess.py not using absolute_import |
|
67 | tests/test-status-inprocess.py not using absolute_import | |
@@ -230,7 +229,6 b'' | |||||
230 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
229 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
231 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
230 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
232 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
231 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
233 | tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
|||
234 | tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
232 | tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) | |
235 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
233 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
236 |
|
234 |
@@ -1,4 +1,4 b'' | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import, print_function | |
2 | import os |
|
2 | import os | |
3 | from mercurial import ( |
|
3 | from mercurial import ( | |
4 | hg, |
|
4 | hg, | |
@@ -51,39 +51,38 b" if __name__ == '__main__':" | |||||
51 | addcommit("I", 8) |
|
51 | addcommit("I", 8) | |
52 |
|
52 | |||
53 | # Ancestors |
|
53 | # Ancestors | |
54 |
print |
|
54 | print('Ancestors of 5') | |
55 | for r in repo.changelog.ancestors([5]): |
|
55 | for r in repo.changelog.ancestors([5]): | |
56 |
print |
|
56 | print(r, end=' ') | |
57 |
|
57 | |||
58 |
print |
|
58 | print('\nAncestors of 6 and 5') | |
59 | for r in repo.changelog.ancestors([6, 5]): |
|
59 | for r in repo.changelog.ancestors([6, 5]): | |
60 |
print |
|
60 | print(r, end=' ') | |
61 |
|
61 | |||
62 |
print |
|
62 | print('\nAncestors of 5 and 4') | |
63 | for r in repo.changelog.ancestors([5, 4]): |
|
63 | for r in repo.changelog.ancestors([5, 4]): | |
64 |
print |
|
64 | print(r, end=' ') | |
65 |
|
65 | |||
66 |
print |
|
66 | print('\nAncestors of 7, stop at 6') | |
67 | for r in repo.changelog.ancestors([7], 6): |
|
67 | for r in repo.changelog.ancestors([7], 6): | |
68 |
print |
|
68 | print(r, end=' ') | |
69 |
|
69 | |||
70 |
print |
|
70 | print('\nAncestors of 7, including revs') | |
71 | for r in repo.changelog.ancestors([7], inclusive=True): |
|
71 | for r in repo.changelog.ancestors([7], inclusive=True): | |
72 |
print |
|
72 | print(r, end=' ') | |
73 |
|
73 | |||
74 |
print |
|
74 | print('\nAncestors of 7, 5 and 3, including revs') | |
75 | for r in repo.changelog.ancestors([7, 5, 3], inclusive=True): |
|
75 | for r in repo.changelog.ancestors([7, 5, 3], inclusive=True): | |
76 |
print |
|
76 | print(r, end=' ') | |
77 |
|
77 | |||
78 | # Descendants |
|
78 | # Descendants | |
79 |
print |
|
79 | print('\n\nDescendants of 5') | |
80 | for r in repo.changelog.descendants([5]): |
|
80 | for r in repo.changelog.descendants([5]): | |
81 |
print |
|
81 | print(r, end=' ') | |
82 |
|
82 | |||
83 |
print |
|
83 | print('\nDescendants of 5 and 3') | |
84 | for r in repo.changelog.descendants([5, 3]): |
|
84 | for r in repo.changelog.descendants([5, 3]): | |
85 |
print |
|
85 | print(r, end=' ') | |
86 |
|
86 | |||
87 |
print |
|
87 | print('\nDescendants of 5 and 4') | |
88 |
|
|
88 | print(*repo.changelog.descendants([5, 4]), sep=' ') | |
89 | print r, |
|
General Comments 0
You need to be logged in to leave comments.
Login now