comparison hgext/largefiles/lfcommands.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 d2e9cc9edc08
children 6e34690230c0
comparison
equal deleted inserted replaced
28462:dbba18ba26d4 28463:19b4a2087dfc
344 retval = store.exists(files) 344 retval = store.exists(files)
345 files = filter(lambda h: not retval[h], files) 345 files = filter(lambda h: not retval[h], files)
346 ui.debug("%d largefiles need to be uploaded\n" % len(files)) 346 ui.debug("%d largefiles need to be uploaded\n" % len(files))
347 347
348 for hash in files: 348 for hash in files:
349 ui.progress(_('uploading largefiles'), at, unit='largefile', 349 ui.progress(_('uploading largefiles'), at, unit=_('files'),
350 total=len(files)) 350 total=len(files))
351 source = lfutil.findfile(rsrc, hash) 351 source = lfutil.findfile(rsrc, hash)
352 if not source: 352 if not source:
353 raise error.Abort(_('largefile %s missing from store' 353 raise error.Abort(_('largefile %s missing from store'
354 ' (needs to be uploaded)') % hash) 354 ' (needs to be uploaded)') % hash)