tests/failfilemerge.py
author Augie Fackler <augie@google.com>
Mon, 06 Feb 2017 23:09:21 -0500
changeset 31057 a602785d86cd
parent 30342 318a24b52eeb
child 34137 c0ce60459d84
permissions -rw-r--r--
help: enable pager

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