tests/failfilemerge.py
author Boris Feld <boris.feld@octobus.net>
Sat, 15 Jul 2017 23:30:25 +0200
changeset 33537 709dde1c5dd5
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
cachevfs: migration the tags fnode cache to 'cachevfs' This will help sharing the cache between shares.

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