tests/failfilemerge.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 26 Mar 2024 08:36:47 +0000
changeset 51544 06671781b04d
parent 48875 6000f5b25c9b
permissions -rw-r--r--
perf-stream-locked-section: actually use v1 generation when requested We were fetching a v1 generator but actually using the v2 function…

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