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.
--- a/mercurial/changegroup.py Sun Feb 14 07:35:50 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)