tests/failfilemerge.py
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 15 Dec 2018 22:31:54 -0500
changeset 40969 55fcdb73c88b
parent 34122 c0ce60459d84
child 43076 2372284d9457
permissions -rw-r--r--
py3: quote $PYTHON in test-patchbomb.t for Windows I couldn't get the quoting right in the environment variable, so now it's a function.

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