comparison mercurial/cmdutil.py @ 3562:730ca93ed788

convert dict(zip(x,x)) to dict.fromkeys(x)
author Matt Mackall <mpm@selenic.com>
date Fri, 27 Oct 2006 00:38:42 -0500
parents 39011927fdb0
children b4ad640a3bcf
comparison
equal deleted inserted replaced
3561:cd2216599c99 3562:730ca93ed788
138 return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'), 138 return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
139 opts.get('exclude'), head) 139 opts.get('exclude'), head)
140 140
141 def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None): 141 def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
142 files, matchfn, anypats = matchpats(repo, pats, opts, head) 142 files, matchfn, anypats = matchpats(repo, pats, opts, head)
143 exact = dict(zip(files, files)) 143 exact = dict.fromkeys(files)
144 for src, fn in repo.walk(node=node, files=files, match=matchfn, 144 for src, fn in repo.walk(node=node, files=files, match=matchfn,
145 badmatch=badmatch): 145 badmatch=badmatch):
146 yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact 146 yield src, fn, util.pathto(repo.getcwd(), fn), fn in exact
147 147
148 def findrenames(repo, added=None, removed=None, threshold=0.5): 148 def findrenames(repo, added=None, removed=None, threshold=0.5):