Show More
@@ -142,7 +142,7 b" configitem('patchbomb', 'to'," | |||||
142 | if pycompat.ispy3: |
|
142 | if pycompat.ispy3: | |
143 | _bytesgenerator = emailgen.BytesGenerator |
|
143 | _bytesgenerator = emailgen.BytesGenerator | |
144 | else: |
|
144 | else: | |
145 |
_bytesgenerator = |
|
145 | _bytesgenerator = emailgen.Generator | |
146 |
|
146 | |||
147 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
147 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |
148 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
148 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
@@ -806,8 +806,7 b' def email(ui, repo, *revs, **opts):' | |||||
806 | if opts.get('test'): |
|
806 | if opts.get('test'): | |
807 | ui.status(_('displaying '), subj, ' ...\n') |
|
807 | ui.status(_('displaying '), subj, ' ...\n') | |
808 | ui.pager('email') |
|
808 | ui.pager('email') | |
809 |
generator = |
|
809 | generator = _bytesgenerator(ui, mangle_from_=False) | |
810 | mangle_from_=False) |
|
|||
811 | try: |
|
810 | try: | |
812 | generator.flatten(m, 0) |
|
811 | generator.flatten(m, 0) | |
813 | ui.write('\n') |
|
812 | ui.write('\n') | |
@@ -823,8 +822,7 b' def email(ui, repo, *revs, **opts):' | |||||
823 | # Exim does not remove the Bcc field |
|
822 | # Exim does not remove the Bcc field | |
824 | del m['Bcc'] |
|
823 | del m['Bcc'] | |
825 | fp = stringio() |
|
824 | fp = stringio() | |
826 |
generator = |
|
825 | generator = _bytesgenerator(fp, mangle_from_=False) | |
827 | mangle_from_=False) |
|
|||
828 | generator.flatten(m, 0) |
|
826 | generator.flatten(m, 0) | |
829 | alldests = to + bcc + cc |
|
827 | alldests = to + bcc + cc | |
830 | alldests = [encoding.strfromlocal(d) for d in alldests] |
|
828 | alldests = [encoding.strfromlocal(d) for d in alldests] |
General Comments 0
You need to be logged in to leave comments.
Login now