Mercurial > hg
comparison mercurial/formatter.py @ 40140:46f9b1d2daf0
formatter: more details on assertion failure
This is useful when the assertion fails.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 01 Oct 2018 17:37:53 +0200 |
parents | 713085b45810 |
children | a8b9174517c7 |
comparison
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) |