changeset 40636:8c6329fa6038

rewriteutil: move publicrevs closer to where it's used
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 14 Nov 2018 15:05:38 +0800
parents acd17caa699a
children a182dc714afa
files mercurial/rewriteutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/rewriteutil.py	Wed Nov 14 11:30:46 2018 -0800
+++ b/mercurial/rewriteutil.py	Wed Nov 14 15:05:38 2018 +0800
@@ -27,10 +27,10 @@
         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")