Mercurial > hg
comparison hgext/largefiles/basestore.py @ 28463:19b4a2087dfc
largefiles: specify unit for ui.progress when operating on files
Also make it available for translation. It could already be translated, because
it's used as a unit in archival.py and subrepo.py, for example.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 11 Mar 2016 22:21:43 +0800 |
parents | 56b2bcea2529 |
children | 207c0db08953 |
comparison
equal
deleted
inserted
replaced
28462:dbba18ba26d4 | 28463:19b4a2087dfc |
---|---|
61 ui = self.ui | 61 ui = self.ui |
62 | 62 |
63 at = 0 | 63 at = 0 |
64 available = self.exists(set(hash for (_filename, hash) in files)) | 64 available = self.exists(set(hash for (_filename, hash) in files)) |
65 for filename, hash in files: | 65 for filename, hash in files: |
66 ui.progress(_('getting largefiles'), at, unit='lfile', | 66 ui.progress(_('getting largefiles'), at, unit=_('files'), |
67 total=len(files)) | 67 total=len(files)) |
68 at += 1 | 68 at += 1 |
69 ui.note(_('getting %s:%s\n') % (filename, hash)) | 69 ui.note(_('getting %s:%s\n') % (filename, hash)) |
70 | 70 |
71 if not available.get(hash): | 71 if not available.get(hash): |