changeset 3528:39011927fdb0

kill makewalk function
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Oct 2006 18:43:57 -0500
parents 45620faafa28
children 09d99b7e4da0
files mercurial/cmdutil.py
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Oct 26 17:45:03 2006 -0500
+++ b/mercurial/cmdutil.py	Thu Oct 26 18:43:57 2006 -0500
@@ -138,19 +138,12 @@
     return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
                            opts.get('exclude'), head)
 
-def makewalk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
+def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
     files, matchfn, anypats = matchpats(repo, pats, opts, head)
     exact = dict(zip(files, files))
-    def walk():
-        for src, fn in repo.walk(node=node, files=files, match=matchfn,
-                                 badmatch=badmatch):
-            yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact
-    return files, matchfn, walk()
-
-def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
-    files, matchfn, results = makewalk(repo, pats, opts, node, head, badmatch)
-    for r in results:
-        yield r
+    for src, fn in repo.walk(node=node, files=files, match=matchfn,
+                             badmatch=badmatch):
+        yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact
 
 def findrenames(repo, added=None, removed=None, threshold=0.5):
     if added is None or removed is None: