Mercurial > hg
diff hgext/largefiles/lfutil.py @ 38407:164306d3f4b4
largefiles: use progress helper
Differential Revision: https://phab.mercurial-scm.org/D3808
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 18 Jun 2018 15:14:39 -0700 |
parents | 6426878f7f0f |
children | a65ad9b22a00 |
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py Mon Jun 18 15:05:52 2018 -0700 +++ b/hgext/largefiles/lfutil.py Mon Jun 18 15:14:39 2018 -0700 @@ -501,9 +501,10 @@ return filelist def getlfilestoupload(repo, missing, addfunc): + progress = repo.ui.makeprogress(_('finding outgoing largefiles'), + unit=_('revisions'), total=len(missing)) for i, n in enumerate(missing): - repo.ui.progress(_('finding outgoing largefiles'), i, - unit=_('revisions'), total=len(missing)) + progress.update(i) parents = [p for p in repo[n].parents() if p != node.nullid] oldlfstatus = repo.lfstatus @@ -530,7 +531,7 @@ for fn in files: if isstandin(fn) and fn in ctx: addfunc(fn, readasstandin(ctx[fn])) - repo.ui.progress(_('finding outgoing largefiles'), None) + progress.complete() def updatestandinsbymatch(repo, match): '''Update standins in the working directory according to specified match