changeset 17597:772b3764d3e8

formatter: add base implementation of data method Previously, nothing was done with the passed in values, which clearly wasn't the intention.
author David M. Carr <david@carrclan.us>
date Sat, 15 Sep 2012 22:50:34 -0400
parents 2eac9641496d
children ccd28eca37f6
files mercurial/formatter.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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):