linking revisions of a series

Sean Farley sean at farley.io
Sat Mar 18 10:38:21 AEDT 2017


Andy Doan <andy.doan at linaro.org> writes:

> On 03/16/2017 10:10 PM, Sean Farley wrote:
>> Andy Doan <andy.doan at linaro.org> writes:
>>
>>> On 03/16/2017 10:04 PM, Sean Farley wrote:
>>>> Andy Doan <andy.doan at linaro.org> writes:
>>>>
>>>>> On 03/16/2017 05:12 PM, Sean Farley wrote:
>>>>>> Andy Doan <andy.doan at linaro.org> 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 patch.next 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.

Yeah, I was definitely thinking about that as well. The migration of
adding next / prev should be fine (and default to None). Then having a
setting for similarity (perhaps 0 means disable or something like that)
should mean that users wouldn't have to upgrade to tweak things.


More information about the Patchwork mailing list