tests/failfilemerge.py
author Boris Feld <boris.feld@octobus.net>
Mon, 03 Jul 2017 03:56:53 +0200
changeset 33942 54c21114e41d
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
obsolete: fix old typo Clean an old typo in successorssets. Differential Revision: https://phab.mercurial-scm.org/D531

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