touch: use precheck to validate revision
This gives us standard check and standard error message.
--- a/hgext3rd/evolve/cmdrewrite.py Sun Jul 23 21:21:11 2017 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py Sun Jul 23 21:21:16 2017 +0200
@@ -856,8 +856,8 @@
if not revs:
ui.write_err('no revision to touch\n')
return 1
- if not duplicate and repo.revs('public() and %ld', revs):
- raise error.Abort("can't touch public revision")
+ if not duplicate:
+ rewriteutil.precheck(repo, revs, touch)
tmpl = utility.shorttemplate
displayer = cmdutil.show_changeset(ui, repo, {'template': tmpl})
wlock = lock = tr = None