py3: get around unicode docstrings in test-encoding-textwrap.t and test-help.t
On Python 3, docstrings are converted back to utf-8 bytes, which practically
disables the "if type(message) is pycompat.unicode" hack in gettext(). Let's
add one more workaround for the Py3 path.
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)