changeset 1631:7463f5880ce9

prune: remove the kill alias This have been a long time since the command was rename (over 'kill -1' threat), it is time to get rid of it.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 18 Mar 2016 16:37:49 -0700
parents 35c666ef724e
children 9bcb24c3ba8d
files README hgext/evolve.py tests/test-corrupt.t tests/test-evolve.t tests/test-obsolete-push.t tests/test-stabilize-result.t
diffstat 6 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/README	Thu Mar 17 15:04:05 2016 -0700
+++ b/README	Fri Mar 18 16:37:49 2016 -0700
@@ -62,6 +62,8 @@
   - hg evolve --all with consider all trouble in your current topic,
   - preserve 'topic' during evolve,
   - 'next' and 'prev' restrict themself to the current topic by default,
+  - remove the dangerous 'kill' alias for 'prune' (because 'hg kill -1' without
+    the leading 'hg' will give you an hardtime)
 
 5.3.0 -- 2016-02-11
 
--- a/hgext/evolve.py	Thu Mar 17 15:04:05 2016 -0700
+++ b/hgext/evolve.py	Fri Mar 18 16:37:49 2016 -0700
@@ -2031,7 +2031,7 @@
 /!\ * hg up to the parent of the amended changeset (which are named W and Z)
 /!\ * hg revert --all -r X
 /!\ * hg ci -m "same message as the amended changeset" => new cset Y
-/!\ * hg kill -n Y W Z
+/!\ * hg prune -n Y W Z
 """)
     if progresscb: progresscb()
     emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit')
@@ -2299,7 +2299,7 @@
     return metadata
 
 
-@command('^prune|obsolete|kill',
+@command('^prune|obsolete',
     [('n', 'new', [], _("successor changeset (DEPRECATED)")),
      ('s', 'succ', [], _("successor changeset")),
      ('r', 'rev', [], _("revisions to prune")),
@@ -3071,7 +3071,7 @@
 
 @eh.extsetup
 def oldevolveextsetup(ui):
-    for cmd in ['kill', 'uncommit', 'touch', 'fold']:
+    for cmd in ['prune', 'uncommit', 'touch', 'fold']:
         try:
             entry = extensions.wrapcommand(cmdtable, cmd,
                                            warnobserrors)
--- a/tests/test-corrupt.t	Thu Mar 17 15:04:05 2016 -0700
+++ b/tests/test-corrupt.t	Fri Mar 18 16:37:49 2016 -0700
@@ -101,7 +101,7 @@
      summary:     add A
   
 
-  $ hg kill --fold -n -1 -- -2 -3
+  $ hg prune --fold -n -1 -- -2 -3
   2 changesets pruned
   $ hg push ../other
   pushing to ../other
--- a/tests/test-evolve.t	Thu Mar 17 15:04:05 2016 -0700
+++ b/tests/test-evolve.t	Fri Mar 18 16:37:49 2016 -0700
@@ -112,7 +112,7 @@
 
   $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
   1 public stable
-  $ hg kill 1
+  $ hg prune 1
   abort: cannot prune immutable changeset: 7c3bad9141dc
   (see "hg help phases" for details)
   [255]
@@ -123,7 +123,7 @@
 
   $ hg id -n
   5
-  $ hg kill .
+  $ hg prune .
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at fbb94e3a0ecf
   1 changesets pruned
@@ -136,7 +136,7 @@
 
 test multiple kill
 
-  $ hg kill 4 -r 3
+  $ hg prune 4 -r 3
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at 7c3bad9141dc
   2 changesets pruned
@@ -151,7 +151,7 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo 4 > g
   $ hg add g
-  $ hg kill .
+  $ hg prune .
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at 7c3bad9141dc
   1 changesets pruned
@@ -790,7 +790,7 @@
   adding b
   $ hg mv a c
   $ hg ci -m c
-  $ hg kill .^
+  $ hg prune .^
   1 changesets pruned
   1 new unstable changesets
   $ hg stab --any
--- a/tests/test-obsolete-push.t	Thu Mar 17 15:04:05 2016 -0700
+++ b/tests/test-obsolete-push.t	Fri Mar 18 16:37:49 2016 -0700
@@ -25,7 +25,7 @@
   $ echo c > c
   $ hg ci -qAm C c
   $ hg phase --secret --force .
-  $ hg kill 0 1
+  $ hg prune 0 1
   2 changesets pruned
   1 new unstable changesets
   $ glog --hidden
--- a/tests/test-stabilize-result.t	Thu Mar 17 15:04:05 2016 -0700
+++ b/tests/test-stabilize-result.t	Fri Mar 18 16:37:49 2016 -0700
@@ -366,6 +366,6 @@
   /!\ * hg up to the parent of the amended changeset (which are named W and Z)
   /!\ * hg revert --all -r X
   /!\ * hg ci -m "same message as the amended changeset" => new cset Y
-  /!\ * hg kill -n Y W Z
+  /!\ * hg prune -n Y W Z
   )
   [255]