tests/crashgetbundler.py
author Pulkit Goyal <pulkit@yandex-team.ru>
Tue, 13 Nov 2018 18:07:21 +0300
changeset 40612 3fa4183e7803
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
py3: use node.hex(h.digest()) instead of h.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5261

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)