Mercurial > hg
changeset 10607:f3ac9d6105ee
addremove: add progress support for similarity search
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 08 Mar 2010 00:00:03 +0100 |
parents | 5868dd69fb03 |
children | 87fce8c5e29d |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sun Mar 07 23:59:28 2010 +0100 +++ b/mercurial/cmdutil.py Mon Mar 08 00:00:03 2010 +0100 @@ -289,7 +289,8 @@ '''find renamed files -- yields (before, after, score) tuples''' copies = {} ctx = repo['.'] - for r in removed: + for i, r in enumerate(removed): + repo.ui.progress(_('looking for similarities'), i, total=len(removed)) if r not in ctx: continue fctx = ctx.filectx(r) @@ -319,6 +320,7 @@ myscore = score(repo.wread(a)) if myscore >= bestscore: copies[a] = (r, myscore) + repo.ui.progress(_('looking for similarities'), None, total=len(removed)) for dest, v in copies.iteritems(): source, score = v