view tests/failfilemerge.py @ 46353:a6c5ec6b4728 stable

contrib: update PyOxidizer to 0.10.3 This is necessary to work around a bug that caused build failures on current stable with 0.9.0. This patch was used to build the 5.7rc0 Windows installers. Differential Revision: https://phab.mercurial-scm.org/D9858
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 24 Jan 2021 18:24:11 -0800
parents a736ab681b78
children de8181c5414d
line wrap: on
line source

# extension to emulate interrupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    error,
    extensions,
    filemerge,
)


def failfilemerge(
    filemergefn, premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None
):
    raise error.Abort(b"^C")
    return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)


def extsetup(ui):
    extensions.wrapfunction(filemerge, '_filemerge', failfilemerge)