view tests/failfilemerge.py @ 30215:438173c41587 stable 4.0-rc

merge default into stable for 4.0 code freeze
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Tue, 18 Oct 2016 14:15:15 -0500
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)