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