comparison mercurial/mergeutil.py @ 30503:c1149533676b

checkunresolved: move to new package to help avoid import cycles This will allow localrepo to stop using cmdutil, which should avoid some future import cycles. There's room for an adventurous soul to delve deeper into merge.py and figure out how to disentangle more of it - it appears to be a nexus of cycle problems. Some of it might be able to move into this new mergeutil package.
author Augie Fackler <augie@google.com>
date Mon, 21 Nov 2016 21:31:45 -0500
parents mercurial/cmdutil.py@762c8a128357
children 2372284d9457
comparison
equal deleted inserted replaced
30502:762c8a128357 30503:c1149533676b
1 # mergeutil.py - help for merge processing in mercurial
2 #
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 #
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
7
8 from __future__ import absolute_import
9
10 from .i18n import _
11
12 from . import (
13 error,
14 )
15
16 def checkunresolved(ms):
17 if list(ms.unresolved()):
18 raise error.Abort(_("unresolved merge conflicts "
19 "(see 'hg help resolve')"))
20 if ms.mdstate() != 's' or list(ms.driverresolved()):
21 raise error.Abort(_('driver-resolved merge conflicts'),
22 hint=_('run "hg resolve --all" to resolve'))