Show More
@@ -182,8 +182,8 b' def extract(ui, fileobj):' | |||
|
182 | 182 | msg = email.Parser.Parser().parse(fileobj) |
|
183 | 183 | |
|
184 | 184 | subject = msg['Subject'] |
|
185 | user = msg['From'] | |
|
186 | if not subject and not user: | |
|
185 | data['user'] = msg['From'] | |
|
186 | if not subject and not data['user']: | |
|
187 | 187 | # Not an email, restore parsed headers if any |
|
188 | 188 | subject = '\n'.join(': '.join(h) for h in msg.items()) + '\n' |
|
189 | 189 | |
@@ -197,8 +197,8 b' def extract(ui, fileobj):' | |||
|
197 | 197 | subject = subject[pend + 1:].lstrip() |
|
198 | 198 | subject = re.sub(r'\n[ \t]+', ' ', subject) |
|
199 | 199 | ui.debug('Subject: %s\n' % subject) |
|
200 | if user: | |
|
201 | ui.debug('From: %s\n' % user) | |
|
200 | if data['user']: | |
|
201 | ui.debug('From: %s\n' % data['user']) | |
|
202 | 202 | diffs_seen = 0 |
|
203 | 203 | ok_types = ('text/plain', 'text/x-diff', 'text/x-patch') |
|
204 | 204 | message = '' |
@@ -228,8 +228,8 b' def extract(ui, fileobj):' | |||
|
228 | 228 | subject = None |
|
229 | 229 | elif hgpatchheader: |
|
230 | 230 | if line.startswith('# User '): |
|
231 | user = line[7:] | |
|
232 | ui.debug('From: %s\n' % user) | |
|
231 | data['user'] = line[7:] | |
|
232 | ui.debug('From: %s\n' % data['user']) | |
|
233 | 233 | elif line.startswith("# Date "): |
|
234 | 234 | data['date'] = line[7:] |
|
235 | 235 | elif line.startswith("# Branch "): |
@@ -260,7 +260,6 b' def extract(ui, fileobj):' | |||
|
260 | 260 | if subject and not message.startswith(subject): |
|
261 | 261 | message = '%s\n%s' % (subject, message) |
|
262 | 262 | data['message'] = message |
|
263 | data['user'] = user | |
|
264 | 263 | tmpfp.close() |
|
265 | 264 | if parents: |
|
266 | 265 | data['p1'] = parents.pop(0) |
General Comments 0
You need to be logged in to leave comments.
Login now