view tests/failfilemerge.py @ 49346:75119bbee3d1

hg-cpython: refactor matcher transformation logic This reduces duplication and will allow for recursive transformation in UnionMatcher.
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 08 Jun 2022 15:30:58 +0200
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)