Mercurial > evolve
changeset 6100:46858e6f8b99
tests: add a remaining test on evolving obsolete wdir parent
The obsolete parent was split in multiple successors. As one can see
after updating to the common obsolete parent it prints a message
suggesting to run `hg evolve` to update to its tipmost successor.
But, given suggestion doesn't work as expected and instead return error
saying parent is obsolete with multiple successor.
This will be fixed in upcoming patches.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Tue, 27 Jul 2021 18:21:34 +0530 |
parents | 435dfa125d89 |
children | 431bf23df350 |
files | tests/test-evolve-wdir.t |
diffstat | 1 files changed, 58 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-evolve-wdir.t Tue Jul 27 23:32:47 2021 +0530 +++ b/tests/test-evolve-wdir.t Tue Jul 27 18:21:34 2021 +0530 @@ -119,4 +119,61 @@ D. Obsolete wdp with multiple successor (split rewriting) ---------------------------------------------------------- -#TODO: yet to write tests for this case +when split csets are on a single topological branch + $ hg up -r 'desc(c_A)' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ echo X > X; echo Y > Y; echo Z > Z; + $ hg ci -Am 'c_XYZ' + adding X + adding Y + adding Z + created new head + $ hg split -r "desc(c_XYZ)" -d "0 0" --config ui.interactive=True << EOF + > f + > d + > y + > f + > d + > c + > EOF + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + adding X + adding Y + adding Z + diff --git a/X b/X + new file mode 100644 + examine changes to 'X'? + (enter ? for help) [Ynesfdaq?] f + + diff --git a/Y b/Y + new file mode 100644 + examine changes to 'Y'? + (enter ? for help) [Ynesfdaq?] d + + created new head + continue splitting? [Ycdq?] y + diff --git a/Y b/Y + new file mode 100644 + examine changes to 'Y'? + (enter ? for help) [Ynesfdaq?] f + + diff --git a/Z b/Z + new file mode 100644 + examine changes to 'Z'? + (enter ? for help) [Ynesfdaq?] d + + continue splitting? [Ycdq?] c + + $ hg up -r 'min(desc(c_XYZ))' --hidden + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset c8b6cf6ce628 + (hidden revision 'c8b6cf6ce628' was split as: 1eb7dbbcecbd, b99a391251cc and 1 more) + working directory parent is obsolete! (c8b6cf6ce628) + (use 'hg evolve' to update to its tipmost successor: 1eb7dbbcecbd, b99a391251cc and 1 more) + + $ hg evolve + parent is obsolete with multiple successors: + [6] c_XYZ + [7] c_XYZ + [8] c_XYZ + [2]