comparison mercurial/merge.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 89a2afe31e82
children 135056e8b5a8
comparison
equal deleted inserted replaced
46360:1726a53a8494 46361:dfca84970da8
1918 ### check phase 1918 ### check phase
1919 if not overwrite: 1919 if not overwrite:
1920 if len(pl) > 1: 1920 if len(pl) > 1:
1921 raise error.Abort(_(b"outstanding uncommitted merge")) 1921 raise error.Abort(_(b"outstanding uncommitted merge"))
1922 ms = wc.mergestate() 1922 ms = wc.mergestate()
1923 if list(ms.unresolved()): 1923 if ms.unresolvedcount():
1924 raise error.Abort( 1924 raise error.Abort(
1925 _(b"outstanding merge conflicts"), 1925 _(b"outstanding merge conflicts"),
1926 hint=_(b"use 'hg resolve' to resolve"), 1926 hint=_(b"use 'hg resolve' to resolve"),
1927 ) 1927 )
1928 if branchmerge: 1928 if branchmerge: