mercurial/mergeutil.py
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 21 Sep 2024 13:53:05 -0400
changeset 51893 22e1924e9402
parent 51863 f4733654f144
permissions -rw-r--r--
typing: make `vfs.isfileorlink_checkdir()` path arg required The only caller to this is `merge._checkunknownfile()`, which supplies a value. That's good, because `util.localpath()` immediately uses the value to call a method on it on Windows. The posix implementation returns the value unaltered, but then `pathutil.finddirs_rev_noroot()` would have exploded.

# 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 annotations

from .i18n import _

from . import error


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