diff mercurial/merge.py @ 46435:dfca84970da8

cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved())) This avoids some pointless copying. Differential Revision: https://phab.mercurial-scm.org/D8566
author Augie Fackler <augie@google.com>
date Mon, 18 May 2020 17:29:53 -0400
parents 89a2afe31e82
children 135056e8b5a8
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jan 15 01:20:47 2021 +0100
+++ b/mercurial/merge.py	Mon May 18 17:29:53 2020 -0400
@@ -1920,7 +1920,7 @@
             if len(pl) > 1:
                 raise error.Abort(_(b"outstanding uncommitted merge"))
             ms = wc.mergestate()
-            if list(ms.unresolved()):
+            if ms.unresolvedcount():
                 raise error.Abort(
                     _(b"outstanding merge conflicts"),
                     hint=_(b"use 'hg resolve' to resolve"),