##// END OF EJS Templates
revbranchcache: return uncached branchinfo for nullrev (issue4683)...
Yuya Nishihara -
r25266:38117278 stable
parent child Browse files
Show More
@@ -341,6 +341,10 b' class revbranchcache(object):'
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 -
@@ -1602,6 +1602,14 b' prepare repository that has "default" br'
1602 $ echo default5 >> a
1602 $ echo default5 >> a
1603 $ hg ci -m5
1603 $ hg ci -m5
1604
1604
1605 "null" revision belongs to "default" branch (issue4683)
1606
1607 $ log 'branch(null)'
1608 0
1609 1
1610 4
1611 5
1612
1605 "null" revision belongs to "default" branch, but it shouldn't appear in set
1613 "null" revision belongs to "default" branch, but it shouldn't appear in set
1606 unless explicitly specified (issue4682)
1614 unless explicitly specified (issue4682)
1607
1615
General Comments 0
You need to be logged in to leave comments. Login now