view tests/failfilemerge.py @ 49757:5844cd8e81ca

hg-cpython: upgrade dependencies `hg-cpython` has no BC breaking dependencies, we can group them all in this changeset.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 14 Nov 2022 17:18:56 +0100
parents 6000f5b25c9b
children
line wrap: on
line source

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