[PATCH 1 of 5] wireproto: fix repr(frame) to not crash by unknown type id

Gregory Szorc gregory.szorc at gmail.com
Sun Apr 8 20:43:32 EDT 2018


On Sun, Apr 8, 2018 at 1:59 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1523153687 -32400
> #      Sun Apr 08 11:14:47 2018 +0900
> # Node ID 9cf44f780dc77847c7d8628c623148cadd0c252f
> # Parent  632b928992039afe96df8f99a8dec6127ff983f1
> wireproto: fix repr(frame) to not crash by unknown type id
>

Queued this series.

Thanks for following up on my work. For the record, I didn't miss or ignore
your review comments, I just had not got around to addressing them yet.


>
> Follows up 5ef2da00e935.
>
> diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
> --- a/mercurial/wireprotoframing.py
> +++ b/mercurial/wireprotoframing.py
> @@ -150,7 +150,7 @@ class frame(object):
>                  'type=%s; flags=%s)' % (
>              len(self.payload), self.requestid, self.streamid,
>              humanflags(STREAM_FLAGS, self.streamflags), typename,
> -            humanflags(FRAME_TYPE_FLAGS[self.typeid], self.flags)))
> +            humanflags(FRAME_TYPE_FLAGS.get(self.typeid, {}),
> self.flags)))
>
>  def makeframe(requestid, streamid, streamflags, typeid, flags, payload):
>      """Assemble a frame into a byte array."""
> _______________________________________________
> 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/20180408/7bf08d82/attachment.html>


More information about the Mercurial-devel mailing list