comparison mercurial/branchmap.py @ 25270:61b3529e2377

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 26 May 2015 07:44:37 -0500
parents 38117278f295
children 328739ea70c3
comparison
equal deleted inserted replaced
25269:46bf4983cf31 25270:61b3529e2377
339 """Return branch name and close flag for rev, using and updating 339 """Return branch name and close flag for rev, using and updating
340 persistent cache.""" 340 persistent cache."""
341 changelog = self._repo.changelog 341 changelog = self._repo.changelog
342 rbcrevidx = rev * _rbcrecsize 342 rbcrevidx = rev * _rbcrecsize
343 343
344 # avoid negative index, changelog.read(nullrev) is fast without cache
345 if rev == nullrev:
346 return changelog.branchinfo(rev)
347
344 # if requested rev is missing, add and populate all missing revs 348 # if requested rev is missing, add and populate all missing revs
345 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize: 349 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize:
346 self._rbcrevs.extend('\0' * (len(changelog) * _rbcrecsize - 350 self._rbcrevs.extend('\0' * (len(changelog) * _rbcrecsize -
347 len(self._rbcrevs))) 351 len(self._rbcrevs)))
348 352