Mercurial > public > mercurial-scm > hg
diff mercurial/dirstate.py @ 6603:41eb20cc1c02
match: remove files arg from repo.status and friends
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:08 -0500 |
parents | 58b6ee2e6c92 |
children | 03a836ca6fde |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon May 12 11:37:08 2008 -0500 +++ b/mercurial/dirstate.py Mon May 12 11:37:08 2008 -0500 @@ -418,10 +418,10 @@ def walk(self, match): # filter out the src and stat - for src, f, st in self.statwalk(match.files(), match): + for src, f, st in self.statwalk(match): yield f - def statwalk(self, files, match, unknown=True, ignored=False): + def statwalk(self, match, unknown=True, ignored=False): ''' walk recursively through the directory tree, finding all files matched by the match function @@ -442,6 +442,7 @@ badfn = match.bad # walk all files by default + files = match.files() if not files: files = ['.'] dc = self._map.copy() @@ -569,11 +570,10 @@ if imatch(k): yield 'm', k, None - def status(self, files, match, list_ignored, list_clean, list_unknown): + def status(self, match, list_ignored, list_clean, list_unknown): lookup, modified, added, unknown, ignored = [], [], [], [], [] removed, deleted, clean = [], [], [] - files = files or [] _join = self._join lstat = os.lstat cmap = self._copymap @@ -587,10 +587,10 @@ dadd = deleted.append cadd = clean.append - for src, fn, st in self.statwalk(files, match, unknown=list_unknown, + for src, fn, st in self.statwalk(match, unknown=list_unknown, ignored=list_ignored): if fn not in dmap: - if (list_ignored or fn in files) and self._dirignore(fn): + if (list_ignored or match.exact(fn)) and self._dirignore(fn): if list_ignored: iadd(fn) elif list_unknown: