prune: rename --new to --succ stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 04 Feb 2013 17:51:27 +0100
branchstable
changeset 682 6cbb52a8401b
parent 681 eff18fcaaddc
child 683 6d24bd455f79
prune: rename --new to --succ This is closer to want the documentation says.
hgext/evolve.py
--- a/hgext/evolve.py	Mon Feb 04 17:45:38 2013 +0100
+++ b/hgext/evolve.py	Mon Feb 04 17:51:27 2013 +0100
@@ -1238,7 +1238,8 @@
         return 1
 
 @command('^prune|obsolete|kill',
-    [('n', 'new', [], _("successor changeset")),
+    [('n', 'new', [], _("successor changeset (DEPRECATED)")),
+     ('s', 'succ', [], _("successor changeset")),
      ('r', 'rev', [], _("revisions to prune"))],
     _('[OPTION] [-r] REV...'))
 def cmdprune(ui, repo, *revs, **opts):
@@ -1253,11 +1254,12 @@
     """
     revs = list(revs)
     revs.extend(opts['rev'])
+    succs = opts['new'] + opts['succ']
     wlock = repo.wlock()
     try:
         lock = repo.lock()
         try:
-            new = set(scmutil.revrange(repo, opts['new']))
+            new = set(scmutil.revrange(repo, succs))
             targetnodes = set(scmutil.revrange(repo, revs))
             if not targetnodes:
                 raise util.Abort('nothing to prune')