[PATCH 1 of 3] keyword: allow keyword expansion on clone

Christian Ebert blacktrash at gmx.net
Mon Feb 4 12:20:42 CST 2008


* Matt Mackall on Monday, February 04, 2008 at 12:07:19 -0600
> On Mon, 2008-02-04 at 18:58 +0100, Christian Ebert wrote:
>> +    nokwcommands = ('add', 'addremove', 'bundle', 'copy', 'export', 'grep',
>> +                    'identify', 'incoming', 'init', 'log', 'outgoing', 'push',
>> +                    'remove', 'rename', 'rollback', 'tip',
>>                     'convert')
>>     hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:])
>>     if hgcmd in nokwcommands:
> 
> Queued. Though I generally prefer "add addremove bundle...".split().

Like commands.norepo?

I thought about this, and decided against it because

a) it's inside a private function, and not meant to be appendable
b) I don't understand why eg. commands.norepo is not a list in
   the first place

Is splitting a string safer?

Should I make this a top-level variable: keyword.nokwcommands?
And the same for keyword.restricted?

c
-- 
ich bin eine Null eine Null is eine runde Sache
--> <http://www.blacktrash.org/hanullmann/hanullmann.html>


More information about the Mercurial-devel mailing list