tests/crashgetbundler.py
author Gregory Szorc <gregory.szorc@gmail.com>
Fri, 12 Oct 2018 17:25:02 +0200
changeset 40191 4b7eb862692e
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
py3: encode json output to bytes and use write() Differential Revision: https://phab.mercurial-scm.org/D5007

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)