indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY 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. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4272 AFFECTED FILES mercurial/changegroup.py tests/test-bundle.t tests/test-bundle2-format.t CHANGE DETAILS diff --git a/tests/test-bundle2-format.t b/tests/test-bundle2-format.t --- a/tests/test-bundle2-format.t +++ b/tests/test-bundle2-format.t @@ -873,17 +873,17 @@ bundle2-output-part: "changegroup" (advisory) streamed payload bundle2-output: part 0: "changegroup" bundle2-output: header chunk size: 18 - bundling: 1/4 changesets (25.00%) - bundling: 2/4 changesets (50.00%) - bundling: 3/4 changesets (75.00%) - bundling: 4/4 changesets (100.00%) - bundling: 1/4 manifests (25.00%) - bundling: 2/4 manifests (50.00%) - bundling: 3/4 manifests (75.00%) - bundling: 4/4 manifests (100.00%) - bundling: D 1/3 files (33.33%) - bundling: E 2/3 files (66.67%) - bundling: H 3/3 files (100.00%) + changesets: 1/4 chunks (25.00%) + changesets: 2/4 chunks (50.00%) + changesets: 3/4 chunks (75.00%) + changesets: 4/4 chunks (100.00%) + manifests: 1/4 chunks (25.00%) + manifests: 2/4 chunks (50.00%) + manifests: 3/4 chunks (75.00%) + manifests: 4/4 chunks (100.00%) + files: D 1/3 files (33.33%) + files: E 2/3 files (66.67%) + files: H 3/3 files (100.00%) bundle2-output: payload chunk size: 1555 bundle2-output: closing payload chunk bundle2-output: end of bundle diff --git a/tests/test-bundle.t b/tests/test-bundle.t --- a/tests/test-bundle.t +++ b/tests/test-bundle.t @@ -796,13 +796,13 @@ 057f4db07f61970e1c11e83be79e9d08adc4dc31 bundle2-output-bundle: "HG20", (1 params) 2 parts total bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload - bundling: 1/2 changesets (50.00%) - bundling: 2/2 changesets (100.00%) - bundling: 1/2 manifests (50.00%) - bundling: 2/2 manifests (100.00%) - bundling: b 1/3 files (33.33%) - bundling: b1 2/3 files (66.67%) - bundling: x 3/3 files (100.00%) + changesets: 1/2 chunks (50.00%) + changesets: 2/2 chunks (100.00%) + manifests: 1/2 chunks (50.00%) + manifests: 2/2 chunks (100.00%) + files: b 1/3 files (33.33%) + files: b1 2/3 files (66.67%) + files: x 3/3 files (100.00%) bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload #if repobundlerepo diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -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) To: indygreg, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel