[PATCH py26-fix] branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray

Augie Fackler raf at durin42.com
Mon Mar 13 00:15:13 UTC 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489362471 14400
#      Sun Mar 12 19:47:51 2017 -0400
# Node ID df3fd1d493739948ba39c85072a09c5fee06480b
# Parent  52ee1b5ac277bd5569a8d3e3ae3e11dff0543323
branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -408,7 +408,8 @@ class revbranchcache(object):
 
         # 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


More information about the Mercurial-devel mailing list