# HG changeset patch # User Christian Ebert # Date 1169075171 -3600 # Node ID b2cc6a8d4a180de144d97cae9ea574cac41be8b0 # Parent 25dac950a1f051551a8e9b8d79b84df2166e3e28 Extend templater.common_filters in kwtemplater diff -r 25dac950a1f0 -r b2cc6a8d4a18 hgkw/keyword.py --- a/hgkw/keyword.py Wed Jan 17 23:55:54 2007 +0100 +++ b/hgkw/keyword.py Thu Jan 18 00:06:11 2007 +0100 @@ -75,8 +75,6 @@ '''Returns hgdate in cvs-like UTC format.''' return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(date[0])) -templater.common_filters['utcdate'] = utcdate - def kwfmatches(ui, repo, files): '''Selects candidates for keyword substitution configured in keyword section in hgrc.''' @@ -100,6 +98,7 @@ self.templates = dict(ui.configitems('keywordmaps')) or deftemplates self.re_kw = re.compile(r'\$(%s)[^$]*?\$' % '|'.join(re.escape(k) for k in self.templates.keys())) + templater.common_filters['utcdate'] = utcdate self.t = cmdutil.changeset_templater(ui, repo, False, '', False)