[PATCH 1 of 8] formatter: more details on assertion failure

Boris FELD boris.feld at octobus.net
Wed Oct 17 13:22:36 UTC 2018


On 11/10/2018 10:23, Gregory Szorc wrote:
> On Thu, Oct 11, 2018 at 10:05 AM Boris Feld <boris.feld at octobus.net
> <mailto:boris.feld at octobus.net>> wrote:
>
>     # HG changeset patch
>     # User Boris Feld <boris.feld at octobus.net
>     <mailto:boris.feld at octobus.net>>
>     # Date 1538408273 -7200
>     #      Mon Oct 01 17:37:53 2018 +0200
>     # Node ID 8eaff9311fa407d89854d6e60938200939a0a506
>     # Parent  a66594c5fad422499bfaf669d182e02fe3c0be32
>     # EXP-Topic revlog-perf
>     # Available At https://bitbucket.org/octobus/mercurial-devel/
>     #              hg pull
>     https://bitbucket.org/octobus/mercurial-devel/ -r 8eaff9311fa4
>     formatter: more details on assertion failure
>
>
> Queued parts 1-6. Still digesting part 7.
Is there anything we could do to helps the review process of part 7 and 8?
>  
>
>
>     This is useful when the assertion fails.
>
>     diff --git a/mercurial/formatter.py b/mercurial/formatter.py
>     --- a/mercurial/formatter.py
>     +++ b/mercurial/formatter.py
>     @@ -213,7 +213,7 @@ class baseformatter(object):
>          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)'''
>     _______________________________________________
>     Mercurial-devel mailing list
>     Mercurial-devel at mercurial-scm.org
>     <mailto:Mercurial-devel at mercurial-scm.org>
>     https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181017/969c7042/attachment.html>


More information about the Mercurial-devel mailing list