##// END OF EJS Templates
revlog: move tiprev() from changelog up to revlog...
Martin von Zweigbergk -
r43745:ec7ba79b default
parent child Browse files
Show More
@@ -406,14 +406,11 b' class changelog(revlog.revlog):'
406 406 self._copiesstorage = opener.options.get(b'copies-storage')
407 407
408 408 def tiprev(self):
409 """filtered version of revlog.tiprev"""
409 410 for i in pycompat.xrange(len(self) - 1, -2, -1):
410 411 if i not in self.filteredrevs:
411 412 return i
412 413
413 def tip(self):
414 """filtered version of revlog.tip"""
415 return self.node(self.tiprev())
416
417 414 def __contains__(self, rev):
418 415 """filtered version of revlog.__contains__"""
419 416 return 0 <= rev < len(self) and rev not in self.filteredrevs
@@ -593,8 +593,11 b' class revlog(object):'
593 593 with func() as fp:
594 594 yield fp
595 595
596 def tiprev(self):
597 return len(self.index) - 1
598
596 599 def tip(self):
597 return self.node(len(self.index) - 1)
600 return self.node(self.tiprev())
598 601
599 602 def __contains__(self, rev):
600 603 return 0 <= rev < len(self)
General Comments 0
You need to be logged in to leave comments. Login now