Show More
@@ -7,7 +7,7 b'' | |||
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | import email | |
|
10 | import email.parser as emailparser | |
|
11 | 11 | import os |
|
12 | 12 | import shutil |
|
13 | 13 | import stat |
@@ -63,7 +63,7 b' class gnuarch_source(common.converter_so' | |||
|
63 | 63 | self.changes = {} |
|
64 | 64 | self.parents = {} |
|
65 | 65 | self.tags = {} |
|
66 |
self.catlogparser = email |
|
|
66 | self.catlogparser = emailparser.Parser() | |
|
67 | 67 | self.encoding = encoding.encoding |
|
68 | 68 | self.archives = [] |
|
69 | 69 |
@@ -135,6 +135,7 b' web.baseurl' | |||
|
135 | 135 | from __future__ import absolute_import |
|
136 | 136 | |
|
137 | 137 | import email |
|
138 | import email.parser as emailparser | |
|
138 | 139 | import fnmatch |
|
139 | 140 | import socket |
|
140 | 141 | import time |
@@ -339,7 +340,7 b' class notifier(object):' | |||
|
339 | 340 | 'and revset\n') |
|
340 | 341 | return |
|
341 | 342 | |
|
342 |
p = email |
|
|
343 | p = emailparser.Parser() | |
|
343 | 344 | try: |
|
344 | 345 | msg = p.parsestr(data) |
|
345 | 346 | except email.Errors.MessageParseError as inst: |
@@ -12,6 +12,7 b' import collections' | |||
|
12 | 12 | import copy |
|
13 | 13 | import difflib |
|
14 | 14 | import email |
|
15 | import email.parser as emailparser | |
|
15 | 16 | import errno |
|
16 | 17 | import hashlib |
|
17 | 18 | import os |
@@ -108,7 +109,7 b' def split(stream):' | |||
|
108 | 109 | cur.append(line) |
|
109 | 110 | c = chunk(cur) |
|
110 | 111 | |
|
111 |
m = email |
|
|
112 | m = emailparser.Parser().parse(c) | |
|
112 | 113 | if not m.is_multipart(): |
|
113 | 114 | yield msgfp(m) |
|
114 | 115 | else: |
@@ -217,7 +218,7 b' def extract(ui, fileobj):' | |||
|
217 | 218 | fd, tmpname = tempfile.mkstemp(prefix='hg-patch-') |
|
218 | 219 | tmpfp = os.fdopen(fd, pycompat.sysstr('w')) |
|
219 | 220 | try: |
|
220 |
msg = email |
|
|
221 | msg = emailparser.Parser().parse(fileobj) | |
|
221 | 222 | |
|
222 | 223 | subject = msg['Subject'] and mail.headdecode(msg['Subject']) |
|
223 | 224 | data['user'] = msg['From'] and mail.headdecode(msg['From']) |
General Comments 0
You need to be logged in to leave comments.
Login now