Mercurial > hg > mercurial-source
changeset 23904:f2b6f37d537b
largefiles: show progress when checking standin hashes in outgoing changesets
This checking can take a huge amount of time and we should give user a hint
that something is going on.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 16 Jan 2015 19:51:25 +0100 |
parents | 5827ad0b849e |
children | f21a0d6d6efd |
files | hgext/largefiles/lfutil.py tests/test-largefiles-misc.t |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -420,7 +420,9 @@ return filelist def getlfilestoupload(repo, missing, addfunc): - for n in missing: + for i, n in enumerate(missing): + repo.ui.progress(_('finding outgoing largefiles'), i, + unit=_('revision'), total=len(missing)) parents = [p for p in repo.changelog.parents(n) if p != node.nullid] oldlfstatus = repo.lfstatus @@ -447,6 +449,7 @@ for fn in files: if isstandin(fn) and fn in ctx: addfunc(fn, ctx[fn].data().strip()) + repo.ui.progress(_('finding outgoing largefiles'), None) def updatestandinsbymatch(repo, match): '''Update standins in the working directory according to specified match
--- a/tests/test-largefiles-misc.t +++ b/tests/test-largefiles-misc.t @@ -590,6 +590,8 @@ 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%) largefiles to upload (1 entities): b 89e6c98d92887913cadf06b2adb97f26cde4849b @@ -645,6 +647,11 @@ 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%) largefiles to upload (3 entities): b 13f9ed0898e315bf59dc2973fec52037b6f441a2 @@ -690,6 +697,10 @@ 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%) largefiles to upload (2 entities): b 13f9ed0898e315bf59dc2973fec52037b6f441a2