Patchwork changelog: drop unnecessary override of "hasnode"

login
register
mail settings
Submitter Yuya Nishihara
Date May 7, 2015, 12:30 p.m.
Message ID <df4e460b9bb984c4e730.1431001854@mimosa>
Download mbox | patch
Permalink /patch/8944/
State Accepted
Headers show

Comments

Yuya Nishihara - May 7, 2015, 12:30 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.
Pierre-Yves David - May 7, 2015, 5:42 p.m.
On 05/07/2015 05:30 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1430648025 -32400
> #      Sun May 03 19:13:45 2015 +0900
> # Node ID df4e460b9bb984c4e73073b064e02b4d1723c2cd
> # Parent  9c1942635c1febc80342bf2c52aad63f1238f32c
> changelog: drop unnecessary override of "hasnode"

Sure, pushed to the clowcopter.

Patch

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: