changelog: use 'tiprev()' in 'tip()'
Since 'tip()' is just a node version of 'tiprev()' we should reuse the code.
--- a/mercurial/changelog.py Thu May 04 02:23:21 2017 +0200
+++ b/mercurial/changelog.py Thu May 04 02:24:04 2017 +0200
@@ -302,9 +302,7 @@
def tip(self):
"""filtered version of revlog.tip"""
- for i in xrange(len(self) -1, -2, -1):
- if i not in self.filteredrevs:
- return self.node(i)
+ return self.node(self.tiprev())
def __contains__(self, rev):
"""filtered version of revlog.__contains__"""