##// END OF EJS Templates
repoview: move changelog.tiprev() override to filteredchangelog...
Martin von Zweigbergk -
r43748:7bc8e49a default
parent child Browse files
Show More
@@ -405,12 +405,6 b' class changelog(revlog.revlog):'
405 self.filteredrevs = frozenset()
405 self.filteredrevs = frozenset()
406 self._copiesstorage = opener.options.get(b'copies-storage')
406 self._copiesstorage = opener.options.get(b'copies-storage')
407
407
408 def tiprev(self):
409 """filtered version of revlog.tiprev"""
410 for i in pycompat.xrange(len(self) - 1, -2, -1):
411 if i not in self.filteredrevs:
412 return i
413
414 def __contains__(self, rev):
408 def __contains__(self, rev):
415 """filtered version of revlog.__contains__"""
409 """filtered version of revlog.__contains__"""
416 return 0 <= rev < len(self) and rev not in self.filteredrevs
410 return 0 <= rev < len(self) and rev not in self.filteredrevs
@@ -223,7 +223,11 b' def wrapchangelog(unfichangelog, filtere'
223 cl.filteredrevs = filteredrevs
223 cl.filteredrevs = filteredrevs
224
224
225 class filteredchangelog(cl.__class__):
225 class filteredchangelog(cl.__class__):
226 pass
226 def tiprev(self):
227 """filtered version of revlog.tiprev"""
228 for i in pycompat.xrange(len(self) - 1, -2, -1):
229 if i not in self.filteredrevs:
230 return i
227
231
228 cl.__class__ = filteredchangelog
232 cl.__class__ = filteredchangelog
229
233
General Comments 0
You need to be logged in to leave comments. Login now