##// END OF EJS Templates
similar: specify unit for ui.progress when operating on files
av6 -
r28468:0d6b3630 default
parent child Browse files
Show More
@@ -25,14 +25,15 b' def _findexactmatches(repo, added, remov'
25 # Get hashes of removed files.
25 # Get hashes of removed files.
26 hashes = {}
26 hashes = {}
27 for i, fctx in enumerate(removed):
27 for i, fctx in enumerate(removed):
28 repo.ui.progress(_('searching for exact renames'), i, total=numfiles)
28 repo.ui.progress(_('searching for exact renames'), i, total=numfiles,
29 unit=_('files'))
29 h = util.sha1(fctx.data()).digest()
30 h = util.sha1(fctx.data()).digest()
30 hashes[h] = fctx
31 hashes[h] = fctx
31
32
32 # For each added file, see if it corresponds to a removed file.
33 # For each added file, see if it corresponds to a removed file.
33 for i, fctx in enumerate(added):
34 for i, fctx in enumerate(added):
34 repo.ui.progress(_('searching for exact renames'), i + len(removed),
35 repo.ui.progress(_('searching for exact renames'), i + len(removed),
35 total=numfiles)
36 total=numfiles, unit=_('files'))
36 h = util.sha1(fctx.data()).digest()
37 h = util.sha1(fctx.data()).digest()
37 if h in hashes:
38 if h in hashes:
38 yield (hashes[h], fctx)
39 yield (hashes[h], fctx)
@@ -49,7 +50,7 b' def _findsimilarmatches(repo, added, rem'
49 copies = {}
50 copies = {}
50 for i, r in enumerate(removed):
51 for i, r in enumerate(removed):
51 repo.ui.progress(_('searching for similar files'), i,
52 repo.ui.progress(_('searching for similar files'), i,
52 total=len(removed))
53 total=len(removed), unit=_('files'))
53
54
54 # lazily load text
55 # lazily load text
55 @util.cachefunc
56 @util.cachefunc
General Comments 0
You need to be logged in to leave comments. Login now