setup: exclude the git extension from py2 builds
This can't be built on Windows with the py2 compiler, and while old versions can
be installed via pip on Linux, I can't get the tests to run (even with py3.8)
using pygit2 0.28.2. Some manually run commands work, and others spew stack
traces that don't occur with the current 1.4.0 release using py3.
Differential Revision: https://phab.mercurial-scm.org/D9604
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)