Mercurial > hg
comparison tests/test-rebase-conflicts.t @ 33032:8e3021fd1a44
strip: include phases in bundle (BC)
Before this patch, unbundling a stripped changeset would make it a
draft (unless the parent was secret). This meant that one would lose
phase information when stripping and unbundling secret changesets. The
same thing was true for public changesets. While stripping public
changesets is generally rare, it's done frequently by e.g. the
narrowhg extension.
We also include the phases in the temporary bundle, just in case
stripping were to fail after that point, so the user can still restore
the repo including phase information. Before this patch, the phases
were left untouched during the bundling and unbundling of the
temporary bundle. Only at the end of the transaction would
phasecache.filterunknown() be called to remove phase roots that were
no longer valid. We now need to call that also after the first
stripping, i.e. before applying the temporary bundle. Otherwise
unbundling the temporary bundle will cause a read of the phase cache
which has stripped changesets in the cache and that fails.
Like with obsmarkers, we unconditionally include the phases in the
bundle when stripping (when using bundle2, such as when generaldelta
is enabled). The reason for doing that for strip but not for bundle is
that strip bundles are not meant to be shared outside the repo, so we
don't care as much about compatibility.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Jun 2017 00:15:52 -0700 |
parents | 24f55686a63d |
children | 181ca34883e6 |
comparison
equal
deleted
inserted
replaced
33031:e8c8d81eb864 | 33032:8e3021fd1a44 |
---|---|
279 getting f2.txt | 279 getting f2.txt |
280 2 changesets found | 280 2 changesets found |
281 list of changesets: | 281 list of changesets: |
282 e31216eec445e44352c5f01588856059466a24c9 | 282 e31216eec445e44352c5f01588856059466a24c9 |
283 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | 283 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
284 bundle2-output-bundle: "HG20", (1 params) 1 parts total | 284 bundle2-output-bundle: "HG20", (1 params) 2 parts total |
285 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | 285 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
286 bundle2-output-part: "phase-heads" 24 bytes payload | |
286 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | 287 saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
287 3 changesets found | 288 3 changesets found |
288 list of changesets: | 289 list of changesets: |
289 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c | 290 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
290 19c888675e133ab5dff84516926a65672eaf04d9 | 291 19c888675e133ab5dff84516926a65672eaf04d9 |
291 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf | 292 2a7f09cac94c7f4b73ebd5cd1a62d3b2e8e336bf |
292 bundle2-output-bundle: "HG20", 1 parts total | 293 bundle2-output-bundle: "HG20", 2 parts total |
293 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | 294 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
295 bundle2-output-part: "phase-heads" 24 bytes payload | |
294 adding branch | 296 adding branch |
295 bundle2-input-bundle: with-transaction | 297 bundle2-input-bundle: with-transaction |
296 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported | 298 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
297 adding changesets | 299 adding changesets |
298 add changeset 4c9fbe56a16f | 300 add changeset 4c9fbe56a16f |
301 adding manifests | 303 adding manifests |
302 adding file changes | 304 adding file changes |
303 adding f1.txt revisions | 305 adding f1.txt revisions |
304 added 2 changesets with 2 changes to 1 files | 306 added 2 changesets with 2 changes to 1 files |
305 bundle2-input-part: total payload size 1686 | 307 bundle2-input-part: total payload size 1686 |
306 bundle2-input-bundle: 0 parts total | 308 bundle2-input-part: "phase-heads" supported |
309 bundle2-input-part: total payload size 24 | |
310 bundle2-input-bundle: 1 parts total | |
307 updating the branch cache | 311 updating the branch cache |
308 invalid branchheads cache (served): tip differs | 312 invalid branchheads cache (served): tip differs |
309 rebase completed | 313 rebase completed |
310 | 314 |
311 Test minimization of merge conflicts | 315 Test minimization of merge conflicts |