formatter: add base implementation of data method
authorDavid M. Carr <david@carrclan.us>
Sat, 15 Sep 2012 22:50:34 -0400
changeset 17597 772b3764d3e8
parent 17596 2eac9641496d
child 17602 ccd28eca37f6
formatter: add base implementation of data method Previously, nothing was done with the passed in values, which clearly wasn't the intention.
mercurial/formatter.py
--- a/mercurial/formatter.py	Tue Sep 18 15:36:58 2012 +0200
+++ b/mercurial/formatter.py	Sat Sep 15 22:50:34 2012 -0400
@@ -26,6 +26,8 @@
         self._item = {}
     def data(self, **data):
         '''insert data into item that's not shown in default output'''
+        for k, v in data.iteritems():
+            self._item[k] = v
     def write(self, fields, deftext, *fielddata, **opts):
         '''do default text output while assigning data to item'''
         for k, v in zip(fields.split(), fielddata):