delta-find: split the "sparse" part of `_pre_filter_rev` in a method
Since `_pre_filter_rev` contains logic from various sources of constraint, we
start splitting is in subfunction to clarify and document the grouping.
# extension to emulate interrupting filemerge._filemerge
from mercurial import (
error,
extensions,
filemerge,
)
def failfilemerge(*args, **kwargs):
raise error.Abort(b"^C")
def extsetup(ui):
extensions.wrapfunction(filemerge, 'filemerge', failfilemerge)