Mercurial > hg-stable
changeset 35672:5a6e0eee7781
changelog: use 'tiprev()' in 'tip()'
Since 'tip()' is just a node version of 'tiprev()' we should reuse the code.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 04 May 2017 02:24:04 +0200 |
parents | 8810f0643fa1 |
children | 134ef400cb11 |
files | mercurial/changelog.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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__"""