Merging patches
Mauro Carvalho Chehab
mchehab at redhat.com
Thu Feb 11 10:59:24 EST 2010
martin f krafft wrote:
> also sprach Mauro Carvalho Chehab <mchehab at redhat.com> [2010.02.10.2344 +1300]:
>>> So detecting this relation automatically is kinda difficult,
>>> based only on the threading info.
>> If the follow-up patch has the in-reply-to, you can use the patch
>> sequence number to identify two unrelated patches on the same
>> series (btw, it would be great to store the patch sequence number
>> on a series and consider it when ordering patches). Also, if the
>> in-reply-to were generated against a "patch 0", all the patches on
>> the series will refer to the same message that weren't stored. It
>> shouldn't be hard to catch this.
>
> I don't think it's wise to rely on the series numbering in the
> subject, which is simply a convention and not really a standard.
Well, sending a patch at unified diff format is also a convention, but people
follows it. It is a very good assumption that a reply patch, without anything
like Re:/Fwd: and with a sequencial numbering of xxx/yyy to belong to a patch
series.
> However, assuming we could identify a patch series, wouldn't it make
> sense to automatically create a bundle?
Maybe, but someone will need to provide a bundle name.
>> For a replacement patch, you may try to use an algorithm like what
>> -git does: get only the diff and compare the previous and the new
>> version. If they are very close, you may consider the reply as
>> a replacement.
>
> How does Git do this?
I never look at -git source code where this check is done, but, as the
source code is available and well written, I think it shouldn't be hard
to port it to patchwork.
Cheers,
Mauro
More information about the Patchwork
mailing list