tests/crashgetbundler.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 14 Feb 2023 22:27:24 +0100
changeset 50000 1f28172cfce9
parent 48875 6000f5b25c9b
permissions -rw-r--r--
debugrebuilddirstate: double check that no transaction is open Since transaction impact dirstate write, we make sure nobody is trying anything strange with this internal command.

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)