failfilemerge.py
19 lines
| 518 B
| text/x-python
|
PythonLexer
/ tests / failfilemerge.py
|
r30332 | # extension to emulate interrupting filemerge._filemerge | ||
|
r27988 | |||
from __future__ import absolute_import | ||||
from mercurial import ( | ||||
|
r28772 | error, | ||
|
r27988 | extensions, | ||
|
r28772 | filemerge, | ||
|
r27988 | ) | ||
def failfilemerge(filemergefn, | ||||
|
r34124 | premerge, repo, wctx, mynode, orig, fcd, fco, fca, | ||
labels=None): | ||||
|
r27988 | raise error.Abort("^C") | ||
return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels) | ||||
def extsetup(ui): | ||||
extensions.wrapfunction(filemerge, '_filemerge', | ||||
failfilemerge) | ||||