This instance will be upgraded to Heptapod 0.23.2 on 2021-08-05 at 11:00 UTC+2 (a few minutes of down time)

Commit 2eed20f0 authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

evolve: add a test for content-divergence resolution

This test covers a case where one of cset moved forward/backward and
parent of "base" is obsolete. And add code coverage of one of the
block in content-divergence resolution logic.
parent 65b37900d477
......@@ -389,6 +389,72 @@ Making obsolete resolution parent
x de4ea3103326 (5) updated e
Test for the case when "one of the cset moved; and base.p1() is obsolete" (a second variant of above test)
----------------------------------------------------------------------------------------------------------
$ hg evolve --stop
1 new orphan changesets
stopped the interrupted evolve
working directory is now at 8d71eadcc9df
$ hg strip -r "4:" --hidden
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to $TESTTMP/localside/.hg/strip-backup/f0057cbac933-1d77a842-backup.hg
$ hg glog
@ 3:9150fe93bec6 added d
| () [default] draft
o 2:155349b645be added c
| () [default] draft
o 1:5f6d8a4bf34a added b
| () [default] draft
o 0:9092f1db7931 added a
() [default] draft
$ echo dd > d
$ hg amend -m "updated d"
$ hg up 1 -q
To make sure we hit conflict while merging
$ echo cc > c
$ echo dd > d
$ hg add d c
$ hg ci -m "updated d"
created new head
Lets create divergence
$ hg prune 3 -s . --hidden
1 changesets pruned
2 new content-divergent changesets
Making obsolete resolution parent
$ hg prune 2
1 changesets pruned
1 new orphan changesets
$ hg glog
@ 5:2a6a528098d4 updated d
| () [default] draft
| * 4:1121b7daadae updated d
| | () [default] draft
| x 2:155349b645be added c
|/ () [default] draft
o 1:5f6d8a4bf34a added b
| () [default] draft
o 0:9092f1db7931 added a
() [default] draft
$ hg evolve --content-divergent --any --update --config ui.interactive=true <<EOF
> c
> EOF
merge:[4] updated d
with: [5] updated d
base: [3] added d
rebasing "divergent" content-divergent changeset 1121b7daadae on 5f6d8a4bf34a
file 'c' was deleted in local but was modified in other.
You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
What do you want to do? c
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
working directory is now at 187d7448a313
$ cd ..
Check that canceling of file deletion are merge correctly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment