support -r option in prune, add a test for this stable
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 03 Dec 2012 14:41:14 +0100
branchstable
changeset 644 8e41d5b78dff
parent 643 cb6422fae653
child 645 ca5459892427
child 648 f727ebe6ffd5
support -r option in prune, add a test for this Also localize options in fold.
hgext/evolve.py
tests/test-evolve.t
--- a/hgext/evolve.py	Wed Jan 02 14:28:04 2013 +0100
+++ b/hgext/evolve.py	Mon Dec 03 14:41:14 2012 +0100
@@ -1465,8 +1465,9 @@
         return 1
 
 @command('^prune|obsolete|kill',
-    [('n', 'new', [], _("successor changeset"))],
-    _('[OPTION] REV...'))
+    [('n', 'new', [], _("successor changeset")),
+     ('r', 'rev', [], _("revisions to fold"))],
+    _('[OPTION] [-r] REV...'))
 def kill(ui, repo, *revs, **opts):
     """mark a changeset as obsolete
 
@@ -1477,6 +1478,8 @@
     XXX handle merge
     XXX check immutable first
     """
+    revs = list(revs)
+    revs.extend(opts['rev'])
     wlock = repo.wlock()
     try:
         lock = repo.lock()
@@ -1818,7 +1821,7 @@
         lockmod.release(lock, wlock)
 
 @command('^fold',
-    [('r', 'rev', [], 'revisions to fold'),
+    [('r', 'rev', [], _("revisions to fold")),
     ],
     # allow to choose the seed ?
     _('[-r] revs'))
--- a/tests/test-evolve.t	Wed Jan 02 14:28:04 2013 +0100
+++ b/tests/test-evolve.t	Mon Dec 03 14:41:14 2012 +0100
@@ -79,7 +79,7 @@
 
 test multiple kill
 
-  $ hg kill 4 3
+  $ hg kill 4 -r 3
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at 7c3bad9141dc
   $ hg qlog