--- a/mercurial/cmdutil.py Wed Nov 02 18:56:07 2016 +0000
+++ b/mercurial/cmdutil.py Wed Nov 02 18:45:53 2016 +0000
@@ -3403,6 +3403,14 @@
return cmd
+def checkunresolved(ms):
+ if list(ms.unresolved()):
+ raise error.Abort(_("unresolved merge conflicts "
+ "(see 'hg help resolve')"))
+ if ms.mdstate() != 's' or list(ms.driverresolved()):
+ raise error.Abort(_('driver-resolved merge conflicts'),
+ hint=_('run "hg resolve --all" to resolve'))
+
# a list of (ui, repo, otherpeer, opts, missing) functions called by
# commands.outgoing. "missing" is "missing" of the result of
# "findcommonoutgoing()"