Patchwork [6,of,6] patchbomb: fix wrong argument type when calling mail generator.flatten()

login
register
mail settings
Submitter Denis Laxalde
Date Nov. 13, 2019, 9:59 p.m.
Message ID <9ebd700f9dc4ecccc27c.1573682399@marimba>
Download mbox | patch
Permalink /patch/43165/
State Accepted
Headers show

Comments

Denis Laxalde - Nov. 13, 2019, 9:59 p.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1573661165 -3600
#      Wed Nov 13 17:06:05 2019 +0100
# Node ID 9ebd700f9dc4ecccc27c0bd45dce1108f7a2255b
# Parent  11d514fd71855ace61c549d3154f52569cea9264
patchbomb: fix wrong argument type when calling mail generator.flatten()
Augie Fackler - Nov. 14, 2019, 4:18 a.m.
queued, thanks

> On Nov 13, 2019, at 16:59, Denis Laxalde <denis@laxalde.org> wrote:
> 
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde@logilab.fr>
> # Date 1573661165 -3600
> #      Wed Nov 13 17:06:05 2019 +0100
> # Node ID 9ebd700f9dc4ecccc27c0bd45dce1108f7a2255b
> # Parent  11d514fd71855ace61c549d3154f52569cea9264
> patchbomb: fix wrong argument type when calling mail generator.flatten()
> 
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -958,7 +958,7 @@ def email(ui, repo, *revs, **opts):
>             ui.pager(b'email')
>             generator = mail.Generator(ui, mangle_from_=False)
>             try:
> -                generator.flatten(m, 0)
> +                generator.flatten(m, False)
>                 ui.write(b'\n')
>             except IOError as inst:
>                 if inst.errno != errno.EPIPE:
> @@ -973,7 +973,7 @@ def email(ui, repo, *revs, **opts):
>                 del m['Bcc']
>             fp = stringio()
>             generator = mail.Generator(fp, mangle_from_=False)
> -            generator.flatten(m, 0)
> +            generator.flatten(m, False)
>             alldests = to + bcc + cc
>             sendmail(sender_addr, alldests, fp.getvalue())
> 
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -958,7 +958,7 @@  def email(ui, repo, *revs, **opts):
             ui.pager(b'email')
             generator = mail.Generator(ui, mangle_from_=False)
             try:
-                generator.flatten(m, 0)
+                generator.flatten(m, False)
                 ui.write(b'\n')
             except IOError as inst:
                 if inst.errno != errno.EPIPE:
@@ -973,7 +973,7 @@  def email(ui, repo, *revs, **opts):
                 del m['Bcc']
             fp = stringio()
             generator = mail.Generator(fp, mangle_from_=False)
-            generator.flatten(m, 0)
+            generator.flatten(m, False)
             alldests = to + bcc + cc
             sendmail(sender_addr, alldests, fp.getvalue())