view mercurial/mergeutil.py @ 31792:55c0c91f55e6

util: document bundle compression An upcoming patch will add support for documenting bundle specifications in more detail. As part of this, we'd like to enumerate available bundle compression formats. In order to do this, we need to provide the help mechanism a dict of names and objects with docstrings. This patch adds docstrings to compengine.bundletype and adds a function for retrieving a dict of them. The code is not yet used.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 01 Apr 2017 13:29:01 -0700
parents c1149533676b
children 2372284d9457
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.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'))