tests/failfilemerge.py
author Yuya Nishihara <yuya@tcha.org>
Fri, 14 Oct 2016 23:33:00 +0900
changeset 30179 cdef35b38026
parent 29785 a7f8939641aa
child 30342 318a24b52eeb
permissions -rw-r--r--
revset: for x^2, do not take null as a valid p2 revision Since we don't count null p2 revision as a parent, x^2 should never return null even if null is explicitly populated.

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