Show More
@@ -138,19 +138,12 b' def matchpats(repo, pats=[], opts={}, he' | |||
|
138 | 138 | return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'), |
|
139 | 139 | opts.get('exclude'), head) |
|
140 | 140 | |
|
141 |
def |
|
|
141 | def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None): | |
|
142 | 142 | files, matchfn, anypats = matchpats(repo, pats, opts, head) |
|
143 | 143 | exact = dict(zip(files, files)) |
|
144 | def walk(): | |
|
145 | for src, fn in repo.walk(node=node, files=files, match=matchfn, | |
|
146 | badmatch=badmatch): | |
|
147 | yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact | |
|
148 | return files, matchfn, walk() | |
|
149 | ||
|
150 | def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None): | |
|
151 | files, matchfn, results = makewalk(repo, pats, opts, node, head, badmatch) | |
|
152 | for r in results: | |
|
153 | yield r | |
|
144 | for src, fn in repo.walk(node=node, files=files, match=matchfn, | |
|
145 | badmatch=badmatch): | |
|
146 | yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact | |
|
154 | 147 | |
|
155 | 148 | def findrenames(repo, added=None, removed=None, threshold=0.5): |
|
156 | 149 | if added is None or removed is None: |
General Comments 0
You need to be logged in to leave comments.
Login now