[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