Mercurial > hg
changeset 28468:0d6b3630b9a3
similar: specify unit for ui.progress when operating on files
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 11 Mar 2016 22:29:20 +0800 |
parents | bd37f0d53a49 |
children | b65481675466 |
files | mercurial/similar.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/similar.py Fri Mar 11 20:18:41 2016 +0800 +++ b/mercurial/similar.py Fri Mar 11 22:29:20 2016 +0800 @@ -25,14 +25,15 @@ # Get hashes of removed files. hashes = {} for i, fctx in enumerate(removed): - repo.ui.progress(_('searching for exact renames'), i, total=numfiles) + repo.ui.progress(_('searching for exact renames'), i, total=numfiles, + unit=_('files')) h = util.sha1(fctx.data()).digest() hashes[h] = fctx # For each added file, see if it corresponds to a removed file. for i, fctx in enumerate(added): repo.ui.progress(_('searching for exact renames'), i + len(removed), - total=numfiles) + total=numfiles, unit=_('files')) h = util.sha1(fctx.data()).digest() if h in hashes: yield (hashes[h], fctx) @@ -49,7 +50,7 @@ copies = {} for i, r in enumerate(removed): repo.ui.progress(_('searching for similar files'), i, - total=len(removed)) + total=len(removed), unit=_('files')) # lazily load text @util.cachefunc