Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 32321:c34532365b38
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.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 13 May 2017 11:58:08 -0700 |
parents | b98ee1a808bd |
children | 2715a4fc0684 |
comparison
equal
deleted
inserted
replaced
32320:9b81fb217820 | 32321:c34532365b38 |
---|---|
404 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: | 404 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: |
405 return self._branchinfo(rev) | 405 return self._branchinfo(rev) |
406 | 406 |
407 # fast path: extract data from cache, use it if node is matching | 407 # fast path: extract data from cache, use it if node is matching |
408 reponode = changelog.node(rev)[:_rbcnodelen] | 408 reponode = changelog.node(rev)[:_rbcnodelen] |
409 cachenode, branchidx = unpack_from( | 409 cachenode, branchidx = unpack_from(_rbcrecfmt, self._rbcrevs, rbcrevidx) |
410 _rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx) | |
411 close = bool(branchidx & _rbccloseflag) | 410 close = bool(branchidx & _rbccloseflag) |
412 if close: | 411 if close: |
413 branchidx &= _rbcbranchidxmask | 412 branchidx &= _rbcbranchidxmask |
414 if cachenode == '\0\0\0\0': | 413 if cachenode == '\0\0\0\0': |
415 pass | 414 pass |