231 return m.files(), m, m.anypats() |
231 return m.files(), m, m.anypats() |
232 |
232 |
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=node, files=m.files(), match=m, |
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): |
241 '''find renamed files -- yields (before, after, score) tuples''' |
240 '''find renamed files -- yields (before, after, score) tuples''' |
242 if added is None or removed is None: |
241 if added is None or removed is None: |