D3783: changegroup: use progress helper
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Jun 18 10:24:53 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdaa08d45740f: changegroup: use progress helper (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3783?vs=9154&id=9187
REVISION DETAIL
https://phab.mercurial-scm.org/D3783
AFFECTED FILES
mercurial/changegroup.py
CHANGE DETAILS
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -975,12 +975,13 @@
def _addchangegroupfiles(repo, source, revmap, trp, expectedfiles, needfiles):
revisions = 0
files = 0
+ progress = repo.ui.makeprogress(_('files'), unit=_('files'),
+ total=expectedfiles)
for chunkdata in iter(source.filelogheader, {}):
files += 1
f = chunkdata["filename"]
repo.ui.debug("adding %s revisions\n" % f)
- repo.ui.progress(_('files'), files, unit=_('files'),
- total=expectedfiles)
+ progress.increment()
fl = repo.file(f)
o = len(fl)
try:
@@ -1001,7 +1002,7 @@
_("received spurious file revlog entry"))
if not needs:
del needfiles[f]
- repo.ui.progress(_('files'), None)
+ progress.complete()
for f, needs in needfiles.iteritems():
fl = repo.file(f)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list