Mercurial > hg
comparison tests/test-rebase-conflicts.t @ 29593:953839de96ab
bundle2: store changeset count when creating file bundles
The bundle2 changegroup part has an advisory param saying how many
changesets are in the part. Before this patch, we were setting
this part when generating bundle2 parts via the wire protocol but
not when generating local bundle2 files.
A side effect of not setting the changeset count part is that progress
bars don't work when applying changesets. As the tests show, this
impacted clone bundles, shelve, backup bundles, `hg unbundle`, and
anything touching bundle2 files.
This patch adds a backdoor to allow us to pass state from
changegroup generation into the unbundler. We store the number
of changesets in the changegroup in this state and use it to
populate the aforementioned advisory part parameter when generating
the bundle2 bundle.
I concede that I'm not thrilled by how state is being passed in
changegroup.py (it feels a bit hacky). I would love to overhaul the
rather confusing set of functions in changegroup.py with something that
passes rich objects around instead of e.g. low-level generators.
However, given the code freeze for 3.9 is imminent, I'd rather not
undertake this endeavor right now. This feels like the easiest way
to get the parameter added to the changegroup part.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 17 Jul 2016 15:13:51 -0700 |
parents | c3e9269d9602 |
children | a2a380e2750f |
comparison
equal
deleted
inserted
replaced
29592:37cccad55410 | 29593:953839de96ab |
---|---|
277 2 changesets found | 277 2 changesets found |
278 list of changesets: | 278 list of changesets: |
279 e31216eec445e44352c5f01588856059466a24c9 | 279 e31216eec445e44352c5f01588856059466a24c9 |
280 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | 280 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
281 bundle2-output-bundle: "HG20", (1 params) 1 parts total | 281 bundle2-output-bundle: "HG20", (1 params) 1 parts total |
282 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | 282 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
283 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | 283 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
284 3 changesets found | 284 3 changesets found |
285 list of changesets: | 285 list of changesets: |
286 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | 286 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
287 19c888675e133ab5dff84516926a65672eaf04d9 | 287 19c888675e133ab5dff84516926a65672eaf04d9 |
288 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf | 288 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf |
289 bundle2-output-bundle: "HG20", 1 parts total | 289 bundle2-output-bundle: "HG20", 1 parts total |
290 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | 290 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
291 adding branch | 291 adding branch |
292 bundle2-input-bundle: with-transaction | 292 bundle2-input-bundle: with-transaction |
293 bundle2-input-part: "changegroup" (params: 1 mandatory) supported | 293 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
294 adding changesets | 294 adding changesets |
295 add changeset 4c9fbe56a16f | 295 add changeset 4c9fbe56a16f |
296 add changeset 19c888675e13 | 296 add changeset 19c888675e13 |
297 add changeset 2a7f09cac94c | 297 add changeset 2a7f09cac94c |
298 adding manifests | 298 adding manifests |