##// END OF EJS Templates
branchmap: handle nullrev in setcachedata...
Durham Goode -
r31454:a5bad127 default
parent child Browse files
Show More
@@ -452,6 +452,8 b' class revbranchcache(object):'
452
452
453 def _setcachedata(self, rev, node, branchidx):
453 def _setcachedata(self, rev, node, branchidx):
454 """Writes the node's branch data to the in-memory cache data."""
454 """Writes the node's branch data to the in-memory cache data."""
455 if rev == nullrev:
456 return
455 rbcrevidx = rev * _rbcrecsize
457 rbcrevidx = rev * _rbcrecsize
456 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize:
458 if len(self._rbcrevs) < rbcrevidx + _rbcrecsize:
457 self._rbcrevs.extend('\0' *
459 self._rbcrevs.extend('\0' *
@@ -1,5 +1,10 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3
4 Verify checking branch of nullrev before the cache is created doesnt crash
5 $ hg log -r 'branch(.)' -T '{branch}\n'
6
7 Basic test
3 $ echo 'root' >root
8 $ echo 'root' >root
4 $ hg add root
9 $ hg add root
5 $ hg commit -d '0 0' -m "Adding root node"
10 $ hg commit -d '0 0' -m "Adding root node"
General Comments 0
You need to be logged in to leave comments. Login now