Patchwork D491: context: always pass a matcher into _matchstatus() (API)

login
register
mail settings
Submitter phabricator
Date Aug. 27, 2017, 12:33 p.m.
Message ID <8eacf65d97c64be3695b842428fa4eda@localhost.localdomain>
Download mbox | patch
Permalink /patch/23374/
State Not Applicable
Headers show

Comments

phabricator - Aug. 27, 2017, 12:33 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc714e82b9ac2: context: always pass a matcher into _matchstatus() (API) (authored by martinvonz).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D491?vs=1206&id=1327

REVISION DETAIL
  https://phab.mercurial-scm.org/D491

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, dsp
Cc: dsp, mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -103,12 +103,10 @@ 
         return self.manifest()
 
     def _matchstatus(self, other, match):
-        """return match.always if match is none
-
-        This internal method provides a way for child objects to override the
+        """This internal method provides a way for child objects to override the
         match operator.
         """
-        return match or matchmod.always(self._repo.root, self._repo.getcwd())
+        return match
 
     def _buildstatus(self, other, s, match, listignored, listclean,
                      listunknown):
@@ -392,6 +390,7 @@ 
             reversed = True
             ctx1, ctx2 = ctx2, ctx1
 
+        match = match or matchmod.always(self._repo.root, self._repo.getcwd())
         match = ctx2._matchstatus(ctx1, match)
         r = scmutil.status([], [], [], [], [], [], [])
         r = ctx2._buildstatus(ctx1, r, match, listignored, listclean,
@@ -1848,8 +1847,6 @@ 
         If we aren't comparing against the working directory's parent, then we
         just use the default match object sent to us.
         """
-        superself = super(workingctx, self)
-        match = superself._matchstatus(other, match)
         if other != self._repo['.']:
             def bad(f, msg):
                 # 'f' may be a directory pattern from 'match.files()',