[PATCH v5 0/7] Add series support

Stephen Finucane stephen at that.guru
Thu Oct 13 21:19:38 AEDT 2016


On 2016-10-12 23:41, Daniel Axtens wrote:
> Daniel Axtens <dja at axtens.net> writes:
> 
>>>> - "untitled series #420" is certainly better than having every 
>>>> series
>>>> named
>>>> "untitled series", but I still think it's worse than "series 
>>>> starting
>>>> with
>>>> '[1/10] add foo to bar'"
>>> 
>>> Should be trivial enough change. I wonder if we should save this into
>>> the db on calculate it on the fly like I do for 'untitled series'? 
>>> I'll
>>> need to benchmark it and if the former is no slower, then this can be 
>>> a
>>> follow-up patch. If the latter is more performant, we'll need to 
>>> respin.
>> 
>> So this is the only one I'm at all concerned about potentially needing 
>> a
>> respin.
>> 
>> You'd have to find the first patch in the series to work it out. I'm a
>> bit nervous that would be expensive.
>> 
> Oh, one potential complexity - do we handle the case where the patches
> arrive with correct headers but are received out of order? In that 
> case,
> this is a pretty tricky problem.

I'm thinking something like this:


     def add_cover(cover):
         ...
         if not series.name or series.name.startswith('Series starting 
with '):
             series.name = cover.name.split(']')[:-1]
         ...

i.e. if the subject was automatically set then we overwrite it with more 
recent information. If it was manually set then don't touch it.

Thoughts?

Stephen


More information about the Patchwork mailing list