changeset 32312:0d6b3572ad92

match: remove ispartial() The function was added in d1d69ca78883 (match: add match.ispartial(), 2015-05-15) for use by narrowhg, but narrowhg never ended up needing it.
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 17 May 2017 09:43:50 -0700
parents a77a75a428f7
children a580b2d65ded
files mercurial/localrepo.py mercurial/match.py
diffstat 2 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue May 16 21:17:40 2017 -0700
+++ b/mercurial/localrepo.py	Wed May 17 09:43:50 2017 -0700
@@ -1575,7 +1575,7 @@
             wctx = self[None]
             merge = len(wctx.parents()) > 1
 
-            if not force and merge and match.ispartial():
+            if not force and merge and not match.always():
                 raise error.Abort(_('cannot partially commit a merge '
                                    '(do not specify files or patterns)'))
 
--- a/mercurial/match.py	Tue May 16 21:17:40 2017 -0700
+++ b/mercurial/match.py	Wed May 17 09:43:50 2017 -0700
@@ -281,14 +281,6 @@
         - optimization might be possible and necessary.'''
         return self._always
 
-    def ispartial(self):
-        '''True if the matcher won't always match.
-
-        Although it's just the inverse of _always in this implementation,
-        an extension such as narrowhg might make it return something
-        slightly different.'''
-        return not self._always
-
     def isexact(self):
         return self.matchfn == self.exact