tests/failfilemerge.py
author Boris Feld <boris.feld@octobus.net>
Sun, 16 Jul 2017 02:38:14 +0200
changeset 33540 e07c5740eaaa
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
test-strip: fix call to super class in crashstriprepo The 'self' argument is already taken care of by the 'super(...)' call. Instead we were passing the repository instance as the 'desc' value. This got discovered by breaking the next changeset.

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