[PATCH 0/3] Add basic support for series of patches
dianders at chromium.org
Tue Jan 8 03:50:35 EST 2013
On Mon, Jan 7, 2013 at 2:55 AM, Jeremy Kerr <jk at ozlabs.org> wrote:
> Hi Doug,
>> This series of patches replaces the old patch "pwclient: Add
>> heuristics to find a whole series of patches" and moves the concept of
>> a patch series over to the server side.
> I'd like to propose a different way of achieving this: rather than try to
> piece-together the patch series at query time, I think it'd be better to
> construct the series when the patches are first parsed. Here we can use both
> the message ids (ie, In-Reply-To and References headers) and the subjects to
> link patches into their correct series.
Constructing the series as things are parsed does seem cleaner.
However, a few thoughts:
* It looks like "In-Reply-To" isn't super easy as a method for
collecting groups of patches since git send-email can run in a number
of different modes (chained replies vs not and also the "in-reply-to"
option). It could be used (and would be more robust than my
heuristics), but we need to be careful to test all of the different
* In practice, the heuristics that I've used seem to work really well
to identify groups of patches. I have yet to see them fail as long as
all of the patches are actually visible.
> I'm working on some changes to do this, which will need some updates to the
> patchwork model structure. Either:
> 1) Keeping the Patch objects as they are, and introducing a Series model
> which keeps track of patches within a series; or
> 2) Adding a superclass model ("Item"), which has three subclasses: Patch,
> PullRequest and Series. All of the current "patch lists" now become lists of
> these Item instances, which may actually be one of the three subclasses.
> The second approach is more work, but might make for cleaner views. So, I'm
> doing some experimentation now, and will post my code in a separate branch
> for some initial testing once it's workable. Comments and suggestions most
> welcome :)
OK, sounds good. I don't have a strong opinion since I don't know
that part of the patchwork code too well. I'm happy to look over your
changes, though I probably won't be able to keep doing heavy
contribution of patches, since I've got to get back to my normal job.
> One really helpful thing would be some contributions for testcases;
> especially when the parser receives patches out-of-order.
What format are you looking for for test cases? I'm happy to dig
through email folders and find some interesting ones.
More information about the Patchwork