tests/failfilemerge.py
author Boris Feld <boris.feld@octobus.net>
Mon, 10 Jul 2017 21:49:37 +0200
changeset 33518 712a85b3677f
parent 30332 318a24b52eeb
child 34122 c0ce60459d84
permissions -rw-r--r--
bookmark: deprecate direct del of a bookmark value We want all bookmark deletion to go through 'applychanges', so lets deprecate legacy ways of doing bookmark deletion.

# extension to emulate interrupting 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)