tests/crashgetbundler.py
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 20 Sep 2017 02:18:01 +0530
changeset 34291 624c53e4121d
parent 30876 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
uncommit: don't allow bare uncommit on dirty working directory As per IRC discussion and suggestion by Augie, we should not allow bare `hg uncommit` on dirty working directory. Differential Revision: https://phab.mercurial-scm.org/D734

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)