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

login
register
mail settings
Submitter Yuya Nishihara
Date May 28, 2017, 3:26 p.m.
Message ID <cad7aca56f0bf3d5865c.1495985168@mimosa>
Download mbox | patch
Permalink /patch/20984/
State Accepted
Headers show

Comments

Yuya Nishihara - May 28, 2017, 3:26 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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().

Patch

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))