tests/crashgetbundler.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sun, 14 Apr 2024 02:40:15 +0200
changeset 51590 a6bdd2e6f7cb
parent 48875 6000f5b25c9b
permissions -rw-r--r--
perf: run the gc before each run The python garbage collector is a large source of performance troubles, we run it right before the timed section to reduce the change for the gc to add noise to the benchmark.

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)