tests/failfilemerge.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 21 Feb 2024 11:59:28 +0100
changeset 51415 1df8d84e7c99
parent 48875 6000f5b25c9b
permissions -rw-r--r--
phases: gather the logic for phasesets update in a single method This logic is duplicated around for no good reason, we gather it in a single place. The conditional is the new function are a bit weird as we about going to extend it soon.

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