view tests/crashgetbundler.py @ 37600:7800ed2e4980

export: split cmdutil.export() to single-file and maybe-multiple-files cases Porting "hg export" to formatter is a bit hard because cmdutil.export() may append to files if the fntemplate is specified. This patch splits the hard part from the trivial case.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 12 Apr 2018 21:56:02 +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)