Mercurial > evolve
diff tests/test-evolve-public-content-divergent-discard.t @ 4584:fd8dada76730
evolve: warn user for the metadata being lost in public divergence resolution
This patch print warnings if some "extras" of a divergent changeset that
is possibly important metadata which is being lost during the resolution
of public divergence.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 09 Mar 2019 19:35:45 +0530 |
parents | 4fcf9a71befc |
children | a4fde4e3e763 |
line wrap: on
line diff
--- a/tests/test-evolve-public-content-divergent-discard.t Wed Apr 17 21:16:17 2019 +0530 +++ b/tests/test-evolve-public-content-divergent-discard.t Sat Mar 09 19:35:45 2019 +0530 @@ -92,7 +92,7 @@ base: [2] added c merging "other" content-divergent changeset '90522bccf499' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - content-divergent changesets differ by descriptions only, discarding 90522bccf499 + other divergent changeset 90522bccf499 has same content as local f7c1071f1e7c and differs by "description" only, discarding 90522bccf499 content divergence resolution between f7c1071f1e7c (public) and 90522bccf499 has same content as f7c1071f1e7c, discarding 90522bccf499 $ hg evolve -l @@ -186,7 +186,7 @@ updating to "local" side of the conflict: e800202333a4 merging "other" content-divergent changeset 'ae3429430ef1' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - content-divergent changesets differ by descriptions only, discarding ae3429430ef1 + other divergent changeset ae3429430ef1 has same content as local e800202333a4 and differs by "description" only, discarding ae3429430ef1 content divergence resolution between e800202333a4 (public) and ae3429430ef1 has same content as e800202333a4, discarding ae3429430ef1 $ hg evolve -l @@ -293,7 +293,7 @@ continue: hg evolve --continue $ hg evolve --continue - content-divergent changesets differ by descriptions only, discarding 229da2719b19 + other divergent changeset 229da2719b19 has same content as local f7c1071f1e7c and differs by "description" only, discarding 229da2719b19 working directory is now at f7c1071f1e7c $ hg evolve -l @@ -400,7 +400,7 @@ updating to "local" side of the conflict: e800202333a4 merging "other" content-divergent changeset 'bc309da55b88' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - content-divergent changesets differ by descriptions only, discarding bc309da55b88 + other divergent changeset bc309da55b88 has same content as local e800202333a4 and differs by "description" only, discarding bc309da55b88 working directory is now at e800202333a4 $ hg evolve -l @@ -505,7 +505,7 @@ continue: hg evolve --continue $ hg evolve --continue - content-divergent changesets differ by descriptions only, discarding a5bbf2042450 + other divergent changeset a5bbf2042450 has same content as local e800202333a4 and differs by "description" only, discarding a5bbf2042450 working directory is now at e800202333a4 $ hg evolve -l @@ -623,7 +623,7 @@ continue: hg evolve --continue $ hg evolve --continue - content-divergent changesets differ by descriptions only, discarding 09054d1f3c97 + other divergent changeset 09054d1f3c97 has same content as local e800202333a4 and differs by "description" only, discarding 09054d1f3c97 working directory is now at e800202333a4 $ hg evolve -l @@ -637,3 +637,70 @@ summary: added d $ cd .. + +Testing that we warn the user for the metadata being lost in divergence resolution: +----------------------------------------------------------------------------------- + + $ hg init pubdiv7 + $ cd pubdiv7 + $ for ch in a b c d; do + > echo $ch > $ch; + > hg ci -Am "added "$ch; + > done; + adding a + adding b + adding c + adding d + + $ echo dada > d + $ hg amend + $ hg up -r "desc('added c')" + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg branch feature + marked working directory as branch feature + (branches are permanent and global, did you want a bookmark?) + $ echo dada > d + $ hg ci -Am "added d" + adding d + $ hg prune -r "min(desc('added d'))" -s . --hidden + 1 changesets pruned + 2 new content-divergent changesets + +(publish one side) + $ hg phase --public + $ hg up -r "draft()" + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + +(make other divergent a closed branch head) + $ hg ci --amend -m "closing feature branch" --close-branch + + $ hg glog + @ 6:af442315d198 closing feature branch + | draft content-divergent + | + | o 5:497d0d2b90ba added d + |/ public + | + o 2:155349b645be added c + | public + | + o 1:5f6d8a4bf34a added b + | public + | + o 0:9092f1db7931 added a + public + + +Run automatic evolution: + + $ hg evolve --content-divergent + merge:[5] added d + with: [6] closing feature branch + base: [3] added d + updating to "local" side of the conflict: 497d0d2b90ba + merging "other" content-divergent changeset 'af442315d198' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + other divergent changeset af442315d198 is a closed branch head and differs from local 497d0d2b90ba by "branch, description" only, discarding af442315d198 + content divergence resolution between 497d0d2b90ba (public) and af442315d198 has same content as 497d0d2b90ba, discarding af442315d198 + working directory is now at 497d0d2b90ba +