Mercurial > public > mercurial-scm > hg
diff hgext/fix.py @ 46361: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 | 464539c305aa |
children | eb2a6f66c463 |
line wrap: on
line diff
--- a/hgext/fix.py Fri Jan 15 01:20:47 2021 +0100 +++ b/hgext/fix.py Mon May 18 17:29:53 2020 -0400 @@ -433,8 +433,9 @@ if not (len(revs) == 1 and wdirrev in revs): cmdutil.checkunfinished(repo) rewriteutil.precheck(repo, revs, b'fix') - if wdirrev in revs and list( - mergestatemod.mergestate.read(repo).unresolved() + if ( + wdirrev in revs + and mergestatemod.mergestate.read(repo).unresolvedcount() ): raise error.Abort(b'unresolved conflicts', hint=b"use 'hg resolve'") if not revs: