tests/failfilemerge.py
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 27 Mar 2016 13:13:19 -0700
changeset 28653 1eb0bd8adf39
parent 27988 61f4d59e9a0b
child 28772 424c1632fffb
permissions -rw-r--r--
sslutil: add docstring to wrapsocket() Security should not be opaque.

# extension to emulate interupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    filemerge,
    extensions,
    error,
)

def failfilemerge(filemergefn,
        premerge, repo, 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)