[PATCH 0 of 2] mq: rename strip --nobackup option to --no-backup (issue2377)
mg at lazybytes.net
Wed Sep 15 02:04:55 CDT 2010
Matt Mackall <mpm at selenic.com> writes:
> On Tue, 2010-09-14 at 22:16 +0200, Christian Ebert wrote:
>> These patches address feature request 2377 and deprecate hg strip
>> --nobackup in favour of hg strip --no-backup, long option name
>> analogous to hg revert --no-backup.
>> Although revert has no corresponding short option and does not
>> exactly the same thing (but at least something similar), I deem the
>> sort of fake consistency better for practical reasons: the user is
>> less prone to mistype the option he is used to from the core command.
>> For this option name change it was necessary to use
>> opts.get('no-backup') instead of opts['no-backup'] to avoid a
>> KeyError. The first patch prepares for this by consistently using
>> opts.get() which is supposed to be better practice anyway. Unless we
>> decide that this is too radical and special rules apply for mq
> Queued, thanks.
We discussed this problem a couple of days ago on IRC and I suggested
that we remove all '-' from the command line options while parsing them.
The code would know the options as 'noupdate', 'nobackup', etc, but we
can update the help texts to show a nicer and more uniform set of names.
I could also imagine a system where we explicitly put in aliases that
map '--noupdate' to '--no-update' while issueing a deprecation warning
at parse time.
But maybe that is too much effort to put into fixing a couple of option
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Mercurial-devel