diff mercurial/shelve.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 82edad33fd81
children e571fec5b606
line wrap: on
line diff
--- a/mercurial/shelve.py	Fri Jan 15 01:20:47 2021 +0100
+++ b/mercurial/shelve.py	Mon May 18 17:29:53 2020 -0400
@@ -812,7 +812,7 @@
     with repo.lock():
         checkparents(repo, state)
         ms = mergestatemod.mergestate.read(repo)
-        if list(ms.unresolved()):
+        if ms.unresolvedcount():
             raise error.Abort(
                 _(b"unresolved conflicts, can't continue"),
                 hint=_(b"see 'hg resolve', then 'hg unshelve --continue'"),