diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -928,7 +928,8 @@ def between(repo, old, new, keep): raise util.Abort(_('cannot edit history that contains merges')) root = ctxs[0] # list is already sorted by repo.set if not root.mutable(): - raise util.Abort(_('cannot edit public changeset: %s') % root) + raise util.Abort(_('cannot edit public changeset: %s') % root, + hint=_('see "hg help phases" for details')) return [c.node() for c in ctxs] def makedesc(repo, action, rev): diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -1215,7 +1215,8 @@ def createmarkers(repo, relations, flag= if not prec.mutable(): raise util.Abort("cannot obsolete public changeset: %s" - % prec) + % prec, + hint='see "hg help phases" for details') nprec = prec.node() nsucs = tuple(s.node() for s in sucs) npare = None diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t --- a/tests/test-histedit-obsolete.t +++ b/tests/test-histedit-obsolete.t @@ -220,6 +220,7 @@ Check that histedit respect immutability $ hg histedit -r '.~2' abort: cannot edit public changeset: cb9a9f314b8b + (see "hg help phases" for details) [255]