##// END OF EJS Templates
revlog: move nodemap update within the index code...
marmoute -
r43931:dcf9826c default
parent child Browse files
Show More
@@ -62,6 +62,8 b' class BaseIndexObject(object):'
62 return self._lgt + len(self._extra)
62 return self._lgt + len(self._extra)
63
63
64 def append(self, tup):
64 def append(self, tup):
65 if 'nodemap' in vars(self):
66 self.nodemap[tup[7]] = len(self)
65 self._extra.append(tup)
67 self._extra.append(tup)
66
68
67 def _check_index(self, i):
69 def _check_index(self, i):
@@ -213,6 +213,10 b' class revlogoldindex(list):'
213 nodemap[n] = r
213 nodemap[n] = r
214 return nodemap
214 return nodemap
215
215
216 def append(self, tup):
217 self.nodemap[tup[7]] = len(self)
218 super(revlogoldindex, self).append(tup)
219
216 def clearcaches(self):
220 def clearcaches(self):
217 self.__dict__.pop('nodemap', None)
221 self.__dict__.pop('nodemap', None)
218
222
@@ -2189,7 +2193,6 b' class revlog(object):'
2189 node,
2193 node,
2190 )
2194 )
2191 self.index.append(e)
2195 self.index.append(e)
2192 self.nodemap[node] = curr
2193
2196
2194 # Reset the pure node cache start lookup offset to account for new
2197 # Reset the pure node cache start lookup offset to account for new
2195 # revision.
2198 # revision.
General Comments 0
You need to be logged in to leave comments. Login now