# HG changeset patch # User Anton Shestakov # Date 2016-03-11 14:26:06 # Node ID 6e34690230c0b3055c9ac6ac166baa968fab02d8 # Parent 19b4a2087dfcb942181a5cd43a56654292ea12b0 largefiles: use revisions as a ui.progress unit Using plural form is consistent with other progress units, and "1 out of 5 revisions" sounds more correct. Also, tests don't show this, but if you have 'speed' item in progress.format config, it shows e.g. '100 revisions/sec', which also seems better. diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -99,7 +99,7 @@ def lfconvert(ui, src, dest, *pats, **op lfiletohash = {} for ctx in ctxs: ui.progress(_('converting revisions'), ctx.rev(), - unit=_('revision'), total=rsrc['tip'].rev()) + unit=_('revisions'), total=rsrc['tip'].rev()) _lfconvert_addchangeset(rsrc, rdst, ctx, revmap, lfiles, normalfiles, matcher, size, lfiletohash) ui.progress(_('converting revisions'), None) diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -468,7 +468,7 @@ def getlfilestoupdate(oldstandins, newst def getlfilestoupload(repo, missing, addfunc): for i, n in enumerate(missing): repo.ui.progress(_('finding outgoing largefiles'), i, - unit=_('revision'), total=len(missing)) + unit=_('revisions'), total=len(missing)) parents = [p for p in repo.changelog.parents(n) if p != node.nullid] oldlfstatus = repo.lfstatus diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t --- a/tests/test-largefiles-misc.t +++ b/tests/test-largefiles-misc.t @@ -682,8 +682,8 @@ check messages when there are files to u all remote heads known locally 1:1acbe71ce432 2:6095d0695d70 - finding outgoing largefiles: 0/2 revision (0.00%) - finding outgoing largefiles: 1/2 revision (50.00%) + finding outgoing largefiles: 0/2 revisions (0.00%) + finding outgoing largefiles: 1/2 revisions (50.00%) largefiles to upload (1 entities): b 89e6c98d92887913cadf06b2adb97f26cde4849b @@ -740,11 +740,11 @@ check messages when there are files to u 3:7983dce246cc 4:233f12ada4ae 5:036794ea641c - finding outgoing largefiles: 0/5 revision (0.00%) - finding outgoing largefiles: 1/5 revision (20.00%) - finding outgoing largefiles: 2/5 revision (40.00%) - finding outgoing largefiles: 3/5 revision (60.00%) - finding outgoing largefiles: 4/5 revision (80.00%) + finding outgoing largefiles: 0/5 revisions (0.00%) + finding outgoing largefiles: 1/5 revisions (20.00%) + finding outgoing largefiles: 2/5 revisions (40.00%) + finding outgoing largefiles: 3/5 revisions (60.00%) + finding outgoing largefiles: 4/5 revisions (80.00%) largefiles to upload (3 entities): b 13f9ed0898e315bf59dc2973fec52037b6f441a2 @@ -791,10 +791,10 @@ and #5 refer it. 3:7983dce246cc 4:233f12ada4ae 5:036794ea641c - finding outgoing largefiles: 0/4 revision (0.00%) - finding outgoing largefiles: 1/4 revision (25.00%) - finding outgoing largefiles: 2/4 revision (50.00%) - finding outgoing largefiles: 3/4 revision (75.00%) + finding outgoing largefiles: 0/4 revisions (0.00%) + finding outgoing largefiles: 1/4 revisions (25.00%) + finding outgoing largefiles: 2/4 revisions (50.00%) + finding outgoing largefiles: 3/4 revisions (75.00%) largefiles to upload (2 entities): b 13f9ed0898e315bf59dc2973fec52037b6f441a2