linking revisions of a series

Andy Doan andy.doan at linaro.org
Fri Mar 17 14:07:55 AEDT 2017


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:
>>>
>>>> On 03/09/2017 07:46 PM, Florian Fainelli wrote:
>>>>> On 03/08/2017 05:38 AM, Andy Doan wrote:
>>>>>> I was wondering if anyone had interest in adding support to allow
>>>>>> patchwork to somehow track revisions of a series? Basically, I'm needing
>>>>>> to track as series from start to finish and a Series object in patchwork
>>>>>> currently has no links to related series. I have the following rough
>>>>>> idea in mind and wanted to get some feedback before getting too deep
>>>>>> into this.
>>>>>>
>>>>>>  if new series created
>>>>>>      get list of all series with matching project and submitter
>>>>>>      if the subject of one is similar to the new series:
>>>>>>           add some marking (foreign key?) to the new series.
>>>>>>
>>>>>> We'd then have a link-list from start to finish. Is this crazy? Has
>>>>>> anyone tried something like this already?
>>>>>
>>>>> I like the idea, and there seems to be at least two ways this could be
>>>>> helpful:
>>>>>
>>>>> - statistics on the patch series (how many, time between them, etc. etc.)
>>>>> - automatic superseding of patches?
>>>>
>>>> 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.



More information about the Patchwork mailing list