mercurial/mergeutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 08 Jul 2021 04:29:36 +0200
changeset 47610 f89d3050dcd5
parent 46819 d4ba4d51f85f
child 48875 6000f5b25c9b
permissions -rw-r--r--
resolve: use the `parentchange` context manager to apply merge action In an ideal world, we would not have to do that. However, we are miles away from being ready to not have to do it. So we add this context manager alongside a long comment. This will help use to get to the point were have two distinct API with strict rules about when to call them. Differential Revision: https://phab.mercurial-scm.org/D11074

# mergeutil.py - help for merge processing in mercurial
#
# Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from __future__ import absolute_import

from .i18n import _

from . import error


def checkunresolved(ms):
    if ms.unresolvedcount():
        raise error.StateError(
            _(b"unresolved merge conflicts (see 'hg help resolve')")
        )