Show More
@@ -150,7 +150,7 b' class patchheader(object):' | |||||
150 | elif line.startswith("# Date "): |
|
150 | elif line.startswith("# Date "): | |
151 | date = line[7:] |
|
151 | date = line[7:] | |
152 | elif line.startswith("# Parent "): |
|
152 | elif line.startswith("# Parent "): | |
153 | parent = line[9:].lstrip() |
|
153 | parent = line[9:].lstrip() # handle double trailing space | |
154 | elif line.startswith("# Branch "): |
|
154 | elif line.startswith("# Branch "): | |
155 | branch = line[9:] |
|
155 | branch = line[9:] | |
156 | elif line.startswith("# Node ID "): |
|
156 | elif line.startswith("# Node ID "): | |
@@ -232,10 +232,11 b' class patchheader(object):' | |||||
232 | self.date = date |
|
232 | self.date = date | |
233 |
|
233 | |||
234 | def setparent(self, parent): |
|
234 | def setparent(self, parent): | |
235 |
if not self.updateheader(['# Parent '], parent) |
|
235 | if not (self.updateheader(['# Parent '], parent) or | |
|
236 | self.updateheader(['# Parent '], parent)): | |||
236 | try: |
|
237 | try: | |
237 | patchheaderat = self.comments.index('# HG changeset patch') |
|
238 | patchheaderat = self.comments.index('# HG changeset patch') | |
238 | self.comments.insert(patchheaderat + 1, '# Parent ' + parent) |
|
239 | self.comments.insert(patchheaderat + 1, '# Parent ' + parent) | |
239 | except ValueError: |
|
240 | except ValueError: | |
240 | pass |
|
241 | pass | |
241 | self.parent = parent |
|
242 | self.parent = parent | |
@@ -1081,7 +1082,7 b' class queue(object):' | |||||
1081 | p.write("# User " + user + "\n") |
|
1082 | p.write("# User " + user + "\n") | |
1082 | if date: |
|
1083 | if date: | |
1083 | p.write("# Date %s %s\n" % date) |
|
1084 | p.write("# Date %s %s\n" % date) | |
1084 | p.write("# Parent " |
|
1085 | p.write("# Parent " | |
1085 | + hex(repo[None].p1().node()) + "\n") |
|
1086 | + hex(repo[None].p1().node()) + "\n") | |
1086 |
|
1087 | |||
1087 | defaultmsg = "[mq]: %s" % patchfn |
|
1088 | defaultmsg = "[mq]: %s" % patchfn |
@@ -18,7 +18,7 b' git=auto: regular patch creation:' | |||||
18 | $ cat .hg/patches/adda |
|
18 | $ cat .hg/patches/adda | |
19 | # HG changeset patch |
|
19 | # HG changeset patch | |
20 | # Date 0 0 |
|
20 | # Date 0 0 | |
21 | # Parent 0000000000000000000000000000000000000000 |
|
21 | # Parent 0000000000000000000000000000000000000000 | |
22 |
|
22 | |||
23 | diff -r 000000000000 -r ef8dafc9fa4c a |
|
23 | diff -r 000000000000 -r ef8dafc9fa4c a | |
24 | --- /dev/null |
|
24 | --- /dev/null | |
@@ -34,7 +34,7 b' git=auto: git patch creation with copy:' | |||||
34 | $ cat .hg/patches/copy |
|
34 | $ cat .hg/patches/copy | |
35 | # HG changeset patch |
|
35 | # HG changeset patch | |
36 | # Date 0 0 |
|
36 | # Date 0 0 | |
37 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 |
|
37 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 | |
38 |
|
38 | |||
39 | diff --git a/a b/b |
|
39 | diff --git a/a b/b | |
40 | copy from a |
|
40 | copy from a | |
@@ -49,7 +49,7 b' git=auto: git patch when using --git:' | |||||
49 | $ cat .hg/patches/git |
|
49 | $ cat .hg/patches/git | |
50 | # HG changeset patch |
|
50 | # HG changeset patch | |
51 | # Date 0 0 |
|
51 | # Date 0 0 | |
52 | # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d |
|
52 | # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d | |
53 |
|
53 | |||
54 | diff --git a/regular b/regular |
|
54 | diff --git a/regular b/regular | |
55 | new file mode 100644 |
|
55 | new file mode 100644 | |
@@ -65,7 +65,7 b' git=auto: regular patch after qrefresh w' | |||||
65 | $ cat .hg/patches/git |
|
65 | $ cat .hg/patches/git | |
66 | # HG changeset patch |
|
66 | # HG changeset patch | |
67 | # Date 0 0 |
|
67 | # Date 0 0 | |
68 | # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d |
|
68 | # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d | |
69 |
|
69 | |||
70 | diff -r 99586d5f048c regular |
|
70 | diff -r 99586d5f048c regular | |
71 | --- /dev/null |
|
71 | --- /dev/null | |
@@ -89,7 +89,7 b' git=keep: git patch with --git:' | |||||
89 | $ cat .hg/patches/git |
|
89 | $ cat .hg/patches/git | |
90 | # HG changeset patch |
|
90 | # HG changeset patch | |
91 | # Date 0 0 |
|
91 | # Date 0 0 | |
92 | # Parent 0000000000000000000000000000000000000000 |
|
92 | # Parent 0000000000000000000000000000000000000000 | |
93 |
|
93 | |||
94 | diff --git a/a b/a |
|
94 | diff --git a/a b/a | |
95 | new file mode 100644 |
|
95 | new file mode 100644 | |
@@ -106,7 +106,7 b' git=keep: git patch after qrefresh witho' | |||||
106 | $ cat .hg/patches/git |
|
106 | $ cat .hg/patches/git | |
107 | # HG changeset patch |
|
107 | # HG changeset patch | |
108 | # Date 0 0 |
|
108 | # Date 0 0 | |
109 | # Parent 0000000000000000000000000000000000000000 |
|
109 | # Parent 0000000000000000000000000000000000000000 | |
110 |
|
110 | |||
111 | diff --git a/a b/a |
|
111 | diff --git a/a b/a | |
112 | new file mode 100644 |
|
112 | new file mode 100644 | |
@@ -131,7 +131,7 b' git=yes: git patch:' | |||||
131 | $ cat .hg/patches/git |
|
131 | $ cat .hg/patches/git | |
132 | # HG changeset patch |
|
132 | # HG changeset patch | |
133 | # Date 0 0 |
|
133 | # Date 0 0 | |
134 | # Parent 0000000000000000000000000000000000000000 |
|
134 | # Parent 0000000000000000000000000000000000000000 | |
135 |
|
135 | |||
136 | diff --git a/a b/a |
|
136 | diff --git a/a b/a | |
137 | new file mode 100644 |
|
137 | new file mode 100644 | |
@@ -148,7 +148,7 b' git=yes: git patch after qrefresh:' | |||||
148 | $ cat .hg/patches/git |
|
148 | $ cat .hg/patches/git | |
149 | # HG changeset patch |
|
149 | # HG changeset patch | |
150 | # Date 0 0 |
|
150 | # Date 0 0 | |
151 | # Parent 0000000000000000000000000000000000000000 |
|
151 | # Parent 0000000000000000000000000000000000000000 | |
152 |
|
152 | |||
153 | diff --git a/a b/a |
|
153 | diff --git a/a b/a | |
154 | new file mode 100644 |
|
154 | new file mode 100644 | |
@@ -177,7 +177,7 b' git=no: regular patch with copy:' | |||||
177 | $ cat .hg/patches/regular |
|
177 | $ cat .hg/patches/regular | |
178 | # HG changeset patch |
|
178 | # HG changeset patch | |
179 | # Date 0 0 |
|
179 | # Date 0 0 | |
180 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 |
|
180 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 | |
181 |
|
181 | |||
182 | diff -r ef8dafc9fa4c -r a70404f79ba3 b |
|
182 | diff -r ef8dafc9fa4c -r a70404f79ba3 b | |
183 | --- /dev/null |
|
183 | --- /dev/null | |
@@ -193,7 +193,7 b' git=no: regular patch after qrefresh wit' | |||||
193 | $ cat .hg/patches/regular |
|
193 | $ cat .hg/patches/regular | |
194 | # HG changeset patch |
|
194 | # HG changeset patch | |
195 | # Date 0 0 |
|
195 | # Date 0 0 | |
196 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 |
|
196 | # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4 | |
197 |
|
197 | |||
198 | diff -r ef8dafc9fa4c b |
|
198 | diff -r ef8dafc9fa4c b | |
199 | --- /dev/null |
|
199 | --- /dev/null |
@@ -138,7 +138,7 b' Check patcha is still a git patch:' | |||||
138 |
|
138 | |||
139 | $ cat .hg/patches/patcha |
|
139 | $ cat .hg/patches/patcha | |
140 | # HG changeset patch |
|
140 | # HG changeset patch | |
141 | # Parent d3873e73d99ef67873dac33fbcc66268d5d2b6f4 |
|
141 | # Parent d3873e73d99ef67873dac33fbcc66268d5d2b6f4 | |
142 |
|
142 | |||
143 | diff --git a/a b/a |
|
143 | diff --git a/a b/a | |
144 | --- a/a |
|
144 | --- a/a | |
@@ -161,7 +161,7 b' Check patcha2 is still a regular patch:' | |||||
161 | $ cat .hg/patches/patcha2 |
|
161 | $ cat .hg/patches/patcha2 | |
162 | # HG changeset patch |
|
162 | # HG changeset patch | |
163 | # Date 0 0 |
|
163 | # Date 0 0 | |
164 | # Parent ???????????????????????????????????????? (glob) |
|
164 | # Parent ???????????????????????????????????????? (glob) | |
165 |
|
165 | |||
166 | diff -r ???????????? -r ???????????? a (glob) |
|
166 | diff -r ???????????? -r ???????????? a (glob) | |
167 | --- a/a |
|
167 | --- a/a |
@@ -87,7 +87,7 b' Fold git patch into a regular patch, exp' | |||||
87 |
|
87 | |||
88 | $ cat .hg/patches/regular |
|
88 | $ cat .hg/patches/regular | |
89 | # HG changeset patch |
|
89 | # HG changeset patch | |
90 | # Parent ???????????????????????????????????????? (glob) |
|
90 | # Parent ???????????????????????????????????????? (glob) | |
91 |
|
91 | |||
92 | diff --git a/a b/a |
|
92 | diff --git a/a b/a | |
93 | --- a/a |
|
93 | --- a/a | |
@@ -129,7 +129,7 b' Fold regular patch into a git patch, exp' | |||||
129 |
|
129 | |||
130 | $ cat .hg/patches/git |
|
130 | $ cat .hg/patches/git | |
131 | # HG changeset patch |
|
131 | # HG changeset patch | |
132 | # Parent ???????????????????????????????????????? (glob) |
|
132 | # Parent ???????????????????????????????????????? (glob) | |
133 |
|
133 | |||
134 | diff --git a/a b/aa |
|
134 | diff --git a/a b/aa | |
135 | copy from a |
|
135 | copy from a |
@@ -339,7 +339,7 b' Test handling default message with the p' | |||||
339 | ==== |
|
339 | ==== | |
340 | $ cat ".hg/patches/patch " |
|
340 | $ cat ".hg/patches/patch " | |
341 | # HG changeset patch |
|
341 | # HG changeset patch | |
342 | # Parent 0000000000000000000000000000000000000000 |
|
342 | # Parent 0000000000000000000000000000000000000000 | |
343 |
|
343 | |||
344 |
|
344 | |||
345 | $ cd .. |
|
345 | $ cd .. |
@@ -49,7 +49,7 b'' | |||||
49 |
|
49 | |||
50 | $ cat .hg/patches/mqbase |
|
50 | $ cat .hg/patches/mqbase | |
51 | # HG changeset patch |
|
51 | # HG changeset patch | |
52 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
52 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
53 | mqbase |
|
53 | mqbase | |
54 |
|
54 | |||
55 | diff -r e7af5904b465 1/base |
|
55 | diff -r e7af5904b465 1/base | |
@@ -98,7 +98,7 b'' | |||||
98 |
|
98 | |||
99 | $ cat .hg/patches/mqbase |
|
99 | $ cat .hg/patches/mqbase | |
100 | # HG changeset patch |
|
100 | # HG changeset patch | |
101 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
101 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
102 | mqbase |
|
102 | mqbase | |
103 |
|
103 | |||
104 | diff -r e7af5904b465 1/base |
|
104 | diff -r e7af5904b465 1/base | |
@@ -142,7 +142,7 b' qrefresh . in subdir:' | |||||
142 |
|
142 | |||
143 | $ cat .hg/patches/mqbase |
|
143 | $ cat .hg/patches/mqbase | |
144 | # HG changeset patch |
|
144 | # HG changeset patch | |
145 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
145 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
146 | mqbase |
|
146 | mqbase | |
147 |
|
147 | |||
148 | diff -r e7af5904b465 1/base |
|
148 | diff -r e7af5904b465 1/base | |
@@ -186,7 +186,7 b' qrefresh in hg-root again:' | |||||
186 |
|
186 | |||
187 | $ cat .hg/patches/mqbase |
|
187 | $ cat .hg/patches/mqbase | |
188 | # HG changeset patch |
|
188 | # HG changeset patch | |
189 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
189 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
190 | mqbase |
|
190 | mqbase | |
191 |
|
191 | |||
192 | diff -r e7af5904b465 1/base |
|
192 | diff -r e7af5904b465 1/base | |
@@ -234,7 +234,7 b' qrefresh --short tests:' | |||||
234 |
|
234 | |||
235 | $ cat .hg/patches/mqbase |
|
235 | $ cat .hg/patches/mqbase | |
236 | # HG changeset patch |
|
236 | # HG changeset patch | |
237 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
237 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
238 | mqbase |
|
238 | mqbase | |
239 |
|
239 | |||
240 | diff -r e7af5904b465 1/base |
|
240 | diff -r e7af5904b465 1/base | |
@@ -267,7 +267,7 b' Before starting exclusive tests:' | |||||
267 |
|
267 | |||
268 | $ cat .hg/patches/mqbase |
|
268 | $ cat .hg/patches/mqbase | |
269 | # HG changeset patch |
|
269 | # HG changeset patch | |
270 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
270 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
271 | mqbase |
|
271 | mqbase | |
272 |
|
272 | |||
273 | diff -r e7af5904b465 1/base |
|
273 | diff -r e7af5904b465 1/base | |
@@ -289,7 +289,7 b' Exclude 2/base:' | |||||
289 |
|
289 | |||
290 | $ cat .hg/patches/mqbase |
|
290 | $ cat .hg/patches/mqbase | |
291 | # HG changeset patch |
|
291 | # HG changeset patch | |
292 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
292 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
293 | mqbase |
|
293 | mqbase | |
294 |
|
294 | |||
295 | diff -r e7af5904b465 1/base |
|
295 | diff -r e7af5904b465 1/base | |
@@ -312,7 +312,7 b' Remove 1/base and add 2/base again but n' | |||||
312 |
|
312 | |||
313 | $ cat .hg/patches/mqbase |
|
313 | $ cat .hg/patches/mqbase | |
314 | # HG changeset patch |
|
314 | # HG changeset patch | |
315 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
315 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
316 | mqbase |
|
316 | mqbase | |
317 |
|
317 | |||
318 | diff -r e7af5904b465 2/base |
|
318 | diff -r e7af5904b465 2/base | |
@@ -328,7 +328,7 b' Add 1/base with include filter - and thu' | |||||
328 |
|
328 | |||
329 | $ cat .hg/patches/mqbase |
|
329 | $ cat .hg/patches/mqbase | |
330 | # HG changeset patch |
|
330 | # HG changeset patch | |
331 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa |
|
331 | # Parent e7af5904b465cd1f4f3cf6b26fe14e8db6f63eaa | |
332 | mqbase |
|
332 | mqbase | |
333 |
|
333 | |||
334 | diff -r e7af5904b465 1/base |
|
334 | diff -r e7af5904b465 1/base | |
@@ -453,7 +453,7 b' refresh with tip != qtip:' | |||||
453 |
|
453 | |||
454 | $ cat .hg/patches/patch |
|
454 | $ cat .hg/patches/patch | |
455 | # HG changeset patch |
|
455 | # HG changeset patch | |
456 | # Parent 1a60229be7ac3e4a7f647508e99b87bef1f03593 |
|
456 | # Parent 1a60229be7ac3e4a7f647508e99b87bef1f03593 | |
457 |
|
457 | |||
458 | diff -r 1a60229be7ac b |
|
458 | diff -r 1a60229be7ac b | |
459 | --- a/b |
|
459 | --- a/b | |
@@ -507,7 +507,7 b' but only after writing the bad name into' | |||||
507 | $ rm a |
|
507 | $ rm a | |
508 | $ cat .hg/patches/a |
|
508 | $ cat .hg/patches/a | |
509 | # HG changeset patch |
|
509 | # HG changeset patch | |
510 | # Parent 0000000000000000000000000000000000000000 |
|
510 | # Parent 0000000000000000000000000000000000000000 | |
511 |
|
511 | |||
512 | diff --git a/a b/a |
|
512 | diff --git a/a b/a | |
513 | new file mode 100644 |
|
513 | new file mode 100644 | |
@@ -522,7 +522,7 b' but only after writing the bad name into' | |||||
522 | [255] |
|
522 | [255] | |
523 | $ cat .hg/patches/a |
|
523 | $ cat .hg/patches/a | |
524 | # HG changeset patch |
|
524 | # HG changeset patch | |
525 | # Parent 0000000000000000000000000000000000000000 |
|
525 | # Parent 0000000000000000000000000000000000000000 | |
526 |
|
526 | |||
527 | diff --git a/a b/a |
|
527 | diff --git a/a b/a | |
528 | new file mode 100644 |
|
528 | new file mode 100644 |
@@ -113,7 +113,7 b' Test renaming to a folded patch (issue30' | |||||
113 | $ hg qmv addb |
|
113 | $ hg qmv addb | |
114 | $ cat .hg/patches/addb |
|
114 | $ cat .hg/patches/addb | |
115 | # HG changeset patch |
|
115 | # HG changeset patch | |
116 | # Parent 0000000000000000000000000000000000000000 |
|
116 | # Parent 0000000000000000000000000000000000000000 | |
117 |
|
117 | |||
118 | diff -r 000000000000 a |
|
118 | diff -r 000000000000 a | |
119 | --- /dev/null * (glob) |
|
119 | --- /dev/null * (glob) |
@@ -421,7 +421,7 b" both into 'revision' and 'patch file und" | |||||
421 | # HG changeset patch |
|
421 | # HG changeset patch | |
422 | # User test |
|
422 | # User test | |
423 | # Date 0 0 |
|
423 | # Date 0 0 | |
424 | # Parent f499373e340cdca5d01dee904aeb42dd2a325e71 |
|
424 | # Parent f499373e340cdca5d01dee904aeb42dd2a325e71 | |
425 |
|
425 | |||
426 | diff -r f499373e340c -r f69e96d86e75 .hgsub |
|
426 | diff -r f499373e340c -r f69e96d86e75 .hgsub | |
427 | --- /dev/null |
|
427 | --- /dev/null | |
@@ -484,7 +484,7 b' check whether qrefresh imports updated .' | |||||
484 | # HG changeset patch |
|
484 | # HG changeset patch | |
485 | # Date 0 0 |
|
485 | # Date 0 0 | |
486 | # User test |
|
486 | # User test | |
487 | # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 |
|
487 | # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 | |
488 |
|
488 | |||
489 | diff -r 05b056bb9c8c .hgsubstate |
|
489 | diff -r 05b056bb9c8c .hgsubstate | |
490 | --- a/.hgsubstate |
|
490 | --- a/.hgsubstate | |
@@ -509,7 +509,7 b' check whether qrefresh imports updated .' | |||||
509 | # HG changeset patch |
|
509 | # HG changeset patch | |
510 | # Date 0 0 |
|
510 | # Date 0 0 | |
511 | # User test |
|
511 | # User test | |
512 | # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 |
|
512 | # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 | |
513 |
|
513 | |||
514 | diff -r 05b056bb9c8c .hgsubstate |
|
514 | diff -r 05b056bb9c8c .hgsubstate | |
515 | --- a/.hgsubstate |
|
515 | --- a/.hgsubstate | |
@@ -556,7 +556,7 b' check whether qrefresh imports updated .' | |||||
556 | # HG changeset patch |
|
556 | # HG changeset patch | |
557 | # User test |
|
557 | # User test | |
558 | # Date 0 0 |
|
558 | # Date 0 0 | |
559 | # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa |
|
559 | # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa | |
560 |
|
560 | |||
561 | diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate |
|
561 | diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate | |
562 | --- a/.hgsubstate |
|
562 | --- a/.hgsubstate |
General Comments 0
You need to be logged in to leave comments.
Login now