--- a/mercurial/utils/cborutil.py Mon Oct 08 17:06:24 2018 -0700
+++ b/mercurial/utils/cborutil.py Thu Oct 04 15:08:42 2018 -0700
@@ -925,6 +925,11 @@
* Integer number of bytes decoded from the new input.
* Integer number of bytes wanted to decode the next value.
"""
+ # We /might/ be able to support passing a bytearray all the
+ # way through. For now, let's cheat.
+ if isinstance(b, bytearray):
+ b = bytes(b)
+
# Our strategy for buffering is to aggregate the incoming chunks in a
# list until we've received enough data to decode the next item.
# This is slightly more complicated than using an ``io.BytesIO``