D4859: exchangev2: add progress bar around manifest scanning

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Oct 3 16:52:05 UTC 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This can take a long time on large repositories. Let's add a progress
  bar so we don't have long periods where it isn't obvious what is
  going on.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4859

AFFECTED FILES
  mercurial/exchangev2.py

CHANGE DETAILS

diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py
--- a/mercurial/exchangev2.py
+++ b/mercurial/exchangev2.py
@@ -320,6 +320,9 @@
     ml = repo.manifestlog
     fnodes = collections.defaultdict(dict)
 
+    progress = repo.ui.makeprogress(
+        _('scanning manifests'), total=len(manifestnodes))
+
     for manifestnode in manifestnodes:
         m = ml.get(b'', manifestnode)
 
@@ -334,6 +337,8 @@
         for path, fnode in md.items():
             fnodes[path].setdefault(fnode, manifestnode)
 
+        progress.increment()
+
     return fnodes
 
 def _fetchfiles(repo, tr, remote, fnodes, linkrevs):



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list