Mercurial > evolve
comparison tests/test-evolve-content-divergence.t @ 3805:2410e7063692
evolve: implement resolution of content-divergence when on differet parents
This patch implements the basic version of resolution of content-divergence
changesets when they are on different parents but one of the parent is gca of
both the different parents.
The functionality first relocates the divergent changeset which was left behind
and then resolves the content-divergence like it resolves in normal cases.
This is a very basic implementation because it still does not work on
interrupted evolution. Test changes in this patch shows the basic functionality
working. The output of dry-run is also required to be tweaked in such cased.
Upcoming patches will add more tests and will improve the implementation to work
during conflicts too.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 01 Jun 2018 19:52:06 +0530 |
parents | 509b1e66f0b9 |
children | 99469bb3854e |
comparison
equal
deleted
inserted
replaced
3804:509b1e66f0b9 | 3805:2410e7063692 |
---|---|
330 |/ () [default] draft | 330 |/ () [default] draft |
331 o 0:8fa14d15e168 added hgignore | 331 o 0:8fa14d15e168 added hgignore |
332 () [default] draft | 332 () [default] draft |
333 | 333 |
334 $ hg evolve --content-divergent | 334 $ hg evolve --content-divergent |
335 skipping 7ed0642d644b: have a different parent than da4b96f4a8d6 (not handled yet) | 335 merge:[5] added b |
336 | 7ed0642d644b, da4b96f4a8d6 are not based on the same changeset. | 336 with: [6] added b |
337 | With the current state of its implementation, | 337 base: [2] added b |
338 | evolve does not work in that case. | 338 rebasing "other" content-divergent changeset da4b96f4a8d6 on c7586e2a9264 |
339 | rebase one of them next to the other and run | 339 updating to "local" side of the conflict: 7ed0642d644b |
340 | this command again. | 340 merging "other" content-divergent changeset '11f849d7159f' |
341 | - either: hg rebase --dest 'p1(7ed0642d644b)' -r da4b96f4a8d6 | 341 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
342 | - or: hg rebase --dest 'p1(da4b96f4a8d6)' -r 7ed0642d644b | 342 nothing changed |
343 | 343 |
344 $ hg glog | 344 $ hg glog |
345 * 6:da4b96f4a8d6 added b | 345 @ 5:7ed0642d644b added b |
346 | () [default] draft | 346 | () [default] draft |
347 | @ 5:7ed0642d644b added b | 347 | * 4:c41c793e0ef1 added d |
348 | | () [default] draft | 348 | | () [default] draft |
349 | | * 4:c41c793e0ef1 added d | 349 | * 3:ca1b80f7960a added c |
350 | | | () [default] draft | 350 | | () [default] draft |
351 | | * 3:ca1b80f7960a added c | 351 | x 2:b1661037fa25 added b |
352 | | | () [default] draft | |
353 | | x 2:b1661037fa25 added b | |
354 | |/ () [default] draft | |
355 | o 1:c7586e2a9264 added a | |
356 |/ () [default] draft | 352 |/ () [default] draft |
357 o 0:8fa14d15e168 added hgignore | 353 o 1:c7586e2a9264 added a |
358 () [default] draft | 354 | () [default] draft |
355 o 0:8fa14d15e168 added hgignore | |
356 () [default] draft | |
357 | |
358 $ hg exp | |
359 # HG changeset patch | |
360 # User test | |
361 # Date 0 0 | |
362 # Thu Jan 01 00:00:00 1970 +0000 | |
363 # Node ID 7ed0642d644bb9ad93d252dd9ffe7b4729febe48 | |
364 # Parent c7586e2a92645e473645847a7b69a6dc52be4276 | |
365 added b | |
366 | |
367 diff -r c7586e2a9264 -r 7ed0642d644b b | |
368 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
369 +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
370 @@ -0,0 +1,1 @@ | |
371 +bar |