Mercurial > hg-stable
view tests/failfilemerge.py @ 40449:d1bda397df73 stable
selectors2: backport minimal fix of timeout handling from 2.0.1
The original code would raise TypeError since OSError() doesn't support
keyword arguments.
We can't simply import the selectors 2.0.1, which still spawns "uname -p"
through platform.system(). We could switch to the unreleased version, but
I decided to not right now to minimize the change.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 03 Dec 2018 21:31:19 +0900 |
parents | c0ce60459d84 |
children | 2372284d9457 |
line wrap: on
line source
# extension to emulate interrupting filemerge._filemerge from __future__ import absolute_import from mercurial import ( error, extensions, filemerge, ) def failfilemerge(filemergefn, premerge, repo, wctx, 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)