tests/crashgetbundler.py
author Augie Fackler <augie@google.com>
Wed, 04 Oct 2017 09:04:52 -0400
branchstable
changeset 34481 bb14dbab4df6
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
tests: invoke run-tests.py in test-hghave using $PYTHON (issue5697) Some platforms (notably pkgsrc on NetBSD) only provide versioned Python interpreters (eg `python2.7` exists, but `python` does not), which exposes this error. We want to be running run-tests.py with the python given in $PYTHON, since that might be `pypy` or `python3`.

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)