143 files, matchfn, anypats = matchpats(repo, pats, opts, head, |
143 files, matchfn, anypats = matchpats(repo, pats, opts, head, |
144 globbed=globbed) |
144 globbed=globbed) |
145 exact = dict.fromkeys(files) |
145 exact = dict.fromkeys(files) |
146 for src, fn in repo.walk(node=node, files=files, match=matchfn, |
146 for src, fn in repo.walk(node=node, files=files, match=matchfn, |
147 badmatch=badmatch): |
147 badmatch=badmatch): |
148 yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact |
148 yield src, fn, util.pathto(repo.root, repo.getcwd(), fn), fn in exact |
149 |
149 |
150 def findrenames(repo, added=None, removed=None, threshold=0.5): |
150 def findrenames(repo, added=None, removed=None, threshold=0.5): |
151 if added is None or removed is None: |
151 if added is None or removed is None: |
152 added, removed = repo.status()[1:3] |
152 added, removed = repo.status()[1:3] |
153 changes = repo.changelog.read(repo.dirstate.parents()[0]) |
153 changes = repo.changelog.read(repo.dirstate.parents()[0]) |