[PATCH v2 3/6] parser: Add series parsing
Stephen Finucane
stephenfinucane at hotmail.com
Thu Sep 8 07:11:59 AEST 2016
On 05 Sep 14:31, Russell Currey wrote:
> On Mon, 2016-09-05 at 14:25 +1000, Andrew Donnellan wrote:
> > On 05/09/16 14:19, Russell Currey wrote:
> > >
> > > In testing v2 I found a weird issue I didn't find before.
Try this: in 'find_series', reverse the result of the 'find_references'
call like:
for ref in [mail.get('Message-ID').strip()] + find_references(mail)[::-1]:
This is how it was in the previous revision, but when adding unit tests
I couldn't figure out why and reversed it. If that works then clearly
my test is wrong.
> > > If you send a new series in reply to the cover letter of a previous series,
> > > it
> > > appends the patches to the previous series. This is rather confusing as you
> > > would think any patches sent in reply to a cover letter would belong to that
> > > series, but they clearly should be treated differently in some cases, as you
> > > can
> > > see in the screenshot below:
> > >
> > > https://i.imgur.com/8Yi9IjR.png
> >
> > Or in reply to patch 1 of the initial series - the one in your
> > screenshot doesn't have a cover letter.
>
> Yeah, you're right, good catch.
>
> >
> > >
> > > Maybe use a reset in numbering? This would be harder to parse if both
> > > series
> > > had the same number of patches, I'm imagining something like the following:
> > >
> > > - [1/3] patch sent in reply to cover letter, new series (#1)
> > > - [2/3] patch sent in reply to cover letter, append to #1
> > > - [3/3] patch sent in reply to cover letter, append to #1
> > > - [1/3] patch sent in reply to cover letter, new series (#2)
> > > - [2/3] patch sent in reply to cover letter:
> > > - see that series #2 doesn't have a 2/3
> > > - see that the date of the patch means it's probably for series #2
> > > - append to series #2
> > > - [3/3] is the same as above.
> >
> > This is the sanest approach I think. For each 1/N patch, create a new
> > series.
This shouldn't be necessary thanks to Message-IDs, but we'll see.
Stephen
More information about the Patchwork
mailing list