tests/failfilemerge.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 02 May 2022 11:40:33 +0200
changeset 49915 3eac92509484
parent 48966 6000f5b25c9b
permissions -rw-r--r--
dirstate-entry: add `modified` property This was already done in the Rust implementation and is a useful primitive. The C implementation had this called `merged`, but wasn't used anywhere. It will be used in the next changeset.

# extension to emulate interrupting filemerge._filemerge


from mercurial import (
    error,
    extensions,
    filemerge,
)


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


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