linking revisions of a series

Andy Doan andy.doan at
Sat Mar 18 02:08:19 AEDT 2017

On 03/16/2017 10:10 PM, Sean Farley wrote:
> Andy Doan <andy.doan at> writes:
>> On 03/16/2017 10:04 PM, Sean Farley wrote:
>>> Andy Doan <andy.doan at> writes:
>>>> On 03/16/2017 05:12 PM, Sean Farley wrote:
>>>>> Andy Doan <andy.doan at> writes:

>>>>>> I would very much like to enable automatic superseding. I actually have
>>>>>> some out-of-tree patches for things like that which we use inside
>>>>>> Linaro, and I think its a nice benefit. As described above, I do think
>>>>>> there will need to be some amount of fuzzy-matching involved in case the
>>>>>> author makes a slight change to the series title. However, python has a
>>>>>> really handy "difflib" library that can show if 2 different titles are
>>>>>> X% similar.
>>>>> I was planning doing exactly this (perhaps even using difflib for the
>>>>> patch content). Are your patches somewhere for this?
>>>> I have no patches for this specifically, just a rough idea. I'd be happy
>>>> to help/review/test anything you are doing in this area.
>>> Ah, cool! My idea was as follows:
>>> 1) create a migration to add and patch.previous
>>> 2) runn the difflib on each series for the incoming patches
>>> (2) worries me because of O(n^2). Any thoughts for that?
>> That's my rough thinking. I was hoping to make singly linked list, but I
>> think you need both next and previous. Its not exactly a cheap
>> operation, but you can greatly limit the number of comparisons by only
>> looking at the series objects that match the author and project.
> Yeah, that's true. We could also probably filter out states that are
> archived, too.

One other thing you might consider when you start writing the code: This 
whole idea might be something people prefer to disable and the 
diff-ratio itself might need tweaking over time. So you might enable 
settings variables for these items, so people can adjust in production 
w/o having to upgrade.

More information about the Patchwork mailing list