Mercurial > hg-stable
diff mercurial/changegroup.py @ 39267:0617a700ef7b
changegroup: change topics during generation
Changegroup generation and consumption currently uses different sets of
topics. Generation uses "bundling" and consumption uses the name of the
thing being consumed.
This commit makes the topic and unit names consistent on both ends.
The reason I chose to change the generation side is because when
"bundling" is used for 3 different stages, it is unclear which stage
of changegroup generation we're in. By making the topics "changesets,"
"manifests," and "files," one can get a better feel for how far along
in the bundling process we are.
Differential Revision: https://phab.mercurial-scm.org/D4272
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 10 Aug 2018 13:43:26 -0700 |
parents | cc957b9dc335 |
children | aad4b46e89bb |
line wrap: on
line diff
--- a/mercurial/changegroup.py Fri Aug 10 12:44:15 2018 -0700 +++ b/mercurial/changegroup.py Fri Aug 10 13:43:26 2018 -0700 @@ -658,15 +658,15 @@ def deltagroup(repo, store, nodes, ischangelog, lookup, forcedeltaparentprev, allowreorder, - units=None, + topic=None, ellipses=False, clrevtolocalrev=None, fullclnodes=None, precomputedellipsis=None): """Calculate deltas for a set of revisions. Is a generator of ``revisiondelta`` instances. - If units is not None, progress detail will be generated, units specifies - the type of revlog that is touched (changelog, manifest, etc.). + If topic is not None, progress detail will be generated using this + topic name (e.g. changesets, manifests, etc). """ if not nodes: return @@ -743,8 +743,8 @@ # We expect the first pass to be fast, so we only engage the progress # meter for constructing the revision deltas. progress = None - if units is not None: - progress = repo.ui.makeprogress(_('bundling'), unit=units, + if topic is not None: + progress = repo.ui.makeprogress(topic, unit=_('chunks'), total=len(requests)) for i, delta in enumerate(store.emitrevisiondeltas(requests)): @@ -1002,7 +1002,7 @@ # Reorder settings are currently ignored for changelog. True, ellipses=self._ellipses, - units=_('changesets'), + topic=_('changesets'), clrevtolocalrev={}, fullclnodes=self._fullclnodes, precomputedellipsis=self._precomputedellipsis) @@ -1083,7 +1083,7 @@ self._repo, store, prunednodes, False, lookupfn, self._forcedeltaparentprev, self._reorder, ellipses=self._ellipses, - units=_('manifests'), + topic=_('manifests'), clrevtolocalrev=clrevtolocalrev, fullclnodes=self._fullclnodes, precomputedellipsis=self._precomputedellipsis) @@ -1140,7 +1140,7 @@ linknodes = normallinknodes repo = self._repo - progress = repo.ui.makeprogress(_('bundling'), unit=_('files'), + progress = repo.ui.makeprogress(_('files'), unit=_('files'), total=len(changedfiles)) for i, fname in enumerate(sorted(changedfiles)): filerevlog = repo.file(fname)