Mercurial > hg
view tests/failfilemerge.py @ 44941:edd08aa193fb
files: extract code for extra filtering of the `removed` entry into copies
We want to reduce the set of `removed` files that to the set of files actually
removed. That `removed` set is used as of the changeset centric algorithm,
having smaller sets means less processing and faster computation.
In this changeset we extract the code to be a function of it own. We will make
use of it in the next changesets.
Differential Revision: https://phab.mercurial-scm.org/D8588
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 27 May 2020 12:45:39 +0200 |
parents | 2372284d9457 |
children | a736ab681b78 |
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)