Mercurial > public > mercurial-scm > hg
comparison mercurial/branchmap.py @ 31381:7359157b9e46
branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 12 Mar 2017 19:47:51 -0400 |
parents | 7dd2f51f38ac |
children | a5bad127128d |
comparison
equal
deleted
inserted
replaced
31380:65d93d712777 | 31381:7359157b9e46 |
---|---|
406 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: | 406 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: |
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_from(_rbcrecfmt, self._rbcrevs, rbcrevidx) | 411 cachenode, branchidx = unpack_from( |
412 _rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx) | |
412 close = bool(branchidx & _rbccloseflag) | 413 close = bool(branchidx & _rbccloseflag) |
413 if close: | 414 if close: |
414 branchidx &= _rbcbranchidxmask | 415 branchidx &= _rbcbranchidxmask |
415 if cachenode == '\0\0\0\0': | 416 if cachenode == '\0\0\0\0': |
416 pass | 417 pass |