comparison mercurial/branchmap.py @ 31347:279430eeefdb

branchmap: don't use buffer() on Python 3 This is certainly slower than the Python 2 code, but it works, and we can revisit it later if it's a problem.
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 00:49:19 -0500
parents 2a18e9e6ca43
children fc06c5260639
comparison
equal deleted inserted replaced
31346:2a18e9e6ca43 31347:279430eeefdb
407 return self._branchinfo(rev) 407 return self._branchinfo(rev)
408 408
409 # fast path: extract data from cache, use it if node is matching 409 # fast path: extract data from cache, use it if node is matching
410 reponode = changelog.node(rev)[:_rbcnodelen] 410 reponode = changelog.node(rev)[:_rbcnodelen]
411 cachenode, branchidx = unpack( 411 cachenode, branchidx = unpack(
412 _rbcrecfmt, buffer(self._rbcrevs, rbcrevidx, _rbcrecsize)) 412 _rbcrecfmt, util.buffer(self._rbcrevs, rbcrevidx, _rbcrecsize))
413 close = bool(branchidx & _rbccloseflag) 413 close = bool(branchidx & _rbccloseflag)
414 if close: 414 if close:
415 branchidx &= _rbcbranchidxmask 415 branchidx &= _rbcbranchidxmask
416 if cachenode == '\0\0\0\0': 416 if cachenode == '\0\0\0\0':
417 pass 417 pass