tests/failfilemerge.py
author Matt Harbison <matt_harbison@yahoo.com>
Mon, 03 Feb 2020 20:12:47 -0500
branchstable
changeset 44242 847e582f3cc9
parent 43076 2372284d9457
child 45681 a736ab681b78
permissions -rw-r--r--
packaging: make the path to Win32 requirements absolute when building WiX Otherwise this broke automation when not launched from `contrib/packaging`. Differential Revision: https://phab.mercurial-scm.org/D8068

# 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("^C")
    return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)


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