Mercurial styles problem modifying map

Douglas E. Warner silfreed at silfreed.net
Wed May 21 15:50:14 CDT 2008


On Tuesday 20 May 2008 12:20:08 Douglas E. Warner wrote:
> 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.

Specifically, this patch allows my new map entries to work:

--- templater.py        2008-05-21 16:48:47.000000000 -0400
+++ templater-new.py    2008-05-21 16:49:12.000000000 -0400
@@ -105,6 +105,8 @@

             if key in map:
                 v = map[key]
+            elif key in self.cache:
+                v = self.cache[key]
             else:
                 v = self.defaults.get(key, "")
             if callable(v):

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080521/dea498d4/attachment.pgp 


More information about the Mercurial-devel mailing list