view tests/failfilemerge.py @ 29583:6ce870dba6fa

run-tests: make --local set --with-chg if --chg is used --local should work with chg as well.
author Jun Wu <quark@fb.com>
date Mon, 18 Jul 2016 08:55:30 +0100
parents 424c1632fffb
children a7f8939641aa
line wrap: on
line source

# extension to emulate interupting 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)