tests/crashgetbundler.py
author Durham Goode <durham@fb.com>
Sun, 10 Sep 2017 18:50:12 -0700
changeset 34116 5ede882c249c
parent 30876 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
changegroup: replace getchangegroup with makechangegroup As part of reducing the number of changegroup creation APIs, let's replace getchangegroup with calls to makechangegroup. This is mostly a drop in replacement, but it does change the version specifier to be required, so it's more obvious which callers are creating old version 1 changegroups still. Differential Revision: https://phab.mercurial-scm.org/D669

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)