##// END OF EJS Templates
revlog: pre-compute null revlog item for pure version...
Joerg Sonnenberger -
r46222:7baf5f79 default
parent child Browse files
Show More
@@ -37,6 +37,7 b' indexformatng = b">Qiiiiii20s12x"'
37 indexfirst = struct.calcsize(b'Q')
37 indexfirst = struct.calcsize(b'Q')
38 sizeint = struct.calcsize(b'i')
38 sizeint = struct.calcsize(b'i')
39 indexsize = struct.calcsize(indexformatng)
39 indexsize = struct.calcsize(indexformatng)
40 nullitem = (0, 0, 0, -1, -1, -1, -1, nullid)
40
41
41
42
42 def gettype(q):
43 def gettype(q):
@@ -103,7 +104,7 b' class BaseIndexObject(object):'
103
104
104 def __getitem__(self, i):
105 def __getitem__(self, i):
105 if i == -1:
106 if i == -1:
106 return (0, 0, 0, -1, -1, -1, -1, nullid)
107 return nullitem
107 self._check_index(i)
108 self._check_index(i)
108 if i >= self._lgt:
109 if i >= self._lgt:
109 return self._extra[i - self._lgt]
110 return self._extra[i - self._lgt]
General Comments 0
You need to be logged in to leave comments. Login now