Commits

Denis Laxalde committed 8e41d5b

support -r option in prune, add a test for this

Also localize options in fold.

Comments (0)

Files changed (2)

         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
 
     XXX handle merge
     XXX check immutable first
     """
+    revs = list(revs)
+    revs.extend(opts['rev'])
     wlock = repo.wlock()
     try:
         lock = repo.lock()
         lockmod.release(lock, wlock)
 
 @command('^fold',
-    [('r', 'rev', [], 'revisions to fold'),
+    [('r', 'rev', [], _("revisions to fold")),
     ],
     # allow to choose the seed ?
     _('[-r] revs'))

tests/test-evolve.t

 
 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