comparison mercurial/cmdutil.py @ 30494: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 762c8a128357
children 002fa4d79466
comparison
equal deleted inserted replaced
30493:762c8a128357 30494:c1149533676b
32 error, 32 error,
33 formatter, 33 formatter,
34 graphmod, 34 graphmod,
35 lock as lockmod, 35 lock as lockmod,
36 match as matchmod, 36 match as matchmod,
37 mergeutil,
37 obsolete, 38 obsolete,
38 patch, 39 patch,
39 pathutil, 40 pathutil,
40 phases, 41 phases,
41 repair, 42 repair,
3405 return func 3406 return func
3406 return decorator 3407 return decorator
3407 3408
3408 return cmd 3409 return cmd
3409 3410
3410 def checkunresolved(ms): 3411 checkunresolved = mergeutil.checkunresolved
3411 if list(ms.unresolved()):
3412 raise error.Abort(_("unresolved merge conflicts "
3413 "(see 'hg help resolve')"))
3414 if ms.mdstate() != 's' or list(ms.driverresolved()):
3415 raise error.Abort(_('driver-resolved merge conflicts'),
3416 hint=_('run "hg resolve --all" to resolve'))
3417 3412
3418 # a list of (ui, repo, otherpeer, opts, missing) functions called by 3413 # a list of (ui, repo, otherpeer, opts, missing) functions called by
3419 # commands.outgoing. "missing" is "missing" of the result of 3414 # commands.outgoing. "missing" is "missing" of the result of
3420 # "findcommonoutgoing()" 3415 # "findcommonoutgoing()"
3421 outgoinghooks = util.hooks() 3416 outgoinghooks = util.hooks()