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
--- 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'))