Show More
@@ -59,6 +59,7 b' def extract(ui, fileobj):' | |||
|
59 | 59 | |
|
60 | 60 | subject = msg['Subject'] |
|
61 | 61 | user = msg['From'] |
|
62 | gitsendmail = 'git-send-email' in msg.get('X-Mailer', '') | |
|
62 | 63 | # should try to parse msg['Date'] |
|
63 | 64 | date = None |
|
64 | 65 | nodeid = None |
@@ -111,7 +112,7 b' def extract(ui, fileobj):' | |||
|
111 | 112 | nodeid = line[10:] |
|
112 | 113 | elif line.startswith("# Parent "): |
|
113 | 114 | parents.append(line[10:]) |
|
114 |
elif line == '---' and |
|
|
115 | elif line == '---' and gitsendmail: | |
|
115 | 116 | ignoretext = True |
|
116 | 117 | if not line.startswith('# ') and not ignoretext: |
|
117 | 118 | cfp.write(line) |
@@ -94,10 +94,11 b' hg --cwd b tip | grep second' | |||
|
94 | 94 | rm -r b |
|
95 | 95 | |
|
96 | 96 | # subject: duplicate detection, removal of [PATCH] |
|
97 | # The '---' tests the gitsendmail handling without proper mail headers | |
|
97 | 98 | cat > mkmsg2.py <<EOF |
|
98 | 99 | import email.Message, sys |
|
99 | 100 | msg = email.Message.Message() |
|
100 | msg.set_payload('email patch\n\nnext line\n' + open('tip.patch').read()) | |
|
101 | msg.set_payload('email patch\n\nnext line\n---\n' + open('tip.patch').read()) | |
|
101 | 102 | msg['Subject'] = '[PATCH] email patch' |
|
102 | 103 | msg['From'] = 'email patcher' |
|
103 | 104 | sys.stdout.write(msg.as_string()) |
General Comments 0
You need to be logged in to leave comments.
Login now