136 files, matchfn, anypats = matchpats(repo, pats, opts, globbed=globbed, |
136 files, matchfn, anypats = matchpats(repo, pats, opts, globbed=globbed, |
137 default=default) |
137 default=default) |
138 exact = dict.fromkeys(files) |
138 exact = dict.fromkeys(files) |
139 for src, fn in repo.walk(node=node, files=files, match=matchfn, |
139 for src, fn in repo.walk(node=node, files=files, match=matchfn, |
140 badmatch=badmatch): |
140 badmatch=badmatch): |
141 yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact |
141 yield src, fn, util.pathto(repo.root, repo.getcwd(), fn), fn in exact |
142 |
142 |
143 def findrenames(repo, added=None, removed=None, threshold=0.5): |
143 def findrenames(repo, added=None, removed=None, threshold=0.5): |
144 '''find renamed files -- yields (before, after, score) tuples''' |
144 '''find renamed files -- yields (before, after, score) tuples''' |
145 if added is None or removed is None: |
145 if added is None or removed is None: |
146 added, removed = repo.status()[1:3] |
146 added, removed = repo.status()[1:3] |