[PATCH 01/15] parsemail: Return the list of prefixes when cleaning up the subject

Finucane, Stephen stephen.finucane at intel.com
Sat Oct 10 10:21:11 AEDT 2015


> The patch is a preparation step towards understanding series. It will be
> handy to parse those prefixes, looking for 'x/n' to retrieve the order
> of a patch in a series.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>

One comments below.

Stephen

> diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
> index c15564e..ae588f0 100755
> --- a/patchwork/bin/parsemail.py
> +++ b/patchwork/bin/parsemail.py
> @@ -213,7 +213,8 @@ def find_content(project, mail):
>      comment = None
> 
>      if pullurl or patchbuf:
> -        name = clean_subject(mail.get('Subject'), [project.linkname])
> +        (name, prefixes) = clean_subject(mail.get('Subject'),
> +                                         [project.linkname])
>          patch = Patch(name = name, pull_url = pullurl, content = patchbuf,
>                      date = mail_date(mail), headers = mail_headers(mail))

Are we using prefixes anywhere? If not, you should replace 'prefixes' with '_' (unnamed variable). If it's used in a later patch (I haven’t read ahead) then ignore this comment.


More information about the Patchwork mailing list