Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-27 Thread Andrew Donnellan
On 27/10/16 20:29, Stephen Finucane wrote: +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

Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-27 Thread Stephen Finucane
On 2016-10-27 08:51, Andrew Donnellan wrote: On 16/10/16 23:50, Stephen Finucane wrote: It is now possible to parse and store series, so do just that. The parsing at the moment is based on both RFC822 headers and subject lines. Signed-off-by: Stephen Finucane One minor issue below. Reviewed

Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-27 Thread Andrew Donnellan
On 16/10/16 23:50, Stephen Finucane wrote: It is now possible to parse and store series, so do just that. The parsing at the moment is based on both RFC822 headers and subject lines. Signed-off-by: Stephen Finucane One minor issue below. Reviewed-by: Andrew Donnellan +def parse_version(su

Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-26 Thread Daniel Axtens
Hi Stephen, >> Hopefully I've understood what's going on here: >> - first, check for a Series that directly matches this message's >>message id (hence the True to find_references) >> - then, check for a series that matches an In-Reply-To >> - then, check for a series that matches the Refere

Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-26 Thread Stephen Finucane
On 2016-10-26 09:24, Daniel Axtens wrote: Hi Stephen, +for ref in find_references(mail, True): +# try parsing by RFC5322 fields first +try: +return SeriesReference.objects.get(msgid=ref).series +except SeriesReference.DoesNotExist: +pass Hop

Re: [PATCH v6 3/8] parser: Add series parsing

2016-10-26 Thread Daniel Axtens
Hi Stephen, > +for ref in find_references(mail, True): > +# try parsing by RFC5322 fields first > +try: > +return SeriesReference.objects.get(msgid=ref).series > +except SeriesReference.DoesNotExist: > +pass Hopefully I've understood what's goin

[PATCH v6 3/8] parser: Add series parsing

2016-10-16 Thread Stephen Finucane
It is now possible to parse and store series, so do just that. The parsing at the moment is based on both RFC822 headers and subject lines. Signed-off-by: Stephen Finucane --- v4: - Update per new 'SeriesRevision'-'Patch' relationship v3: - Rework how nested series are handled once again - Don't