# HG changeset patch # User Sushil khanchi # Date 1627390294 -19800 # Node ID 46858e6f8b9908f3fe5b5dcf6a6e411541d33be2 # Parent 435dfa125d89b5b8938262eacf5a93caa1ed2758 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. diff -r 435dfa125d89 -r 46858e6f8b99 tests/test-evolve-wdir.t --- 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]