Patchwork D492: context: remove unnecessary default values for matchers (API)

login
register
mail settings
Submitter phabricator
Date Aug. 24, 2017, 5:08 a.m.
Message ID <8200f3ff40def3ad106ea80919a244a2@localhost.localdomain>
Download mbox | patch
Permalink /patch/23290/
State Not Applicable
Headers show

Comments

phabricator - Aug. 24, 2017, 5:08 a.m.
martinvonz updated this revision to Diff 1243.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D492?vs=1207&id=1243

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

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
@@ -1743,11 +1743,9 @@ 
                 # Even if the wlock couldn't be grabbed, clear out the list.
                 self._repo.clearpostdsstatus()
 
-    def _dirstatestatus(self, match=None, ignored=False, clean=False,
-                        unknown=False):
+    def _dirstatestatus(self, match, ignored=False, clean=False, unknown=False):
         '''Gets the status from the dirstate -- internal use only.'''
         listignored, listclean, listunknown = ignored, clean, unknown
-        match = match or matchmod.always(self._repo.root, self._repo.getcwd())
         subrepos = []
         if '.hgsub' in self:
             subrepos = sorted(self.substate)
@@ -1973,14 +1971,12 @@ 
         super(workingctx, self).__init__(repo, text, user, date, extra,
                                          changes)
 
-    def _dirstatestatus(self, match=None, ignored=False, clean=False,
-                        unknown=False):
+    def _dirstatestatus(self, match, ignored=False, clean=False, unknown=False):
         """Return matched files only in ``self._status``
 
         Uncommitted files appear "clean" via this context, even if
         they aren't actually so in the working directory.
         """
-        match = match or matchmod.always(self._repo.root, self._repo.getcwd())
         if clean:
             clean = [f for f in self._manifest if f not in self._changedset]
         else: