branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
authorAugie Fackler <augie@google.com>
Sun, 12 Mar 2017 19:47:51 -0400
changeset 31381 7359157b9e46
parent 31380 65d93d712777
child 31382 c9fd842dc886
branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Sun Mar 12 16:44:01 2017 -0700
+++ b/mercurial/branchmap.py	Sun Mar 12 19:47:51 2017 -0400
@@ -408,7 +408,8 @@
 
         # fast path: extract data from cache, use it if node is matching
         reponode = changelog.node(rev)[:_rbcnodelen]
-        cachenode, branchidx = unpack_from(_rbcrecfmt, self._rbcrevs, rbcrevidx)
+        cachenode, branchidx = unpack_from(
+            _rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx)
         close = bool(branchidx & _rbccloseflag)
         if close:
             branchidx &= _rbcbranchidxmask