[PATCH 04/10] parsemail: Handle 'xxx (v2)' style messages
Finucane, Stephen
stephen.finucane at intel.com
Fri Jun 24 07:59:18 AEST 2016
On 23 Jun 13:24, Andy Doan wrote:
> On 06/13/2016 05:41 AM, Stephen Finucane wrote:
> >Some emails are received in the above format. Might as well support
> >them.
> >
> >Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
>
> Reviewed-by: Andy Doan <andy.doan at linaro.org>
>
> >---
> > patchwork/bin/parsemail.py | 11 ++++++++---
> > 1 files changed, 8 insertions(+), 3 deletions(-)
> >
> >diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
> >index 1c7ce0f..f52776e 100755
> >--- a/patchwork/bin/parsemail.py
> >+++ b/patchwork/bin/parsemail.py
> >@@ -268,21 +268,26 @@ def parse_series_marker(subject_prefixes):
> > return (None, None)
> >
> >
> >-def parse_version(subject_prefixes):
> >+def parse_version(subject, subject_prefixes):
> > """Extract patch version.
> >
> > Args:
> >+ subject: Main body of subject line
> > subject_prefixes: List of subject prefixes to extract version
> > from
> >
> > Returns:
> > version if found, else 1
> > """
> >- regex = re.compile('^v([0-9]+)$')
> >+ regex = re.compile('^v(\d+)$')
>
> would be a little nicer to have done this in the previous patch to
> reduce noise. no biggie though.
I'll do that for the next revision.
More information about the Patchwork
mailing list