tests/failfilemerge.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Sat, 27 Feb 2016 17:31:23 +0100
changeset 28275 d4cced5885f8
parent 27988 61f4d59e9a0b
child 28772 424c1632fffb
permissions -rw-r--r--
tests: rename 'test-module-import.t' into 'test-check-module-import.t' This test is checking our source code to ensure style and correct behavior (eg: no cycle). Current convention is that such tests starts with 'test-check-' so we flock this on back with the others.

# extension to emulate interupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    filemerge,
    extensions,
    error,
)

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)