[PATCH 0 of 1] keyword: label kwfiles output for color

Steve Borho steve at borho.org
Mon May 10 08:44:09 CDT 2010


On Sat, May 8, 2010 at 12:51 PM, Eric Eisner <ede at mit.edu> wrote:
> On Sat, May 8, 2010 at 13:40, Steve Borho <steve at borho.org> wrote:
>> It would be nice if there was a simple fall-back mechanism, where you
>> could say something like:
>>
>> label = color.try('kwfiles.broken', 'status.missing')
>
> I like this fall-back idea, which could be indicated as a
> space/colon-separated preference list of defined labels:
>
> ui.write('broken', label='kwfile.broken status.missing')
>
> which would label as the first one listed that is defined.
>
> I think there can/should be a lot of overlap of the default labels for
> a cohesive experience among different commands that do similar things.
> A preference list would allow a user to override for more specific
> commands.

We already use space delimited labels to mean "and", so it needs a new
mechanism.

--
Steve Borho


More information about the Mercurial-devel mailing list