tests/crashgetbundler.py
author Yuya Nishihara <yuya@tcha.org>
Wed, 14 Feb 2018 21:29:27 +0900
changeset 36201 46260fac5563
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
py3: stringify IOError/OSError without loosing local character Follows up fa4d333cac58. An environment error may contain non-ascii characters on Windows, which should be encoded to a platform-native string.

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)