tests/failfilemerge.py
author Anton Shestakov <av6@dwimlabs.net>
Mon, 25 Jul 2016 12:22:17 +0800
branchstable
changeset 29625 6e4da488f955
parent 28772 424c1632fffb
child 29785 a7f8939641aa
permissions -rw-r--r--
paper: make annotate popup use theme colors

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