branchcache: use an explicit class for the v2 version
This prepare the introduction of an experimental v3 format version.
In the process, we move the description of the format in that new class.
# 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)