Tue, 14 Nov 2017 22:46:10 +0100 rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300)
Denis Laxalde <denis@laxalde.org> [Tue, 14 Nov 2017 22:46:10 +0100] rev 35058
rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300) .. feature:: Let 'hg rebase' avoid content-divergence by skipping obsolete changesets (and their descendants) when they are present in the rebase set along with one of their successors but none of their successors is in destination. In the following example, when trying to rebase 3:: onto 2, the rebase will abort with "this rebase will cause divergence from: 4": o 7 f | | o 6 e | | | o 5 d' | | x | 4 d (rewritten as 5) |/ o 3 c | | o 2 x | | o | 1 b |/ o 0 a By excluding obsolete changesets without a successor in destination (4 in the example above) and their descendants, we make rebase work in this case, thus giving: o 11 e | o 10 d' | o 9 c | o 8 b | | o 7 f | | | | x 6 e (rewritten using rebase as 11) | | | | | x 5 d' (rewritten using rebase as 10) | | | | x | 4 d | |/ | x 3 c (rewritten using rebase as 9) | | o | 2 x | | | x 1 b (rewritten using rebase as 8) |/ o 0 a where branch 4:: is left behind while branch 5:: is rebased as expected. The rationale is that users may not be interested in rebasing orphan changesets when specifying a rebase set that include them but would still want "stable" ones to be rebased. Currently, the user is suggested to allow divergence (but probably does not want it) or they must specify a rebase set excluding problematic changesets (which might be a bit cumbersome). The approach proposed here corresponds to "Option 2" in https://www.mercurial-scm.org/wiki/CEDRebase. We extend _computeobsoletenotrebased() so that it also return a set of obsolete changesets in rebase set without a successor in destination but with at least one successor in rebase set. This 'obsoletewithoutsuccessorindestination' is then stored as an attribute of rebaseruntime and used in _performrebasesubset() to: * filter out descendants of these changesets from the revisions to rebase; * issue a message about these revisions being skipped. This only occurs if 'evolution.allowdivergence' option is off and 'rebaseskipobsolete' is on.
Sat, 11 Nov 2017 19:25:32 +0100 tests: add a couple of 'hg log' calls in test-rebase-obsolete.t
Denis Laxalde <denis@laxalde.org> [Sat, 11 Nov 2017 19:25:32 +0100] rev 35057
tests: add a couple of 'hg log' calls in test-rebase-obsolete.t It helps understanding tests.
Mon, 06 Nov 2017 22:08:02 +0100 tests: conditionally display obsfate in test-rebase-obsolete log output
Denis Laxalde <denis@laxalde.org> [Mon, 06 Nov 2017 22:08:02 +0100] rev 35056
tests: conditionally display obsfate in test-rebase-obsolete log output This helps understanding and debugging.
Sat, 11 Nov 2017 19:23:31 +0100 tests: clarify a comment in test-rebase-obsolete.t
Denis Laxalde <denis@laxalde.org> [Sat, 11 Nov 2017 19:23:31 +0100] rev 35055
tests: clarify a comment in test-rebase-obsolete.t
Sat, 11 Nov 2017 18:41:14 -0800 bundlerepo: rename _bundle to _cgunpacker
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 11 Nov 2017 18:41:14 -0800] rev 35054
bundlerepo: rename _bundle to _cgunpacker _bundle is really a changegroup unpacker instance. Rename the variable accordingly. Differential Revision: https://phab.mercurial-scm.org/D1379
Sat, 11 Nov 2017 18:34:50 -0800 bundlerepo: assign bundle attributes in bundle type blocks
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 11 Nov 2017 18:34:50 -0800] rev 35053
bundlerepo: assign bundle attributes in bundle type blocks It is a bit wonky to assign the same object to multiple attributes and then possibly overwrite them later. Refactor the code to use a local variable and defer attribute assignment until the final values are ready. This required passing the bundle instance to _handlebundle2part(). The only use of this method I could find is Facebook's treemanifest extension. Since it is a private method, I don't think it warrants an API callout. Differential Revision: https://phab.mercurial-scm.org/D1378
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip