tests/failfilemerge.py
author Anton Shestakov <av6@dwimlabs.net>
Thu, 10 Mar 2016 23:46:19 +0800
changeset 28457 e6310cdcc4d0
parent 27988 61f4d59e9a0b
child 28772 424c1632fffb
permissions -rw-r--r--
dockerdeb: add Ubuntu Trusty One problem reported by lintian is "bad-distribution-in-changes-file unstable" in changelog, but the current changelog for the official package in Ubuntu also uses that distribution name (unstable), because they import from Debian. This certainly doesn't stop the build process.

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