tests/crashgetbundler.py
author Yuya Nishihara <yuya@tcha.org>
Sat, 05 Oct 2019 08:27:57 -0400
changeset 43476 0836efe4967b
parent 43076 2372284d9457
child 48966 6000f5b25c9b
permissions -rw-r--r--
rust-cpython: add generation counter to leaked reference This counter increments on borrow_mut() to invalidate existing leaked references. This is modeled after the iterator invalidation in Python. The other checks will be adjusted by the subsequent patches.

from __future__ import absolute_import

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)