prune: use action "prune", not "touch", in precheck
We have been using "touch" since 06ee4ec88190 (prune: use precheck to
validate revision, 2017-07-23). That commit modified the tests, so it
kind seemed intentional, but I suspect it was still just an oversight.
--- a/CHANGELOG Thu Mar 07 01:57:43 2019 +0530
+++ b/CHANGELOG Mon Mar 25 15:44:44 2019 -0700
@@ -6,6 +6,7 @@
* split: preserve phases (issue6048)
* evolve: fix an recoverable state (issue6053)
+ * prune: fix error message when pruning public changesets
8.4.0 -- 2019-12-22
-------------------
--- a/hgext3rd/evolve/cmdrewrite.py Thu Mar 07 01:57:43 2019 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py Mon Mar 25 15:44:44 2019 -0700
@@ -1013,7 +1013,7 @@
try:
wlock = repo.wlock()
lock = repo.lock()
- rewriteutil.precheck(repo, revs, 'touch')
+ rewriteutil.precheck(repo, revs, 'prune')
tr = repo.transaction('prune')
# defines pruned changesets
precs = []
--- a/tests/test-evolve.t Thu Mar 07 01:57:43 2019 +0530
+++ b/tests/test-evolve.t Mon Mar 25 15:44:44 2019 -0700
@@ -145,7 +145,7 @@
$ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
1 public
$ hg prune 1
- abort: cannot touch public changesets: 7c3bad9141dc
+ abort: cannot prune public changesets: 7c3bad9141dc
(see 'hg help phases' for details)
[255]
$ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
@@ -1310,11 +1310,11 @@
$ mkcommit c5_
created new head
$ hg prune '0ef9ff75f8e2 + f1b85956c48c'
- abort: touch will orphan 1 descendants
+ abort: prune will orphan 1 descendants
(see 'hg help evolution.instability')
[255]
$ hg prune '98e171e2f272::0d9203b74542'
- abort: touch will orphan 1 descendants
+ abort: prune will orphan 1 descendants
(see 'hg help evolution.instability')
[255]
$ hg prune '0ef9ff75f8e2::'
--- a/tests/test-prune.t Thu Mar 07 01:57:43 2019 +0530
+++ b/tests/test-prune.t Mon Mar 25 15:44:44 2019 -0700
@@ -92,7 +92,7 @@
cannot prune public changesets
$ hg prune 0
- abort: cannot touch public changesets: 1f0dee641bb7
+ abort: cannot prune public changesets: 1f0dee641bb7
(see 'hg help phases' for details)
[255]
$ hg debugobsolete