mercurial/formatter.py
changeset 40140 46f9b1d2daf0
parent 39624 713085b45810
child 40274 a8b9174517c7
equal deleted inserted replaced
40139:17223d8e7d75 40140:46f9b1d2daf0
   211         data = pycompat.byteskwargs(data)
   211         data = pycompat.byteskwargs(data)
   212         self._item.update(data)
   212         self._item.update(data)
   213     def write(self, fields, deftext, *fielddata, **opts):
   213     def write(self, fields, deftext, *fielddata, **opts):
   214         '''do default text output while assigning data to item'''
   214         '''do default text output while assigning data to item'''
   215         fieldkeys = fields.split()
   215         fieldkeys = fields.split()
   216         assert len(fieldkeys) == len(fielddata)
   216         assert len(fieldkeys) == len(fielddata), (fieldkeys, fielddata)
   217         self._item.update(zip(fieldkeys, fielddata))
   217         self._item.update(zip(fieldkeys, fielddata))
   218     def condwrite(self, cond, fields, deftext, *fielddata, **opts):
   218     def condwrite(self, cond, fields, deftext, *fielddata, **opts):
   219         '''do conditional write (primarily for plain formatter)'''
   219         '''do conditional write (primarily for plain formatter)'''
   220         fieldkeys = fields.split()
   220         fieldkeys = fields.split()
   221         assert len(fieldkeys) == len(fielddata)
   221         assert len(fieldkeys) == len(fielddata)