tests/crashgetbundler.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 09 Jun 2017 12:36:07 +0100
changeset 32787 545f69cd6042
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
profile: support --profile in alias and abbreviated version (--prof) We now process the "--profile" a second time after alias has been processed and the command argument fully parsed. If appropriate we enable profiling at that time. In these situation, the --profile will cover less than if the full --profile flag was passed on the command line. This is better than the previous behavior (flag ignored) and still fullfil multiple valid usecases.

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)