revert: introduce short option -C for --no-backup
authorAdrian Buehlmann <adrian@cadifra.com>
Tue, 02 Aug 2011 11:32:39 +0200
changeset 15009 caa5283390f8
parent 15008 d0424f39984c
child 15010 c3114acd8ea2
revert: introduce short option -C for --no-backup Corresponds to -C of the update command. It's much more convenient to use: $ hg revert -aC than having to type $ hg revert -a --no-backup I think the 'no-backup' case is a frequent use case. Introducing short option -C here fits with the muscle memory we have from 'hg update -C', which is described there as "discard uncommitted changes (no backup)".
mercurial/commands.py
--- a/mercurial/commands.py	Mon Aug 01 18:10:05 2011 -0500
+++ b/mercurial/commands.py	Tue Aug 02 11:32:39 2011 +0200
@@ -4147,7 +4147,7 @@
     [('a', 'all', None, _('revert all changes when no arguments given')),
     ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
     ('r', 'rev', '', _('revert to the specified revision'), _('REV')),
-    ('', 'no-backup', None, _('do not save backup copies of files')),
+    ('C', 'no-backup', None, _('do not save backup copies of files')),
     ] + walkopts + dryrunopts,
     _('[OPTION]... [-r REV] [NAME]...'))
 def revert(ui, repo, *pats, **opts):