Mercurial > hg-stable
changeset 10894:26cf11f9f322
keyword: make the templater a local variable
After 6722ba3bf80b a class attribute makes no sense.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Mon, 12 Apr 2010 17:34:12 +0200 |
parents | 468876bc3885 |
children | 217557b26bc7 |
files | hgext/keyword.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/keyword.py Mon Apr 12 17:21:30 2010 -0700 +++ b/hgext/keyword.py Mon Apr 12 17:34:12 2010 +0200 @@ -140,11 +140,11 @@ '''Replaces keywords in data with expanded template.''' def kwsub(mobj): kw = mobj.group(1) - self.ct = cmdutil.changeset_templater(self.ui, self.repo, - False, None, '', False) - self.ct.use_template(self.templates[kw]) + ct = cmdutil.changeset_templater(self.ui, self.repo, + False, None, '', False) + ct.use_template(self.templates[kw]) self.ui.pushbuffer() - self.ct.show(ctx, root=self.repo.root, file=path) + ct.show(ctx, root=self.repo.root, file=path) ekw = templatefilters.firstline(self.ui.popbuffer()) return '$%s: %s $' % (kw, ekw) return subfunc(kwsub, data)