[PATCH 5/5] series: fix obvious breakage for patches with ']' in the name

Sean Farley sean at farley.io
Fri Jul 14 03:38:12 AEST 2017

Stephen Finucane <stephen at that.guru> writes:

> On Wed, 2017-07-12 at 11:28 -0700, Sean Farley wrote:
>> Stephen Finucane <stephen at that.guru> writes:
>> > On Tue, 2017-07-11 at 11:41 -0700, Sean Farley wrote:
>> > > This copies the same regex that parse uses to find the name. Perhaps
>> > > future work should abstract this into a common method.
>> > > 
>> > > Signed-off-by: Sean Farley <sean at farley.io>
> [snip]
>> > 
>> > I'll admit, I initially thought this was wrong. The above will only handle
>> > a single prefix (e.g. '[xxx] subject') and I thought you'd want to handle
>> > multiple prefixes (e.g. '[xxx] [yyy] subject'). However, we don't store the
>> > raw subject in 'Submission.name' - rather, we take the original subject and
>> > clean it up, and then store this [1]. After this cleanup, the subject is
>> > formatted [2] as such:
>> > 
>> >   [xxx,yyy,...] subject
>> > 
>> > ...so we'd only ever have to strip one set of prefixes.
>> > 
>> > > @property
>> > > def received_total(self):
>> > 
>> > I've added a note to the above effect and applied the patch.
>> Oh, that's some nice analysis; thanks! I found the whole series name
>> definition to be a bit wonky. Is there a definition of what it should
>> be?
> Yeah, we use (a) user-defined names, (b) cover letter subjects (without tags),
> and (c) the subject of the first patch to hand (without tags), in that order of
> preference. The comment in 'patchwork.models.Series.add_cover_letter' [1]
> explains this in detail. The commit this was added in [2] might also be worth
> checking out.

Oh, nice! I was hacking around trying to get a better looking series
name. Basically, unioning the flags and taking the name (without the
[foo] stuff) so that it would look like:

series: change a method

but in the webui, you'd be able to see colored lozenges that are the
labels / tags / whatever you want to call them. My end goal was to have
a new page that just lists the series (instead of the patches)
augmented with a few labels.

Does that sound like something people would be interested in here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20170713/2a1e15e4/attachment.sig>

More information about the Patchwork mailing list