tests/failfilemerge.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 07 Mar 2024 01:35:43 +0100
changeset 51530 fc710c993ec9
parent 48875 6000f5b25c9b
permissions -rw-r--r--
branchcache: simplify the branch rev cache test We don't need that many content dump and this gets in the way in change in access pattern (e.g. accessing revision in a different order change the order of branches in the "names" file). So we simplify this test in advance.

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