tests/crashgetbundler.py
author Yuya Nishihara <yuya@tcha.org>
Sat, 25 Feb 2017 12:48:50 +0900
branchstable
changeset 31118 a91c62752d08
parent 30914 f3807a135e43
child 43076 2372284d9457
permissions -rw-r--r--
worker: flush messages written by child processes before exit I found some child outputs were lost while testing the previous patch. Since os._exit() does nothing special, we need to do that explicitly.

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)