[PATCH] changegroup: exclude submanifests from manifest progress

Martin von Zweigbergk martinvonz at google.com
Mon Feb 29 00:24:44 EST 2016


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1456722906 28800
#      Sun Feb 28 21:15:06 2016 -0800
# Node ID 1b784b13b5e876b44a7e540d195215f31351859e
# Parent  fdfce8ba0d392ecb8663fe70217fc2a220ac03b8
changegroup: exclude submanifests from manifest progress

The progress callback for manifests is cleared outside of
_unpackmanifests(), which means it will remain in effect while pulling
subdirectory manifests when using treemanifests. Since the total
number of revisions used for the progress is the number of changesets,
the total number of treemanifest revisions is usually larger than
that. One effect of this is that the ETA is negative. It's hard to
estimate the number of subdirectory revisions, so let's just exclude
them from progress for now.

diff -r fdfce8ba0d39 -r 1b784b13b5e8 mercurial/changegroup.py
--- a/mercurial/changegroup.py	Wed Feb 24 13:20:06 2016 +0000
+++ b/mercurial/changegroup.py	Sun Feb 28 21:15:06 2016 -0800
@@ -306,6 +306,7 @@
         self.manifestheader()
         repo.manifest.addgroup(self, revmap, trp)
         repo.ui.progress(_('manifests'), None)
+        self.callback = None
 
     def apply(self, repo, srctype, url, emptyok=False,
               targetphase=phases.draft, expectedtotal=None):
@@ -393,7 +394,6 @@
 
                 # process the files
                 repo.ui.status(_("adding file changes\n"))
-                self.callback = None
                 pr = prog(_('files'), efiles)
                 newrevs, newfiles = _addchangegroupfiles(
                     repo, self, revmap, trp, pr, needfiles)


More information about the Mercurial-devel mailing list