tests/failfilemerge.py
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 01 May 2017 07:23:29 +0900
branchstable
changeset 32106 1527b3890674
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
i18n-ja: synchronized with 6e0368b6e0bb

# extension to emulate interrupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    error,
    extensions,
    filemerge,
)

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)