[PATCH 7 of 7 🚿🍦] patchbomb: extract 'getpatchmsgs' closure in its own function
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Nov 6 18:54:57 UTC 2014
On 11/06/2014 06:08 PM, Martin von Zweigbergk wrote:
>
> On Thu Nov 06 2014 at 7:47:13 AM Pierre-Yves David
> <pierre-yves.david at ens-lyon.org <mailto:pierre-yves.david at ens-lyon.org>>
> wrote:
>
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com
> <mailto:pierre-yves.david at fb.com>>
> # Date 1415274937 0
> # Thu Nov 06 11:55:37 2014 +0000
> # Node ID 3947124af76ea099c53aff2dbb61ff__d1400d61d6
> # Parent 1c2a64da69f91d37af44d0126ea2c3__d73b3a8790
> patchbomb: extract 'getpatchmsgs' closure in its own function
>
> Keep marching toward the promised land of simplification!
>
> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -289,10 +289,44 @@ def _makeintro(repo, sender, patches, **
> msg = mail.mimeencode(ui, body, _charsets, opts.get('test'))
> msg['Subject'] = mail.headencode(ui, subj, _charsets,
> opts.get('test'))
> return (msg, subj, diffstat)
>
> +def _getpatchmsgs(repo, sender, patches, patchnames=None, **opts):
> + """return a list of emails from a list of patches
> +
> + This involve introduction message creation if necessary.
> +
> + This function return a list of "email" tuple (subject, content,
> None).
>
>
> The diffstat doesn't seem to be None in this function.
Good catch.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list