annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
1 ===============================================
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
2 Testing evolution of obsolete working directory
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
3 ===============================================
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
4
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
5 Pulling changes from other repos can make your working directory parent (wdir)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
6 obsolete, most probably because now it has a new successor. But there are
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
7 other cases as well where it might be pruned with no successors or split
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
8 in multiple changesets etc.
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
9
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
10 This test file deals with all the possible cases for the evolution from an
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
11 obsolete working directory parent.
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
12
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
13 .. Case A: obsolete wdp with single successor
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
14 .. Resolution : simply update to the successor
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
15 ..
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
16 .. Case B: obsolete wdp with no successor (simply pruned)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
17 .. Resolution : update to a not-dead ancestor
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
18 ..
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
19 .. Case C: obsolete wdp with multiple successor (divergence rewriting)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
20 .. Resolution : #TODO: not handled yet
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
21 ..
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
22 .. Case D: obsolete wdp with multiple successor (split rewriting)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
23 .. Resolution : #TODO: not handled yet
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
24
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
25 A. Obsolete wdp with single successor
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
26 -------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
27
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
28 Setup
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
29 $ . $TESTDIR/testlib/common.sh
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
30 $ cat >> $HGRCPATH <<EOF
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
31 > [extensions]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
32 > evolve=
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
33 > rebase=
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
34 > [alias]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
35 > glog = log --graph --template "{rev}:{node|short} ({phase}): {desc|firstline} {if(troubles, '[{troubles}]')}\n"
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
36 > EOF
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
37
5777
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
38 #testcases inmemory ondisk
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
39 #if inmemory
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
40 $ cat >> $HGRCPATH <<EOF
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
41 > [experimental]
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
42 > evolution.in-memory = yes
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
43 > EOF
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
44 #endif
c5dfbbe4363d evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 5439
diff changeset
45
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
46 $ hg init repo
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
47 $ cd repo
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
48 $ mkcommit c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
49 $ mkcommit c_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
50 $ hg amend -m "u_B"
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
51 $ hg up -r 'desc(c_B)' --hidden
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
52 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
53 updated to hidden changeset 707ee88b2870
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
54 (hidden revision '707ee88b2870' was rewritten as: 9bf151312dec)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
55 working directory parent is obsolete! (707ee88b2870)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
56 (use 'hg evolve' to update to its successor: 9bf151312dec)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
57
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
58 $ hg evolve
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
59 update:[2] u_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
60 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
61 working directory is now at 9bf151312dec
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
62 $ hg glog
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
63 @ 2:9bf151312dec (draft): u_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
64 |
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
65 o 0:9f0188af4c58 (draft): c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
66
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
67
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
68 B. Obsolete wdp with no successor
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
69 ---------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
70
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
71 $ hg prune .
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
72 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
73 working directory is now at 9f0188af4c58
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
74 1 changesets pruned
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
75 $ hg up -r 'desc(c_B)' --hidden
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
76 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
77 updated to hidden changeset 707ee88b2870
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
78 (hidden revision '707ee88b2870' is pruned)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
79 working directory parent is obsolete! (707ee88b2870)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
80 (use 'hg evolve' to update to its parent successor)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
81
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
82 $ hg evolve
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
83 update:[0] c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
85 working directory is now at 9f0188af4c58
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
86 $ hg glog
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
87 @ 0:9f0188af4c58 (draft): c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
88
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
89
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
90 C. Obsolete wdp with multiple successor (divergence rewriting)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
91 ---------------------------------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
92
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
93 $ hg metaedit -r 'desc(u_B)' -d '0 1' --hidden
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
94 $ hg metaedit -r 'desc(c_B)' -d '0 1' --hidden
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
95 2 new content-divergent changesets
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
96 $ hg up -r 'min(desc(c_B))' --hidden
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
98 updated to hidden changeset 707ee88b2870
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
99 (hidden revision '707ee88b2870' has diverged)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
100 working directory parent is obsolete! (707ee88b2870)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
101 (707ee88b2870 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
102
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
103 $ hg evolve
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
104 parent is obsolete with multiple content-divergent successors:
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
105 [3] u_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
106 [4] c_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
107 [2]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
108
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
109 test that given hint works
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
110 $ hg up -r 'desc(u_B)'
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
111 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
112 $ hg evolve --content-div
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
113 merge:[3] u_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
114 with: [4] c_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
115 base: [1] c_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
116 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
117 working directory is now at 767c654afe84
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
118 $ hg glog
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
119 @ 5:767c654afe84 (draft): u_B
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
120 |
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
121 o 0:9f0188af4c58 (draft): c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
122
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
123
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
124 D. Obsolete wdp with multiple successor (split rewriting)
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
125 ----------------------------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
126
6100
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
127 when split csets are on a single topological branch
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
128 $ hg up -r 'desc(c_A)'
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
129 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
130 $ echo X > X; echo Y > Y; echo Z > Z;
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
131 $ hg ci -Am 'c_XYZ'
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
132 adding X
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
133 adding Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
134 adding Z
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
135 created new head
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
136 $ hg split -r "desc(c_XYZ)" -d "0 0" --config ui.interactive=True << EOF
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
137 > f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
138 > d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
139 > y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
140 > f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
141 > d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
142 > c
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
143 > EOF
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
144 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
145 adding X
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
146 adding Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
147 adding Z
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
148 diff --git a/X b/X
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
149 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
150 examine changes to 'X'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
151 (enter ? for help) [Ynesfdaq?] f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
152
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
153 diff --git a/Y b/Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
154 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
155 examine changes to 'Y'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
156 (enter ? for help) [Ynesfdaq?] d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
157
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
158 created new head
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
159 continue splitting? [Ycdq?] y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
160 diff --git a/Y b/Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
161 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
162 examine changes to 'Y'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
163 (enter ? for help) [Ynesfdaq?] f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
164
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
165 diff --git a/Z b/Z
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
166 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
167 examine changes to 'Z'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
168 (enter ? for help) [Ynesfdaq?] d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
169
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
170 continue splitting? [Ycdq?] c
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
171
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
172 $ hg up -r 'min(desc(c_XYZ))' --hidden
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
173 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
174 updated to hidden changeset c8b6cf6ce628
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
175 (hidden revision 'c8b6cf6ce628' was split as: 1eb7dbbcecbd, b99a391251cc and 1 more)
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
176 working directory parent is obsolete! (c8b6cf6ce628)
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
177 (use 'hg evolve' to update to its tipmost successor: 1eb7dbbcecbd, b99a391251cc and 1 more)
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
178
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
179 $ hg glog -l 3
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
180 o 9:b7ec9e61ccbf (draft): c_XYZ
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
181 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
182 o 8:b99a391251cc (draft): c_XYZ
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
183 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
184 o 7:1eb7dbbcecbd (draft): c_XYZ
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
185 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
186 ~
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
187 test that given hint works
6100
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
188 $ hg evolve
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
189 update:[9] c_XYZ
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
190 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
191 working directory is now at b7ec9e61ccbf