view tests/failfilemerge.py @ 29912:1c1c2bce2f97

debugrevspec: transform and print parsed tree by stages Prepares for adding new option to print transformed tree at each stage.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Aug 2016 12:04:08 +0900
parents a7f8939641aa
children 318a24b52eeb
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)