[PATCH 3 of 3] histedit: replace @addhisteditaction with @action
Augie Fackler
raf at durin42.com
Wed Jan 20 03:51:12 UTC 2016
> On Jan 19, 2016, at 9:50 PM, Durham Goode <durham at fb.com> wrote:
>
>
>
> On 1/5/16 10:31 AM, timeless wrote:
>> # HG changeset patch
>> # User timeless <timeless at mozdev.org>
>> # Date 1450906238 0
>> # Wed Dec 23 21:30:38 2015 +0000
>> # Node ID 5b616db6e64040d138152297bff3b62245167917
>> # Parent 0e22d25a49546b65a4eb53ef53f555634afdbef9
>> histedit: replace @addhisteditaction with @action
>>
>> @action supports verbs, messages, priority, and internal
>>
>> messages should be translated.
>> internal means the action should not be listed.
>>
>> geteditcomment will construct the verbs list based on
>> @actions (prefering priority over non priority, otherwise
>> favoring verbs with short forms over verbs without).
>>
>> diff --git a/hgext/histedit.py b/hgext/histedit.py
>> --- a/hgext/histedit.py
>> +++ b/hgext/histedit.py
>> @@ -214,12 +214,19 @@
>> # leave the attribute unspecified.
>> testedwith = 'internal'
>> +actiontable = {}
>> +primaryactions = set()
>> +secondaryactions = set()
>> +tertiaryactions = set()
>> +internalactions = set()
>> +
> I just stumbled on this code and was confused. What is the difference between these 4? Is it just for sorting in the help text?
Yep. Just for ordering so the “most valuable” ones are at the top.
> This seems like a strange way of representing sort order. Why not give each a priority value (from an enum) and just sort on it?
I don’t really feel strongly. If you do, I encourage and welcome follow up patches. ;)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160119/c89a1ed7/attachment.asc>
More information about the Mercurial-devel
mailing list