Show More
@@ -230,7 +230,7 b' def extract(ui, fileobj):' | |||||
230 | elif line.startswith("# Node ID "): |
|
230 | elif line.startswith("# Node ID "): | |
231 | nodeid = line[10:] |
|
231 | nodeid = line[10:] | |
232 | elif line.startswith("# Parent "): |
|
232 | elif line.startswith("# Parent "): | |
233 |
parents.append(line[ |
|
233 | parents.append(line[9:].lstrip()) | |
234 | elif not line.startswith("# "): |
|
234 | elif not line.startswith("# "): | |
235 | hgpatchheader = False |
|
235 | hgpatchheader = False | |
236 | elif line == '---' and gitsendmail: |
|
236 | elif line == '---' and gitsendmail: |
@@ -1,3 +1,6 b'' | |||||
|
1 | $ echo '[extensions]' >> $HGRCPATH | |||
|
2 | $ echo 'mq =' >> $HGRCPATH | |||
|
3 | ||||
1 | $ cat >findbranch.py <<EOF |
|
4 | $ cat >findbranch.py <<EOF | |
2 | > import re, sys |
|
5 | > import re, sys | |
3 | > |
|
6 | > | |
@@ -55,3 +58,14 b' Make sure import still works with branch' | |||||
55 | applying ../r0.patch |
|
58 | applying ../r0.patch | |
56 | $ hg import --exact ../r1.patch |
|
59 | $ hg import --exact ../r1.patch | |
57 | applying ../r1.patch |
|
60 | applying ../r1.patch | |
|
61 | ||||
|
62 | Test --exact and patch header separators (issue3356) | |||
|
63 | ||||
|
64 | $ hg strip --no-backup . | |||
|
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
66 | >>> import re | |||
|
67 | >>> p = file('../r1.patch', 'rb').read() | |||
|
68 | >>> p = re.sub(r'Parent\s+', 'Parent ', p) | |||
|
69 | >>> file('../r1-ws.patch', 'wb').write(p) | |||
|
70 | $ hg import --exact ../r1-ws.patch | |||
|
71 | applying ../r1-ws.patch |
General Comments 0
You need to be logged in to leave comments.
Login now