# HG changeset patch # User Pierre-Yves David # Date 1500837676 -7200 # Node ID 1b7b9acda2a9153346e873e88df61d818a3344da # Parent 06ee4ec8819025ecd045f43dee92602aafc12d67 touch: use precheck to validate revision This gives us standard check and standard error message. diff -r 06ee4ec88190 -r 1b7b9acda2a9 hgext3rd/evolve/cmdrewrite.py --- 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