tests/failfilemerge.py
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Feb 2022 18:18:35 -0700
changeset 48845 5c8148cd7f13
parent 48432 f45a4a47f6a8
child 48875 6000f5b25c9b
permissions -rw-r--r--
automation: drop support for Python 2.7 in Linux environment We stop installing Python 2.7 via pyenv. We stop installing the system Python 2 packages. We delete support for running tests on Python 2.7. Differential Revision: https://phab.mercurial-scm.org/D12262

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