changeset 4446:8232bddf543a stable

touch: use action "touch", not "<function touch at ...>", in precheck I just got this message: abort: cannot <function touch at 0x7fde174b69b0> public changesets: f177c51ae98f It has been this way since 1b7b9acda2a9 (touch: use precheck to validate revision, 2017-07-23).
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 25 Mar 2019 15:45:11 -0700
parents 0f2305921e4d
children 5205e3dedafc 4a00de50bb3b
files CHANGELOG hgext3rd/evolve/cmdrewrite.py tests/test-touch.t
diffstat 3 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Mon Mar 25 15:44:44 2019 -0700
+++ b/CHANGELOG	Mon Mar 25 15:45:11 2019 -0700
@@ -7,6 +7,7 @@
   * split: preserve phases (issue6048)
   * evolve: fix an recoverable state (issue6053)
   * prune: fix error message when pruning public changesets
+  * touch: fix error message when touching public changesets
 
 8.4.0 -- 2019-12-22
 -------------------
--- a/hgext3rd/evolve/cmdrewrite.py	Mon Mar 25 15:44:44 2019 -0700
+++ b/hgext3rd/evolve/cmdrewrite.py	Mon Mar 25 15:45:11 2019 -0700
@@ -1334,7 +1334,7 @@
         ui.write_err('no revision to touch\n')
         return 1
     if not duplicate:
-        rewriteutil.precheck(repo, revs, touch)
+        rewriteutil.precheck(repo, revs, 'touch')
     tmpl = utility.shorttemplate
     displayer = compat.changesetdisplayer(ui, repo, {'template': tmpl})
     wlock = lock = tr = None
--- a/tests/test-touch.t	Mon Mar 25 15:44:44 2019 -0700
+++ b/tests/test-touch.t	Mon Mar 25 15:45:11 2019 -0700
@@ -161,3 +161,12 @@
        rewritten(.*) as [0-9a-f]{12} using touch by test (.*) (re)
          note: testing with no successor
   
+
+Public phase
+
+  $ hg phase --public -r 2
+  $ hg touch 2
+  abort: cannot touch public changesets: * (glob)
+  (see 'hg help phases' for details)
+  [255]
+  $ hg touch --duplicate 2