annotate tests/test-evolve-wdir.t @ 6130:cd07d6bd4e2a

cmdrewrite: a new `hg fixup` command This new command can be used to amend specific revisions with working copy changes. Implementation-wise what it basically does is: 1) commit working directory changes 2) relocate the new commit onto the target commit 3) fold them into one. After the run, the working directory parent will be the obsoleted changeset created in step 1 and descendants of the target will become orphans.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 03 Nov 2021 22:59:17 +0530
parents f138aea6e26b
children
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)
6103
f138aea6e26b tests: update test cases resolution documentation to current status
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6102
diff changeset
20 .. Resolution : suggest to check out one of the divergent cset and
f138aea6e26b tests: update test cases resolution documentation to current status
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6102
diff changeset
21 .. run `hg evolve --content-divergent`
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
22 ..
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
23 .. Case D: obsolete wdp with multiple successor (split rewriting)
6103
f138aea6e26b tests: update test cases resolution documentation to current status
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6102
diff changeset
24 .. Resolution : if split over a single topological branch, update to
f138aea6e26b tests: update test cases resolution documentation to current status
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6102
diff changeset
25 .. tipmost, otherwise ask user to choose one
5439
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 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
28 -------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
29
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
30 Setup
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
31 $ . $TESTDIR/testlib/common.sh
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
32 $ cat >> $HGRCPATH <<EOF
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
33 > [extensions]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
34 > evolve=
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
35 > rebase=
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
36 > [alias]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
37 > 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
38 > EOF
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
39
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
40 #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
41 #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
42 $ 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
43 > [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
44 > 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
45 > 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
46 #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
47
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
48 $ hg init repo
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
49 $ cd repo
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
50 $ mkcommit c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
51 $ mkcommit c_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
52 $ 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
53 $ 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
54 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
55 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
56 (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
57 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
58 (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
59
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
60 $ hg evolve
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
61 update:[2] u_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
62 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
63 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
64 $ hg glog
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
65 @ 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
66 |
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
67 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
68
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 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
71 ---------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
72
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
73 $ hg prune .
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
74 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
75 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
76 1 changesets pruned
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
77 $ 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
78 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
79 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
80 (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
81 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
82 (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
83
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
84 $ hg evolve
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
85 update:[0] c_A
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
86 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
87 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
88 $ hg glog
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
89 @ 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
90
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 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
93 ---------------------------------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
94
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
95 $ 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
96 $ 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
97 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
98 $ 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
99 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
100 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
101 (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
102 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
103 (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
104
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
105 $ hg evolve
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
106 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
107 [3] u_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
108 [4] c_B
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
109 [2]
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
110
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
111 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
112 $ 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
113 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
114 $ hg evolve --content-div
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
115 merge:[3] u_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
116 with: [4] c_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
117 base: [1] c_B
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
118 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
119 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
120 $ hg glog
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
121 @ 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
122 |
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
123 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
124
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
125
6102
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
126 D. Obsolete wdp with multiple successors (split rewriting)
5439
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
127 ----------------------------------------------------------
272094174185 test-obsolete: move a divergence related test from the main test
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
128
6100
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
129 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
130 $ 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
131 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
132 $ 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
133 $ 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
134 adding X
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
135 adding Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
136 adding Z
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
137 created new head
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
138 $ 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
139 > f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
140 > d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
141 > y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
142 > f
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
143 > d
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
144 > c
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
145 > EOF
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
146 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
147 adding X
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
148 adding Y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
149 adding Z
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
150 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
151 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
152 examine changes to 'X'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
153 (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
154
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
155 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
156 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
157 examine changes to 'Y'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
158 (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
159
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
160 created new head
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
161 continue splitting? [Ycdq?] y
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
162 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
163 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
164 examine changes to 'Y'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
165 (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
166
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
167 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
168 new file mode 100644
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
169 examine changes to 'Z'?
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
170 (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
171
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
172 continue splitting? [Ycdq?] c
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
173
46858e6f8b99 tests: add a remaining test on evolving obsolete wdir parent
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5777
diff changeset
174 $ 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
175 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
176 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
177 (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
178 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
179 (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
180
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
181 $ hg glog -l 3
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
182 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
183 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
184 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
185 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
186 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
187 |
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
188 ~
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
189 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
190 $ hg evolve
6101
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
191 update:[9] c_XYZ
431bf23df350 obsolete-parent: evolve the case when parent has multiple successors
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6100
diff changeset
192 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
193 working directory is now at b7ec9e61ccbf
6102
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
194
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
195 when split csets are on multiple topological branches
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
196 $ hg rebase -r 'max(desc(c_XYZ))' -d 'desc(u_B)'
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
197 rebasing 9:b7ec9e61ccbf tip "c_XYZ"
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
198 $ hg glog
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
199 @ 10:cadaa9246c55 (draft): c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
200 |
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
201 | o 8:b99a391251cc (draft): c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
202 | |
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
203 | o 7:1eb7dbbcecbd (draft): c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
204 | |
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
205 o | 5:767c654afe84 (draft): u_B
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
206 |/
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
207 o 0:9f0188af4c58 (draft): c_A
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
208
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
209 $ hg up -r 'min(desc(c_XYZ))' --hidden
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
210 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
211 updated to hidden changeset c8b6cf6ce628
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
212 (hidden revision 'c8b6cf6ce628' was split as: 1eb7dbbcecbd, b99a391251cc and 1 more)
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
213 working directory parent is obsolete! (c8b6cf6ce628)
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
214 (use 'hg evolve' to update to its tipmost successor: 1eb7dbbcecbd, b99a391251cc and 1 more)
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
215
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
216 $ hg evolve --config ui.interactive=True << EOF
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
217 > q
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
218 > EOF
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
219 changeset c8b6cf6ce628 split over multiple topological branches, choose an evolve destination:
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
220 1: [b99a391251cc] c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
221 2: [cadaa9246c55] c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
222 q: quit the prompt
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
223 enter the index of the revision you want to select: q
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
224 abort: user quit
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
225 [250]
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
226
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
227 $ hg evolve --config ui.interactive=True << EOF
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
228 > 1
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
229 > EOF
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
230 changeset c8b6cf6ce628 split over multiple topological branches, choose an evolve destination:
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
231 1: [b99a391251cc] c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
232 2: [cadaa9246c55] c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
233 q: quit the prompt
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
234 enter the index of the revision you want to select: 1
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
235 update:[8] c_XYZ
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
236 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
01bc197f31d3 tests: cover a remaining case of obsolete wdir parent evolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 6101
diff changeset
237 working directory is now at b99a391251cc