[PATCH 0/3] Add basic support for series of patches

Jeremy Kerr jk at ozlabs.org
Mon Jan 7 21:55:19 EST 2013


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.

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 :)

One really helpful thing would be some contributions for testcases; 
especially when the parser receives patches out-of-order.

Cheers,


Jeremy


More information about the Patchwork mailing list