view mercurial/mergeutil.py @ 46184:cb8b2ee89a5d

copies: stop attempt to avoid extra dict copies around branching In the python code, we attempt to avoid unnecessary dict copies when gathering copy information. However that logic is wobbly and I keep running into case where independent branches affects each others. With the current code we can't ensure we are the only "user" of dict when dealing with merge. This caused havoc in the next series on tests I am about to introduce. So for now I am disabling the faulty optimisation. I believe we will need a dedicated overlay to deal with the "copy on write logic" to have something correct. I am also hoping to find time to build dedicated test case for this category of problem instead of relying on side effect in other tests. However for now I am focussing on another issue. Differential Revision: https://phab.mercurial-scm.org/D9608
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 15 Dec 2020 00:29:29 +0100
parents fa87536d3d70
children dfca84970da8
line wrap: on
line source

# 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.StateError(
            _(b"unresolved merge conflicts (see 'hg help resolve')")
        )