dirstate: abstract the reading of the data file in v2 in a method
We will need more changes to avoid some race conditions during read,
so we first isolate the simple logic before making it more complicated.
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)