view tests/failfilemerge.py @ 50012:d68b71256c33

win32text: clean up and clarify the post-revert hack of dirstate The change is unrelated to changing parents and should not be a in a "changing_parents" context. This call is quite hacky, but now it is at least explicitly hacky. We will drop the `changing_parents` context in the next changesets, but we kept this change simple to help readability.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Feb 2023 00:29:39 +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)