mercurial/cmdutil.py
changeset 4232 0d51eb296fb9
parent 4209 dbc3846c09a1
parent 4229 24c22a3f2ef8
child 4353 1ccd3b9a7b1f
equal deleted inserted replaced
4224:2a8b6d78d7ee 4232:0d51eb296fb9
   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]