tests/failfilemerge.py
author Augie Fackler <augie@google.com>
Mon, 07 Jun 2021 17:10:35 -0400
changeset 47403 8a6e6b62b9a3
parent 45681 a736ab681b78
child 48426 de8181c5414d
permissions -rw-r--r--
merge: with stable

# extension to emulate interrupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    error,
    extensions,
    filemerge,
)


def failfilemerge(
    filemergefn, premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None
):
    raise error.Abort(b"^C")
    return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)


def extsetup(ui):
    extensions.wrapfunction(filemerge, '_filemerge', failfilemerge)