changeset 15148:510184e5a09e

mq.strip: allow -r option, optionally Other commands let -r to be used for revisions, so just for syntactic consistency, it's nice to have it for strip as well
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 20 Sep 2011 15:02:00 -0500
parents 395ca8cd2669
children eaec9cf91aea
files hgext/mq.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Sep 20 20:21:04 2011 +0200
+++ b/hgext/mq.py	Tue Sep 20 15:02:00 2011 -0500
@@ -2677,7 +2677,11 @@
     return 0
 
 @command("strip",
-         [('f', 'force', None, _('force removal of changesets, discard '
+         [
+          ('r', 'rev', [], _('strip specified revision (optional, '
+                               'can specify revisions without this '
+                               'option)'), _('REV')),
+          ('f', 'force', None, _('force removal of changesets, discard '
                                  'uncommitted changes (no backup)')),
           ('b', 'backup', None, _('bundle only changesets with local revision'
                                   ' number greater than REV which are not'
@@ -2718,6 +2722,7 @@
         backup = 'none'
 
     cl = repo.changelog
+    revs = list(revs) + opts.get('rev')
     revs = set(scmutil.revrange(repo, revs))
     if not revs:
         raise util.Abort(_('empty revision set'))