[PATCH 0 of 2] mq: rename strip --nobackup option to --no-backup (issue2377)

Christian Ebert blacktrash at gmx.net
Tue Sep 14 15:16:54 CDT 2010


Hi,

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
(speed?).

c


More information about the Mercurial-devel mailing list