Mercurial > hg-stable
changeset 33661:1814ca418b30 stable
branchmap: revert c34532365b38 for Python 2.7 compatibility
Old versions of python 2.7 don't like that the second argument to
struct.unpack_from is a bytearray, so the change removing the util.buffer
around that argument in branchmap broke running on older versions of python
2.7.
Differential Revision: https://phab.mercurial-scm.org/D330
author | Mike Hommey <mh@glandium.org> |
---|---|
date | Thu, 10 Aug 2017 20:47:19 -0700 |
parents | a3ce07e2dde5 |
children | 8de8f8a91f2d |
files | mercurial/branchmap.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/branchmap.py Thu Aug 10 18:46:55 2017 -0400 +++ b/mercurial/branchmap.py Thu Aug 10 20:47:19 2017 -0700 @@ -406,7 +406,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