[PATCH 1 of 2] match: remove override of prefix() from differencematcher

Yuya Nishihara yuya at tcha.org
Sun May 28 15:26:08 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1495983090 -32400
#      Sun May 28 23:51:30 2017 +0900
# Node ID cad7aca56f0bf3d5865cc07ee9616568ada78c36
# Parent  2ba4d3b74ba8360e97cbae25cb4584283dac4eb9
match: remove override of prefix() from differencematcher

It's exactly the same as basematcher.prefix().

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -480,9 +480,6 @@ class differencematcher(basematcher):
     def anypats(self):
         return self._m1.anypats() or self._m2.anypats()
 
-    def prefix(self):
-        return not self.always() and not self.isexact() and not self.anypats()
-
     def __repr__(self):
         return ('<differencematcher m1=%r, m2=%r>' % (self._m1, self._m2))
 


More information about the Mercurial-devel mailing list