tests/failfilemerge.py
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 02 Feb 2017 10:55:38 +0100
changeset 30869 887de9516138
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
unbundle: add a small comment to tag the bundle1 case as such This makes the code clearer to understand for someone new to it (or rusted)

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