Mercurial > hg
view tests/failfilemerge.py @ 29433:33770d2b6cf9
py3: conditionalize SocketServer import
The SocketServer is renamed to socketserver in python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 16:48:54 +0530 |
parents | 424c1632fffb |
children | a7f8939641aa |
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)