# HG changeset patch # User Martin von Zweigbergk # Date 2016-02-29 05:15:06 # Node ID 11287888ce4b927acf6e900aa8c2ab1eee75e397 # Parent f6b5b041c6c9a0d33bbc4115d47cafc4ff701411 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 --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -306,6 +306,7 @@ class cg1unpacker(object): 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 @@ class cg1unpacker(object): # 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)