[issue1637] styles/template problem modifying map

Douglas E. Warner mercurial-bugs at selenic.com
Mon Apr 27 18:00:01 UTC 2009


New submission from Douglas E. Warner <silfreed at silfreed.net>:

As I originally reported on the mailing list about a year ago [1], when I add my
own entries to the map file the values aren't available to be used inside the
templates, but modifying the original values works fine.  A patch to
templater.py is included [2].

My original email:

I've copied the gitweb templates to my own directory in order to modify them 
and specified the path to my style in my hgrc, like so:

[web]
style = /path/to/my-template/

When I modify parts of the template files or the map, these changes take 
effect immediately.

The problem I'm having is that adding entities to the map doesn't work.

I'm trying to add something like 'orgname = "Mozdev"' to the map file.  When I 
reference this in the template files by either #orgname# or {orgname} nothing 
is output (no errors being thrown, either).

I've put some debug in the templater and found that my map key isn't in the 
passed-in map to the __call__ function, but is in self.cache.

Am I doing something wrong here, or is specifying additional entities not 
supported?

[1] http://www.selenic.com/pipermail/mercurial-devel/2008-May/006229.html
[2] http://www.selenic.com/pipermail/mercurial-devel/2008-May/006257.html

----------
messages: 9216
nosy: silfreed
priority: bug
status: unread
title: styles/template problem modifying map

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1637>
____________________________________________________




More information about the Mercurial-devel mailing list