Show More
@@ -233,8 +233,7 b' def matchpats(repo, pats=[], opts={}, gl' | |||||
233 | def walk(repo, pats=[], opts={}, node=None, badmatch=None, globbed=False, |
|
233 | def walk(repo, pats=[], opts={}, node=None, badmatch=None, globbed=False, | |
234 | default='relpath'): |
|
234 | default='relpath'): | |
235 | dummy, m, dummy = matchpats(repo, pats, opts, globbed, default) |
|
235 | dummy, m, dummy = matchpats(repo, pats, opts, globbed, default) | |
236 |
for src, fn in repo.walk(node |
|
236 | for src, fn in repo.walk(node, m, badmatch): | |
237 | badmatch=badmatch): |
|
|||
238 | yield src, fn, m.rel(fn), m.exact(fn) |
|
237 | yield src, fn, m.rel(fn), m.exact(fn) | |
239 |
|
238 | |||
240 | def findrenames(repo, added=None, removed=None, threshold=0.5): |
|
239 | def findrenames(repo, added=None, removed=None, threshold=0.5): |
@@ -416,9 +416,10 b' class dirstate(object):' | |||||
416 | return True |
|
416 | return True | |
417 | return False |
|
417 | return False | |
418 |
|
418 | |||
419 |
def walk(self, |
|
419 | def walk(self, match, badmatch): | |
420 | # filter out the stat |
|
420 | # filter out the stat | |
421 |
for src, f, st in self.statwalk(files, match, |
|
421 | for src, f, st in self.statwalk(match.files(), match, | |
|
422 | badmatch=badmatch): | |||
422 | yield src, f |
|
423 | yield src, f | |
423 |
|
424 | |||
424 | def statwalk(self, files, match, unknown=True, |
|
425 | def statwalk(self, files, match, unknown=True, |
@@ -931,7 +931,7 b' class localrepository(repo.repository):' | |||||
931 | self.dirstate.invalidate() |
|
931 | self.dirstate.invalidate() | |
932 | del tr, lock, wlock |
|
932 | del tr, lock, wlock | |
933 |
|
933 | |||
934 |
def walk(self, node, |
|
934 | def walk(self, node, match, badmatch): | |
935 | ''' |
|
935 | ''' | |
936 | walk recursively through the directory tree or a given |
|
936 | walk recursively through the directory tree or a given | |
937 | changeset, finding all files matched by the match |
|
937 | changeset, finding all files matched by the match | |
@@ -945,7 +945,7 b' class localrepository(repo.repository):' | |||||
945 | ''' |
|
945 | ''' | |
946 |
|
946 | |||
947 | if node: |
|
947 | if node: | |
948 | fdict = dict.fromkeys(files) |
|
948 | fdict = dict.fromkeys(match.files()) | |
949 | # for dirstate.walk, files=['.'] means "walk the whole tree". |
|
949 | # for dirstate.walk, files=['.'] means "walk the whole tree". | |
950 | # follow that here, too |
|
950 | # follow that here, too | |
951 | fdict.pop('.', None) |
|
951 | fdict.pop('.', None) | |
@@ -970,7 +970,7 b' class localrepository(repo.repository):' | |||||
970 | self.ui.warn(_('%s: No such file in rev %s\n') |
|
970 | self.ui.warn(_('%s: No such file in rev %s\n') | |
971 | % (self.pathto(fn), short(node))) |
|
971 | % (self.pathto(fn), short(node))) | |
972 | else: |
|
972 | else: | |
973 |
for src, fn in self.dirstate.walk( |
|
973 | for src, fn in self.dirstate.walk(match, badmatch): | |
974 | yield src, fn |
|
974 | yield src, fn | |
975 |
|
975 | |||
976 | def status(self, node1=None, node2=None, files=[], match=util.always, |
|
976 | def status(self, node1=None, node2=None, files=[], match=util.always, |
General Comments 0
You need to be logged in to leave comments.
Login now