[PATCH] changelog: drop unnecessary override of "hasnode"

Yuya Nishihara yuya at tcha.org
Thu May 7 07:30:54 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1430648025 -32400
#      Sun May 03 19:13:45 2015 +0900
# Node ID df4e460b9bb984c4e73073b064e02b4d1723c2cd
# Parent  9c1942635c1febc80342bf2c52aad63f1238f32c
changelog: drop unnecessary override of "hasnode"

revlog.hasnode() calls self.rev(node) that takes filtering into account.

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -172,14 +172,6 @@ class changelog(revlog.revlog):
         self.rev(self.node(0))
         return self._nodecache
 
-    def hasnode(self, node):
-        """filtered version of revlog.hasnode"""
-        try:
-            i = self.rev(node)
-            return i not in self.filteredrevs
-        except KeyError:
-            return False
-
     def headrevs(self):
         if self.filteredrevs:
             try:


More information about the Mercurial-devel mailing list