# HG changeset patch # User Anton Shestakov # Date 2018-11-14 07:05:38 # Node ID 8c6329fa603804dc786a4a68c6f673351aca4fcc # Parent acd17caa699a91f7b7c5b8353e209bc0faea3c28 rewriteutil: move publicrevs closer to where it's used diff --git a/mercurial/rewriteutil.py b/mercurial/rewriteutil.py --- a/mercurial/rewriteutil.py +++ b/mercurial/rewriteutil.py @@ -27,10 +27,10 @@ def precheck(repo, revs, action='rewrite hint = _("no changeset checked out") raise error.Abort(msg, hint=hint) - publicrevs = repo.revs('%ld and public()', revs) if len(repo[None].parents()) > 1: raise error.Abort(_("cannot %s while merging") % action) + publicrevs = repo.revs('%ld and public()', revs) if publicrevs: msg = _("cannot %s public changesets") % (action) hint = _("see 'hg help phases' for details")