mercurial/mergeutil.py
author Pulkit Goyal <pulkit@yandex-team.ru>
Wed, 05 Sep 2018 01:18:29 +0530
changeset 39572 b6b9488aae4c
parent 30494 c1149533676b
child 43076 2372284d9457
permissions -rw-r--r--
setup: don't support py 3.5.0, 3.5.1, 3.5.2 because of bug in codecs codecs.escape_encode() raises SystemError if an empty bytestring is passed. We do that at some places in our code and because of this bug, things break. Therefore we can't support the mentioned version. The bug was fixed in 3.5.3, 3.6.0 beta 2. We can't support 3.6.0 anyway because of bug in formatting bytestrings. Link to the python bug: https://bugs.python.org/issue25270 Differential Revision: https://phab.mercurial-scm.org/D4475

# mergeutil.py - help for merge processing in mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@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 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'))