Show More
@@ -112,7 +112,7 b' class Writer(writers.Writer):' | |||||
112 | class Table: |
|
112 | class Table: | |
113 | def __init__(self): |
|
113 | def __init__(self): | |
114 | self._rows = [] |
|
114 | self._rows = [] | |
115 |
self._options = ['center' |
|
115 | self._options = ['center'] | |
116 | self._tab_char = '\t' |
|
116 | self._tab_char = '\t' | |
117 | self._coldefs = [] |
|
117 | self._coldefs = [] | |
118 | def new_row(self): |
|
118 | def new_row(self): |
@@ -859,7 +859,8 b' class queue(object):' | |||||
859 | p.write("Date: %d %d\n\n" % date) |
|
859 | p.write("Date: %d %d\n\n" % date) | |
860 | else: |
|
860 | else: | |
861 | p.write("# HG changeset patch\n") |
|
861 | p.write("# HG changeset patch\n") | |
862 |
p.write("# Parent " |
|
862 | p.write("# Parent " | |
|
863 | + hex(repo[None].parents()[0].node()) + "\n") | |||
863 | if user: |
|
864 | if user: | |
864 | p.write("# User " + user + "\n") |
|
865 | p.write("# User " + user + "\n") | |
865 | if date: |
|
866 | if date: |
@@ -499,7 +499,7 b' cmdtable = {' | |||||
499 | ('', 'detach', False, _('force detaching of source from its original ' |
|
499 | ('', 'detach', False, _('force detaching of source from its original ' | |
500 | 'branch')), |
|
500 | 'branch')), | |
501 | ('c', 'continue', False, _('continue an interrupted rebase')), |
|
501 | ('c', 'continue', False, _('continue an interrupted rebase')), | |
502 |
('a', 'abort', False, _('abort an interrupted rebase')) |
|
502 | ('a', 'abort', False, _('abort an interrupted rebase'))] + | |
503 | templateopts, |
|
503 | templateopts, | |
504 | _('hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] ' |
|
504 | _('hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] ' | |
505 | '[--keep] [--keepbranches] | [-c] | [-a]')), |
|
505 | '[--keep] [--keepbranches] | [-c] | [-a]')), |
@@ -1835,7 +1835,8 b' def import_(ui, repo, patch1, *patches, ' | |||||
1835 | wlock = lock = None |
|
1835 | wlock = lock = None | |
1836 |
|
1836 | |||
1837 | def tryone(ui, hunk): |
|
1837 | def tryone(ui, hunk): | |
1838 |
tmpname, message, user, date, branch, nodeid, p1, p2 = |
|
1838 | tmpname, message, user, date, branch, nodeid, p1, p2 = \ | |
|
1839 | patch.extract(ui, hunk) | |||
1839 |
|
1840 | |||
1840 | if not tmpname: |
|
1841 | if not tmpname: | |
1841 | return None |
|
1842 | return None |
@@ -847,7 +847,7 b' class coverage:' | |||||
847 | morfs = self.filter_by_prefix(morfs, omit_prefixes) |
|
847 | morfs = self.filter_by_prefix(morfs, omit_prefixes) | |
848 | morfs.sort(self.morf_name_compare) |
|
848 | morfs.sort(self.morf_name_compare) | |
849 |
|
849 | |||
850 |
max_name = max([5 |
|
850 | max_name = max([5] + map(len, map(self.morf_name, morfs))) | |
851 | fmt_name = "%%- %ds " % max_name |
|
851 | fmt_name = "%%- %ds " % max_name | |
852 | fmt_err = fmt_name + "%s: %s" |
|
852 | fmt_err = fmt_name + "%s: %s" | |
853 | header = fmt_name % "Name" + " Stmts Exec Cover" |
|
853 | header = fmt_name % "Name" + " Stmts Exec Cover" |
@@ -1,5 +1,5 b'' | |||||
1 | # this is hack to make sure no escape characters are inserted into the output |
|
1 | # this is hack to make sure no escape characters are inserted into the output | |
2 |
import os |
|
2 | import os | |
3 | if 'TERM' in os.environ: |
|
3 | if 'TERM' in os.environ: | |
4 | del os.environ['TERM'] |
|
4 | del os.environ['TERM'] | |
5 | import doctest |
|
5 | import doctest |
@@ -148,4 +148,4 b' mkdir sandbox' | |||||
148 | (cd sandbox ; runtest) |
|
148 | (cd sandbox ; runtest) | |
149 | rm -r sandbox |
|
149 | rm -r sandbox | |
150 |
|
150 | |||
151 | runtest No newline at end of file |
|
151 | runtest |
@@ -143,7 +143,7 b' class TestMerge3(TestCase):' | |||||
143 | # to match without zz |
|
143 | # to match without zz | |
144 | self.assertEquals(list(m3.find_sync_regions()), |
|
144 | self.assertEquals(list(m3.find_sync_regions()), | |
145 | [(0, 1, 2, 3, 0, 1), |
|
145 | [(0, 1, 2, 3, 0, 1), | |
146 |
(1, 1, 3, 3, 1, 1) |
|
146 | (1, 1, 3, 3, 1, 1)]) | |
147 |
|
147 | |||
148 | self.assertEquals(list(m3.merge_regions()), |
|
148 | self.assertEquals(list(m3.merge_regions()), | |
149 | [('a', 0, 2), |
|
149 | [('a', 0, 2), | |
@@ -180,12 +180,12 b' class TestMerge3(TestCase):' | |||||
180 | self.assertEquals(list(m3.find_sync_regions()), |
|
180 | self.assertEquals(list(m3.find_sync_regions()), | |
181 | [(0, 1, 0, 1, 0, 1), |
|
181 | [(0, 1, 0, 1, 0, 1), | |
182 | (1, 2, 2, 3, 1, 2), |
|
182 | (1, 2, 2, 3, 1, 2), | |
183 |
(2, 2, 3, 3, 2, 2) |
|
183 | (2, 2, 3, 3, 2, 2)]) | |
184 |
|
184 | |||
185 | self.assertEquals(list(m3.merge_regions()), |
|
185 | self.assertEquals(list(m3.merge_regions()), | |
186 | [('unchanged', 0, 1), |
|
186 | [('unchanged', 0, 1), | |
187 | ('a', 1, 2), |
|
187 | ('a', 1, 2), | |
188 |
('unchanged', 1, 2) |
|
188 | ('unchanged', 1, 2)]) | |
189 |
|
189 | |||
190 | def test_append_a(self): |
|
190 | def test_append_a(self): | |
191 | m3 = Merge3(['aaa\n', 'bbb\n'], |
|
191 | m3 = Merge3(['aaa\n', 'bbb\n'], | |
@@ -256,7 +256,7 b' class TestMerge3(TestCase):' | |||||
256 | self.assertEquals(list(m3.find_sync_regions()), |
|
256 | self.assertEquals(list(m3.find_sync_regions()), | |
257 | [(0, 1, 0, 1, 0, 1), |
|
257 | [(0, 1, 0, 1, 0, 1), | |
258 | (1, 2, 2, 3, 2, 3), |
|
258 | (1, 2, 2, 3, 2, 3), | |
259 |
(2, 2, 3, 3, 3, 3) |
|
259 | (2, 2, 3, 3, 3, 3)]) | |
260 |
|
260 | |||
261 | self.assertEquals(list(m3.merge_regions()), |
|
261 | self.assertEquals(list(m3.merge_regions()), | |
262 | [('unchanged', 0, 1), |
|
262 | [('unchanged', 0, 1), | |
@@ -296,7 +296,7 b' bbb' | |||||
296 | self.assertEquals(list(m3.find_sync_regions()), |
|
296 | self.assertEquals(list(m3.find_sync_regions()), | |
297 | [(0, 1, 0, 1, 0, 1), |
|
297 | [(0, 1, 0, 1, 0, 1), | |
298 | (2, 3, 2, 3, 2, 3), |
|
298 | (2, 3, 2, 3, 2, 3), | |
299 |
(3, 3, 3, 3, 3, 3) |
|
299 | (3, 3, 3, 3, 3, 3)]) | |
300 |
|
300 | |||
301 | def test_replace_multi(self): |
|
301 | def test_replace_multi(self): | |
302 | """Replacement with regions of different size.""" |
|
302 | """Replacement with regions of different size.""" |
@@ -175,7 +175,7 b' hg -R nested_relative add' | |||||
175 | hg -R nested_relative ci -mtest2 |
|
175 | hg -R nested_relative ci -mtest2 | |
176 | hg init main |
|
176 | hg init main | |
177 | echo nested_relative = ../nested_relative > main/.hgsub |
|
177 | echo nested_relative = ../nested_relative > main/.hgsub | |
178 |
echo nested_absolute = |
|
178 | echo nested_absolute = `pwd`/nested_absolute >> main/.hgsub | |
179 | hg -R main add |
|
179 | hg -R main add | |
180 | hg -R main ci -m "add subrepos" |
|
180 | hg -R main ci -m "add subrepos" | |
181 | cd .. |
|
181 | cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now