view tests/crashgetbundler.py @ 37131:d30810d09d6f

obsolete: refactor function for getting obsolete options The function for returning obsolete option values obtains all options, validates, then returns the option that was requested. Let's create a new function to return all obsolete option values so callers needing multiple values can call that. Differential Revision: https://phab.mercurial-scm.org/D2667
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 Mar 2018 09:58:57 -0500
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)