tests/crashgetbundler.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 01 Mar 2023 16:05:28 +0100
branchstable
changeset 49694 53f196622699
parent 48966 6000f5b25c9b
permissions -rw-r--r--
dirstate: abstract the reading of the data file in v2 in a method We will need more changes to avoid some race conditions during read, so we first isolate the simple logic before making it more complicated.

from mercurial.i18n import _
from mercurial import changegroup, error, extensions


def abort(orig, *args, **kwargs):
    raise error.Abort(_('this is an exercise'))


def uisetup(ui):
    extensions.wrapfunction(changegroup, 'getbundler', abort)