Mercurial > evolve
changeset 3799:037ccbf41c6d
tests: make sure we don't result in commit messages conflict
Upcoming patches will introduce functionality of merging commit messages while
resolving content divergence which can lead to conflicts.
We don't want to test the conflicts scenario here, so let's make sure there are
no conflicts of commit messages in this test.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 05 Jun 2018 22:02:24 +0530 |
parents | 7c05ee4a8cc7 |
children | 21914530c21c |
files | tests/test-divergent.t |
diffstat | 1 files changed, 51 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-divergent.t Tue Jun 05 21:02:09 2018 +0530 +++ b/tests/test-divergent.t Tue Jun 05 22:02:24 2018 +0530 @@ -40,41 +40,41 @@ $ hg up .^ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo bdivergent > bdivergent1 - $ hg ci -Am "divergent1" + $ hg ci -Am "divergent" adding bdivergent1 created new head $ hg up .^ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo bdivergent > bdivergent2 - $ hg ci -Am "divergent2" + $ hg ci -Am "divergent" adding bdivergent2 created new head - $ hg prune -s "desc(divergent1)" "desc('added b')" + $ hg prune -s 8374d2ddc3a4 "desc('added b')" 1 changesets pruned - $ hg prune -s "desc(divergent2)" "desc('added b')" --hidden + $ hg prune -s 593c57f2117e "desc('added b')" --hidden 1 changesets pruned 2 new content-divergent changesets $ hg log -G - @ 3:527aaa00354a@default(draft) divergent2 [content-divergent] + @ 3:8374d2ddc3a4@default(draft) divergent [content-divergent] | - | * 2:e97948280e0f@default(draft) divergent1 [content-divergent] + | * 2:593c57f2117e@default(draft) divergent [content-divergent] |/ o 0:9092f1db7931@default(draft) added a [] $ hg evolve --all --any --content-divergent - merge:[2] divergent1 - with: [3] divergent2 + merge:[2] divergent + with: [3] divergent base: [1] added b - updating to "local" side of the conflict: e97948280e0f - merging "other" content-divergent changeset '527aaa00354a' + updating to "local" side of the conflict: 593c57f2117e + merging "other" content-divergent changeset '8374d2ddc3a4' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at bcd04eb3c8c5 + working directory is now at d52878315036 $ hg log -G - @ 4:bcd04eb3c8c5@default(draft) divergent1 [] + @ 4:d52878315036@default(draft) divergent [] | o 0:9092f1db7931@default(draft) added a [] @@ -96,30 +96,42 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo "cdivergent1" > cdivergent1 $ hg add cdivergent1 - $ hg ci -m "cdivergent2" + $ hg ci -m "add _c" created new head - $ hg prune -s "desc(cdivergent1)" "desc(_c)" + $ hg log -G + @ 7:b2ae71172042@default(draft) add _c [] + | + | o 6:e3ff64ce8d4c@default(draft) add cdivergent1 [] + |/ + | o 5:48819a835615@default(draft) add _c [] + |/ + | o 4:d52878315036@default(draft) divergent [] + |/ + o 0:9092f1db7931@default(draft) added a [] + + + $ hg prune -s b2ae71172042 48819a835615 1 changesets pruned - $ hg prune -s "desc(cdivergent2)" "desc(_c)" --hidden + $ hg prune -s e3ff64ce8d4c 48819a835615 --hidden 1 changesets pruned 2 new content-divergent changesets $ hg log -G - @ 7:8debdf3c1fbd@default(draft) cdivergent2 [content-divergent] + @ 7:b2ae71172042@default(draft) add _c [content-divergent] | | * 6:e3ff64ce8d4c@default(draft) add cdivergent1 [content-divergent] |/ - | o 4:bcd04eb3c8c5@default(draft) divergent1 [] + | o 4:d52878315036@default(draft) divergent [] |/ o 0:9092f1db7931@default(draft) added a [] $ hg evolve --all --any --content-divergent merge:[6] add cdivergent1 - with: [7] cdivergent2 + with: [7] add _c base: [5] add _c updating to "local" side of the conflict: e3ff64ce8d4c - merging "other" content-divergent changeset '8debdf3c1fbd' + merging "other" content-divergent changeset 'b2ae71172042' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved nothing changed working directory is now at e3ff64ce8d4c @@ -135,26 +147,36 @@ $ hg up .^ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo bdivergent > bdivergent11 - $ hg ci -Am "bdivergent11" + $ hg ci -Am "bdivergent" adding bdivergent11 created new head $ hg up .^ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo bdivergent > bdivergent22 - $ hg ci -Am "bdivergent22" + $ hg ci -Am "bdivergent" adding bdivergent22 created new head - $ hg prune -s "desc(bdivergent11)" "desc(_b)" + $ hg log -G + @ 3:6b096fb45070@default(draft) bdivergent [] + | + | o 2:05a6b6a9e633@default(draft) bdivergent [] + |/ + | o 1:37445b16603b@default(draft) add _b [] + |/ + o 0:135f39f4bd78@default(draft) add _a [] + + + $ hg prune -s 6b096fb45070 37445b16603b 1 changesets pruned - $ hg prune -s "desc(bdivergent22)" "desc(_b)" --hidden + $ hg prune -s 05a6b6a9e633 37445b16603b --hidden 1 changesets pruned 2 new content-divergent changesets $ hg log -G - @ 3:31e50386b33b@default(draft) bdivergent22 [content-divergent] + @ 3:6b096fb45070@default(draft) bdivergent [content-divergent] | - | * 2:4bcc9397dfb9@default(draft) bdivergent11 [content-divergent] + | * 2:05a6b6a9e633@default(draft) bdivergent [content-divergent] |/ o 0:135f39f4bd78@default(draft) add _a [] @@ -175,11 +197,11 @@ (do you want to use --content-divergent) [2] $ hg evolve --content-divergent - merge:[3] bdivergent22 - with: [2] bdivergent11 + merge:[3] bdivergent + with: [2] bdivergent base: [1] add _b - merging "other" content-divergent changeset '4bcc9397dfb9' + merging "other" content-divergent changeset '05a6b6a9e633' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 1a7876768e59 + working directory is now at 1155f059af3f $ cd ..