Mercurial > public > mercurial-scm > hg-stable
diff hgext/keyword.py @ 6667:01e95d4bc66c
keyword: disable expansion for annotate
Keyword expansion should not be annotated.
Annotate revision when unexpanded keyword was inserted.
Add test.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Thu, 12 Jun 2008 11:01:36 +0200 |
parents | 41eb20cc1c02 |
children | 6004eedb13f4 |
line wrap: on
line diff
--- a/hgext/keyword.py Thu Jun 12 11:33:47 2008 +0200 +++ b/hgext/keyword.py Thu Jun 12 11:01:36 2008 +0200 @@ -88,7 +88,7 @@ commands.optionalrepo += ' kwdemo' # hg commands that do not act on keywords -nokwcommands = ('add addremove bundle copy export grep incoming init' +nokwcommands = ('add addremove annotate bundle copy export grep incoming init' ' log outgoing push rename rollback tip' ' convert email glog') @@ -513,6 +513,11 @@ kwt.restrict = True patch_diff(repo, node1, node2, match, fp, changes, opts) + def kwweb_annotate(web, req, tmpl): + '''Wraps webcommands.annotate turning off keyword expansion.''' + kwt.matcher = util.never + return webcommands_annotate(web, req, tmpl) + def kwweb_changeset(web, req, tmpl): '''Wraps webcommands.changeset turning off keyword expansion.''' kwt.matcher = util.never @@ -527,11 +532,13 @@ patchfile_init = patch.patchfile.__init__ patch_diff = patch.diff + webcommands_annotate = webcommands.annotate webcommands_changeset = webcommands.changeset webcommands_filediff = webcommands.filediff patch.patchfile.__init__ = kwpatchfile_init patch.diff = kw_diff + webcommands.annotate = kwweb_annotate webcommands.changeset = webcommands.rev = kwweb_changeset webcommands.filediff = webcommands.diff = kwweb_filediff