upgrade: close progress after each revlog
authorMartin von Zweigbergk <martinvonz@google.com>
Sun, 17 Jun 2018 23:49:27 -0700
changeset 38398 f273b768b60f
parent 38397 1249475f0bd6
child 38399 185588cb0c4b
upgrade: close progress after each revlog IIUC, one is supposed to close each progress topic before strarting a new one. Otherwise the topics are considered nested, which we don't want here. Differential Revision: https://phab.mercurial-scm.org/D3799
mercurial/upgrade.py
--- a/mercurial/upgrade.py	Sun Jun 17 23:28:00 2018 -0700
+++ b/mercurial/upgrade.py	Sun Jun 17 23:49:27 2018 -0700
@@ -534,6 +534,8 @@
                      (mcount, mrevcount, util.bytecount(msrcsize),
                       util.bytecount(mrawsize)))
             seen.add('m')
+            if progress:
+                ui.progress(progress[0], None)
             progress[:] = [_('manifest revisions'), 0, mrevcount]
         elif 'f' not in seen:
             ui.write(_('migrating %d filelogs containing %d revisions '
@@ -541,6 +543,8 @@
                      (fcount, frevcount, util.bytecount(fsrcsize),
                       util.bytecount(frawsize)))
             seen.add('f')
+            if progress:
+                ui.progress(progress[0], None)
             progress[:] = [_('file revisions'), 0, frevcount]
 
         ui.progress(progress[0], progress[1], total=progress[2])