view tests/crashgetbundler.py @ 37831:387af9e5df70 stable

hgweb: prevent triggering dummy href="#" handler Follow up for the previous patch.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 03 May 2018 14:43:25 +0900
parents f3807a135e43
children 2372284d9457
line wrap: on
line source

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)