Mercurial > public > mercurial-scm > hg
comparison mercurial/shelve.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 | 82edad33fd81 |
children | e571fec5b606 |
comparison
equal
deleted
inserted
replaced
46360:1726a53a8494 | 46361:dfca84970da8 |
---|---|
810 interactive = state.interactive | 810 interactive = state.interactive |
811 basename = state.name | 811 basename = state.name |
812 with repo.lock(): | 812 with repo.lock(): |
813 checkparents(repo, state) | 813 checkparents(repo, state) |
814 ms = mergestatemod.mergestate.read(repo) | 814 ms = mergestatemod.mergestate.read(repo) |
815 if list(ms.unresolved()): | 815 if ms.unresolvedcount(): |
816 raise error.Abort( | 816 raise error.Abort( |
817 _(b"unresolved conflicts, can't continue"), | 817 _(b"unresolved conflicts, can't continue"), |
818 hint=_(b"see 'hg resolve', then 'hg unshelve --continue'"), | 818 hint=_(b"see 'hg resolve', then 'hg unshelve --continue'"), |
819 ) | 819 ) |
820 | 820 |