# HG changeset patch # User Christian Ebert # Date 1196076256 -3600 # Node ID 583efc0983f1be671728400e623f4137b6b3b8e9 # Parent c8afb99bb70fc8929dff6775798cd5363fde66bb Do not bother about debug templates Speedup of debug flag toggle dubious at best. {files}, {file_adds} etc. templates do not make sense in file context, but leave decision to user; that's what kwdemo is for. diff -r c8afb99bb70f -r 583efc0983f1 hgkw/keyword.py --- a/hgkw/keyword.py Wed Nov 14 13:32:33 2007 +0100 +++ b/hgkw/keyword.py Mon Nov 26 12:24:16 2007 +0100 @@ -113,7 +113,6 @@ self.t = expand or None self.path = path self.node = node - self.debug = self.ui.debugflag kwmaps = self.ui.configitems('keywordmaps') if kwmaps: # override default templates @@ -138,16 +137,11 @@ return '$%s: %s $' % (kw, keywordsub) def substitute(self, node, data, subfunc): - '''Obtains node if missing. - Ensures consistent templates regardless of ui.debugflag. - Calls given substitution function.''' + '''Obtains node if missing, and calls given substitution function.''' if not self.node: c = context.filectx(self.repo, self.path, fileid=node) self.node = c.node() - self.ui.debugflag = False - result = subfunc(self.kwsub, data) - self.ui.debugflag = self.debug - return result + return subfunc(self.kwsub, data) def expand(self, node, data): '''Returns data with keywords expanded.'''