tests/failfilemerge.py
author pacien <pacien.trangirard@pacien.net>
Fri, 10 Dec 2021 15:27:22 +0100
changeset 48555 8e8737a1fa7d
parent 48477 f45a4a47f6a8
child 48966 6000f5b25c9b
permissions -rw-r--r--
hg-cpython: implement vcsgraph::Graph for our Index Differential Revision: https://phab.mercurial-scm.org/D11946

# extension to emulate interrupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    error,
    extensions,
    filemerge,
)


def failfilemerge(*args, **kwargs):
    raise error.Abort(b"^C")


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