files: add support for log-like template keywords and functions
Note that the ctx does not point to the revision where the file was
last changed, but the revision specified by -rREV option.
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)