Mercurial > evolve
diff tests/test-evolve-content-divergent-stack.t @ 4481:d02a7c8cdee5 stable
test: consolidate the content-divergent test cases
This commit move most of the content divergent related test in dedicated and
thematic test files.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 10 Apr 2019 14:32:00 +0200 |
parents | tests/test-evolve-content-divergence.t@d52f14bdb468 |
children | 7a5c6109ee84 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-content-divergent-stack.t Wed Apr 10 14:32:00 2019 +0200 @@ -0,0 +1,182 @@ +================================================= +Tests the resolution of content divergence: stack +================================================= + +This file intend to cover case with stacks of divergent changesets + + $ cat >> $HGRCPATH <<EOF + > [alias] + > glog = log -GT "{rev}:{node|short} {desc|firstline}\n ({bookmarks}) [{branch}] {phase}" + > [phases] + > publish = False + > [extensions] + > rebase = + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + +Resolving content-divergence of a stack with same parents +--------------------------------------------------------- + + $ hg init stacktest + $ cd stacktest + $ echo ".*\.orig" > .hgignore + $ hg add .hgignore + $ hg ci -m "added hgignore" + $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; + + $ hg glog + @ 4:c41c793e0ef1 added d + | () [default] draft + o 3:ca1b80f7960a added c + | () [default] draft + o 2:b1661037fa25 added b + | () [default] draft + o 1:c7586e2a9264 added a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ cd .. + $ hg init stack2 + $ cd stack2 + $ hg pull ../stacktest + pulling from ../stacktest + requesting all changes + adding changesets + adding manifests + adding file changes + added 5 changesets with 5 changes to 5 files + new changesets 8fa14d15e168:c41c793e0ef1 (5 drafts) + (run 'hg update' to get a working copy) + $ hg glog + o 4:c41c793e0ef1 added d + | () [default] draft + o 3:ca1b80f7960a added c + | () [default] draft + o 2:b1661037fa25 added b + | () [default] draft + o 1:c7586e2a9264 added a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ hg up c7586e2a9264 + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo bar > a + $ hg amend -m "watbar to a" + 3 new orphan changesets + $ echo wat > a + $ hg amend -m "watbar to a" + $ hg evolve --all + move:[2] added b + atop:[6] watbar to a + move:[3] added c + move:[4] added d + working directory is now at 15c781f93cac + $ hg glog + @ 9:15c781f93cac added d + | () [default] draft + o 8:9e5fb1d5b955 added c + | () [default] draft + o 7:88516dccf68a added b + | () [default] draft + o 6:82b74d5dc678 watbar to a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ cd ../stacktest + $ hg up .^^^ + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ echo wat > a + $ hg amend -m "watbar to a" + 3 new orphan changesets + $ hg evolve --all + move:[2] added b + atop:[5] watbar to a + move:[3] added c + move:[4] added d + working directory is now at c72d2885eb51 + $ hg glog + @ 8:c72d2885eb51 added d + | () [default] draft + o 7:3ce4be6d8e5e added c + | () [default] draft + o 6:d5f148423c16 added b + | () [default] draft + o 5:8e222f257bbf watbar to a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ hg pull ../stack2 + pulling from ../stack2 + searching for changes + adding changesets + adding manifests + adding file changes + added 4 changesets with 0 changes to 4 files (+1 heads) + 5 new obsolescence markers + 8 new content-divergent changesets + new changesets 82b74d5dc678:15c781f93cac (4 drafts) + (run 'hg heads' to see heads, 'hg merge' to merge) + + $ hg glog + * 12:15c781f93cac added d + | () [default] draft + * 11:9e5fb1d5b955 added c + | () [default] draft + * 10:88516dccf68a added b + | () [default] draft + * 9:82b74d5dc678 watbar to a + | () [default] draft + | @ 8:c72d2885eb51 added d + | | () [default] draft + | * 7:3ce4be6d8e5e added c + | | () [default] draft + | * 6:d5f148423c16 added b + | | () [default] draft + | * 5:8e222f257bbf watbar to a + |/ () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + + $ hg evolve --all --content-divergent + merge:[5] watbar to a + with: [9] watbar to a + base: [1] added a + updating to "local" side of the conflict: 8e222f257bbf + merging "other" content-divergent changeset '82b74d5dc678' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + 6 new orphan changesets + merge:[6] added b + with: [10] added b + base: [2] added b + updating to "local" side of the conflict: d5f148423c16 + merging "other" content-divergent changeset '88516dccf68a' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + merge:[7] added c + with: [11] added c + base: [3] added c + updating to "local" side of the conflict: 3ce4be6d8e5e + merging "other" content-divergent changeset '9e5fb1d5b955' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + merge:[8] added d + with: [12] added d + base: [4] added d + updating to "local" side of the conflict: c72d2885eb51 + merging "other" content-divergent changeset '15c781f93cac' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at 038fe7db3d88 + + $ hg glog + @ 16:038fe7db3d88 added d + | () [default] draft + o 15:b2cac10f3836 added c + | () [default] draft + o 14:eadfd9d70680 added b + | () [default] draft + o 13:f66f262fff6c watbar to a + | () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft