mercurial/revlog.py
changeset 13284 77351c88dd10
parent 13276 ba6a63339f7c
child 13400 14f3795a5ed7
equal deleted inserted replaced
13283:a3e834a9e9c4 13284:77351c88dd10
   293     def rev(self, node):
   293     def rev(self, node):
   294         try:
   294         try:
   295             return self._nodecache[node]
   295             return self._nodecache[node]
   296         except KeyError:
   296         except KeyError:
   297             n = self._nodecache
   297             n = self._nodecache
   298             if node in n:
       
   299                 return n[node]
       
   300             i = self.index
   298             i = self.index
   301             p = self._nodepos
   299             p = self._nodepos
   302             if p is None:
   300             if p is None:
   303                 p = len(i) - 2
   301                 p = len(i) - 2
   304             for r in xrange(p, -1, -1):
   302             for r in xrange(p, -1, -1):