Mercurial > evolve
diff tests/test-evolve-wdir.t @ 6101:431bf23df350
obsolete-parent: evolve the case when parent has multiple successors
Before this patch, we were used to return error that parent has multiple
successors and exit.
This patch take more care of that case and if obsolete parent's successors are:
1) split successors, then we check if they are on a single topological
branch we update to tipmost, otherwise we ask user to select.
2) divergent successors, we suggest user to `hg update` to one of the
successors and run `hg evolve --content-div` to resolve the problem.
Changes in test file shows the updated behavior.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Thu, 29 Jul 2021 00:12:10 +0530 |
parents | 46858e6f8b99 |
children | 01bc197f31d3 |
line wrap: on
line diff
--- a/tests/test-evolve-wdir.t Tue Jul 27 18:21:34 2021 +0530 +++ b/tests/test-evolve-wdir.t Thu Jul 29 00:12:10 2021 +0530 @@ -101,18 +101,23 @@ (707ee88b2870 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) $ hg evolve - parent is obsolete with multiple successors: + parent is obsolete with multiple content-divergent successors: [3] u_B [4] c_B [2] +test that given hint works + $ hg up -r 'desc(u_B)' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg evolve --content-div + merge:[3] u_B + with: [4] c_B + base: [1] c_B + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at 767c654afe84 $ hg glog - * 4:39e54eb7aa3c (draft): c_B [content-divergent] + @ 5:767c654afe84 (draft): u_B | - | * 3:90624b574289 (draft): u_B [content-divergent] - |/ - | @ 1:707ee88b2870 (draft): c_B - |/ o 0:9f0188af4c58 (draft): c_A @@ -171,9 +176,16 @@ working directory parent is obsolete! (c8b6cf6ce628) (use 'hg evolve' to update to its tipmost successor: 1eb7dbbcecbd, b99a391251cc and 1 more) + $ hg glog -l 3 + o 9:b7ec9e61ccbf (draft): c_XYZ + | + o 8:b99a391251cc (draft): c_XYZ + | + o 7:1eb7dbbcecbd (draft): c_XYZ + | + ~ +test that given hint works $ hg evolve - parent is obsolete with multiple successors: - [6] c_XYZ - [7] c_XYZ - [8] c_XYZ - [2] + update:[9] c_XYZ + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at b7ec9e61ccbf