[PATCH 7 of 8] branchmap: remove use of buffer() to support Python 2.6

Gregory Szorc gregory.szorc at gmail.com
Sat May 13 15:54:39 EDT 2017


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1494701888 25200
#      Sat May 13 11:58:08 2017 -0700
# Node ID d407296a5efc9710584087d23e4ff9293d7fb6ef
# Parent  016157858ae7e60681163ba47dca6ba822319dbe
branchmap: remove use of buffer() to support Python 2.6

The use of buffer() was added in 7359157b9e46 to support Python 2.6,
which we no longer support.

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -406,8 +406,7 @@ 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, util.buffer(self._rbcrevs), rbcrevidx)
+        cachenode, branchidx = unpack_from(_rbcrecfmt, self._rbcrevs, rbcrevidx)
         close = bool(branchidx & _rbccloseflag)
         if close:
             branchidx &= _rbcbranchidxmask


More information about the Mercurial-devel mailing list