formatter: more details on assertion failure
authorBoris Feld <boris.feld@octobus.net>
Mon, 01 Oct 2018 17:37:53 +0200
changeset 40140 46f9b1d2daf0
parent 40139 17223d8e7d75
child 40141 8643219146e1
formatter: more details on assertion failure This is useful when the assertion fails.
mercurial/formatter.py
--- a/mercurial/formatter.py	Wed Oct 10 23:19:42 2018 -0700
+++ b/mercurial/formatter.py	Mon Oct 01 17:37:53 2018 +0200
@@ -213,7 +213,7 @@
     def write(self, fields, deftext, *fielddata, **opts):
         '''do default text output while assigning data to item'''
         fieldkeys = fields.split()
-        assert len(fieldkeys) == len(fielddata)
+        assert len(fieldkeys) == len(fielddata), (fieldkeys, fielddata)
         self._item.update(zip(fieldkeys, fielddata))
     def condwrite(self, cond, fields, deftext, *fielddata, **opts):
         '''do conditional write (primarily for plain formatter)'''