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