Show More
@@ -1,2117 +1,2139 | |||||
1 | ========================== |
|
1 | ========================== | |
2 | Test rebase with obsolete |
|
2 | Test rebase with obsolete | |
3 | ========================== |
|
3 | ========================== | |
4 |
|
4 | |||
5 | Enable obsolete |
|
5 | Enable obsolete | |
6 |
|
6 | |||
7 | $ cat >> $HGRCPATH << EOF |
|
7 | $ cat >> $HGRCPATH << EOF | |
8 | > [ui] |
|
8 | > [ui] | |
9 | > logtemplate= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} |
|
9 | > logtemplate= {rev}:{node|short} {desc|firstline}{if(obsolete,' ({obsfate})')} | |
10 | > [experimental] |
|
10 | > [experimental] | |
11 | > evolution.createmarkers=True |
|
11 | > evolution.createmarkers=True | |
12 | > evolution.allowunstable=True |
|
12 | > evolution.allowunstable=True | |
13 | > [phases] |
|
13 | > [phases] | |
14 | > publish=False |
|
14 | > publish=False | |
15 | > [extensions] |
|
15 | > [extensions] | |
16 | > rebase= |
|
16 | > rebase= | |
17 | > drawdag=$TESTDIR/drawdag.py |
|
17 | > drawdag=$TESTDIR/drawdag.py | |
18 | > strip= |
|
18 | > strip= | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | Setup rebase canonical repo |
|
21 | Setup rebase canonical repo | |
22 |
|
22 | |||
23 | $ hg init base |
|
23 | $ hg init base | |
24 | $ cd base |
|
24 | $ cd base | |
25 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
25 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
26 | adding changesets |
|
26 | adding changesets | |
27 | adding manifests |
|
27 | adding manifests | |
28 | adding file changes |
|
28 | adding file changes | |
29 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
29 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
30 | new changesets cd010b8cd998:02de42196ebe |
|
30 | new changesets cd010b8cd998:02de42196ebe | |
31 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
31 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
32 | $ hg up tip |
|
32 | $ hg up tip | |
33 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ hg log -G |
|
34 | $ hg log -G | |
35 | @ 7:02de42196ebe H |
|
35 | @ 7:02de42196ebe H | |
36 | | |
|
36 | | | |
37 | | o 6:eea13746799a G |
|
37 | | o 6:eea13746799a G | |
38 | |/| |
|
38 | |/| | |
39 | o | 5:24b6387c8c8c F |
|
39 | o | 5:24b6387c8c8c F | |
40 | | | |
|
40 | | | | |
41 | | o 4:9520eea781bc E |
|
41 | | o 4:9520eea781bc E | |
42 | |/ |
|
42 | |/ | |
43 | | o 3:32af7686d403 D |
|
43 | | o 3:32af7686d403 D | |
44 | | | |
|
44 | | | | |
45 | | o 2:5fddd98957c8 C |
|
45 | | o 2:5fddd98957c8 C | |
46 | | | |
|
46 | | | | |
47 | | o 1:42ccdea3bb16 B |
|
47 | | o 1:42ccdea3bb16 B | |
48 | |/ |
|
48 | |/ | |
49 | o 0:cd010b8cd998 A |
|
49 | o 0:cd010b8cd998 A | |
50 |
|
50 | |||
51 | $ cd .. |
|
51 | $ cd .. | |
52 |
|
52 | |||
53 | simple rebase |
|
53 | simple rebase | |
54 | --------------------------------- |
|
54 | --------------------------------- | |
55 |
|
55 | |||
56 | $ hg clone base simple |
|
56 | $ hg clone base simple | |
57 | updating to branch default |
|
57 | updating to branch default | |
58 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
58 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
59 | $ cd simple |
|
59 | $ cd simple | |
60 | $ hg up 32af7686d403 |
|
60 | $ hg up 32af7686d403 | |
61 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
61 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
62 | $ hg rebase -d eea13746799a |
|
62 | $ hg rebase -d eea13746799a | |
63 | rebasing 1:42ccdea3bb16 "B" |
|
63 | rebasing 1:42ccdea3bb16 "B" | |
64 | rebasing 2:5fddd98957c8 "C" |
|
64 | rebasing 2:5fddd98957c8 "C" | |
65 | rebasing 3:32af7686d403 "D" |
|
65 | rebasing 3:32af7686d403 "D" | |
66 | $ hg log -G |
|
66 | $ hg log -G | |
67 | @ 10:8eeb3c33ad33 D |
|
67 | @ 10:8eeb3c33ad33 D | |
68 | | |
|
68 | | | |
69 | o 9:2327fea05063 C |
|
69 | o 9:2327fea05063 C | |
70 | | |
|
70 | | | |
71 | o 8:e4e5be0395b2 B |
|
71 | o 8:e4e5be0395b2 B | |
72 | | |
|
72 | | | |
73 | | o 7:02de42196ebe H |
|
73 | | o 7:02de42196ebe H | |
74 | | | |
|
74 | | | | |
75 | o | 6:eea13746799a G |
|
75 | o | 6:eea13746799a G | |
76 | |\| |
|
76 | |\| | |
77 | | o 5:24b6387c8c8c F |
|
77 | | o 5:24b6387c8c8c F | |
78 | | | |
|
78 | | | | |
79 | o | 4:9520eea781bc E |
|
79 | o | 4:9520eea781bc E | |
80 | |/ |
|
80 | |/ | |
81 | o 0:cd010b8cd998 A |
|
81 | o 0:cd010b8cd998 A | |
82 |
|
82 | |||
83 | $ hg log --hidden -G |
|
83 | $ hg log --hidden -G | |
84 | @ 10:8eeb3c33ad33 D |
|
84 | @ 10:8eeb3c33ad33 D | |
85 | | |
|
85 | | | |
86 | o 9:2327fea05063 C |
|
86 | o 9:2327fea05063 C | |
87 | | |
|
87 | | | |
88 | o 8:e4e5be0395b2 B |
|
88 | o 8:e4e5be0395b2 B | |
89 | | |
|
89 | | | |
90 | | o 7:02de42196ebe H |
|
90 | | o 7:02de42196ebe H | |
91 | | | |
|
91 | | | | |
92 | o | 6:eea13746799a G |
|
92 | o | 6:eea13746799a G | |
93 | |\| |
|
93 | |\| | |
94 | | o 5:24b6387c8c8c F |
|
94 | | o 5:24b6387c8c8c F | |
95 | | | |
|
95 | | | | |
96 | o | 4:9520eea781bc E |
|
96 | o | 4:9520eea781bc E | |
97 | |/ |
|
97 | |/ | |
98 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) |
|
98 | | x 3:32af7686d403 D (rewritten using rebase as 10:8eeb3c33ad33) | |
99 | | | |
|
99 | | | | |
100 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) |
|
100 | | x 2:5fddd98957c8 C (rewritten using rebase as 9:2327fea05063) | |
101 | | | |
|
101 | | | | |
102 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) |
|
102 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:e4e5be0395b2) | |
103 | |/ |
|
103 | |/ | |
104 | o 0:cd010b8cd998 A |
|
104 | o 0:cd010b8cd998 A | |
105 |
|
105 | |||
106 | $ hg debugobsolete |
|
106 | $ hg debugobsolete | |
107 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
107 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
108 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
108 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
109 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
109 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
110 |
|
110 | |||
111 |
|
111 | |||
112 | $ cd .. |
|
112 | $ cd .. | |
113 |
|
113 | |||
114 | empty changeset |
|
114 | empty changeset | |
115 | --------------------------------- |
|
115 | --------------------------------- | |
116 |
|
116 | |||
117 | $ hg clone base empty |
|
117 | $ hg clone base empty | |
118 | updating to branch default |
|
118 | updating to branch default | |
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | $ cd empty |
|
120 | $ cd empty | |
121 | $ hg up eea13746799a |
|
121 | $ hg up eea13746799a | |
122 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
122 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
123 |
|
123 | |||
124 | We make a copy of both the first changeset in the rebased and some other in the |
|
124 | We make a copy of both the first changeset in the rebased and some other in the | |
125 | set. |
|
125 | set. | |
126 |
|
126 | |||
127 | $ hg graft 42ccdea3bb16 32af7686d403 |
|
127 | $ hg graft 42ccdea3bb16 32af7686d403 | |
128 | grafting 1:42ccdea3bb16 "B" |
|
128 | grafting 1:42ccdea3bb16 "B" | |
129 | grafting 3:32af7686d403 "D" |
|
129 | grafting 3:32af7686d403 "D" | |
130 | $ hg rebase -s 42ccdea3bb16 -d . |
|
130 | $ hg rebase -s 42ccdea3bb16 -d . | |
131 | rebasing 1:42ccdea3bb16 "B" |
|
131 | rebasing 1:42ccdea3bb16 "B" | |
132 | note: rebase of 1:42ccdea3bb16 created no changes to commit |
|
132 | note: rebase of 1:42ccdea3bb16 created no changes to commit | |
133 | rebasing 2:5fddd98957c8 "C" |
|
133 | rebasing 2:5fddd98957c8 "C" | |
134 | rebasing 3:32af7686d403 "D" |
|
134 | rebasing 3:32af7686d403 "D" | |
135 | note: rebase of 3:32af7686d403 created no changes to commit |
|
135 | note: rebase of 3:32af7686d403 created no changes to commit | |
136 | $ hg log -G |
|
136 | $ hg log -G | |
137 | o 10:5ae4c968c6ac C |
|
137 | o 10:5ae4c968c6ac C | |
138 | | |
|
138 | | | |
139 | @ 9:08483444fef9 D |
|
139 | @ 9:08483444fef9 D | |
140 | | |
|
140 | | | |
141 | o 8:8877864f1edb B |
|
141 | o 8:8877864f1edb B | |
142 | | |
|
142 | | | |
143 | | o 7:02de42196ebe H |
|
143 | | o 7:02de42196ebe H | |
144 | | | |
|
144 | | | | |
145 | o | 6:eea13746799a G |
|
145 | o | 6:eea13746799a G | |
146 | |\| |
|
146 | |\| | |
147 | | o 5:24b6387c8c8c F |
|
147 | | o 5:24b6387c8c8c F | |
148 | | | |
|
148 | | | | |
149 | o | 4:9520eea781bc E |
|
149 | o | 4:9520eea781bc E | |
150 | |/ |
|
150 | |/ | |
151 | o 0:cd010b8cd998 A |
|
151 | o 0:cd010b8cd998 A | |
152 |
|
152 | |||
153 | $ hg log --hidden -G |
|
153 | $ hg log --hidden -G | |
154 | o 10:5ae4c968c6ac C |
|
154 | o 10:5ae4c968c6ac C | |
155 | | |
|
155 | | | |
156 | @ 9:08483444fef9 D |
|
156 | @ 9:08483444fef9 D | |
157 | | |
|
157 | | | |
158 | o 8:8877864f1edb B |
|
158 | o 8:8877864f1edb B | |
159 | | |
|
159 | | | |
160 | | o 7:02de42196ebe H |
|
160 | | o 7:02de42196ebe H | |
161 | | | |
|
161 | | | | |
162 | o | 6:eea13746799a G |
|
162 | o | 6:eea13746799a G | |
163 | |\| |
|
163 | |\| | |
164 | | o 5:24b6387c8c8c F |
|
164 | | o 5:24b6387c8c8c F | |
165 | | | |
|
165 | | | | |
166 | o | 4:9520eea781bc E |
|
166 | o | 4:9520eea781bc E | |
167 | |/ |
|
167 | |/ | |
168 | | x 3:32af7686d403 D (pruned using rebase) |
|
168 | | x 3:32af7686d403 D (pruned using rebase) | |
169 | | | |
|
169 | | | | |
170 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) |
|
170 | | x 2:5fddd98957c8 C (rewritten using rebase as 10:5ae4c968c6ac) | |
171 | | | |
|
171 | | | | |
172 | | x 1:42ccdea3bb16 B (pruned using rebase) |
|
172 | | x 1:42ccdea3bb16 B (pruned using rebase) | |
173 | |/ |
|
173 | |/ | |
174 | o 0:cd010b8cd998 A |
|
174 | o 0:cd010b8cd998 A | |
175 |
|
175 | |||
176 | $ hg debugobsolete |
|
176 | $ hg debugobsolete | |
177 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
177 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
178 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
178 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
179 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
179 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
180 |
|
180 | |||
181 |
|
181 | |||
182 | More complex case where part of the rebase set were already rebased |
|
182 | More complex case where part of the rebase set were already rebased | |
183 |
|
183 | |||
184 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
|
184 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' | |
185 | rebasing 9:08483444fef9 "D" |
|
185 | rebasing 9:08483444fef9 "D" | |
186 | 1 new orphan changesets |
|
186 | 1 new orphan changesets | |
187 | $ hg debugobsolete |
|
187 | $ hg debugobsolete | |
188 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
188 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
189 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
189 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
190 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
190 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
191 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
191 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
192 | $ hg log -G |
|
192 | $ hg log -G | |
193 | @ 11:4596109a6a43 D |
|
193 | @ 11:4596109a6a43 D | |
194 | | |
|
194 | | | |
195 | | * 10:5ae4c968c6ac C |
|
195 | | * 10:5ae4c968c6ac C | |
196 | | | |
|
196 | | | | |
197 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) |
|
197 | | x 9:08483444fef9 D (rewritten using rebase as 11:4596109a6a43) | |
198 | | | |
|
198 | | | | |
199 | | o 8:8877864f1edb B |
|
199 | | o 8:8877864f1edb B | |
200 | | | |
|
200 | | | | |
201 | o | 7:02de42196ebe H |
|
201 | o | 7:02de42196ebe H | |
202 | | | |
|
202 | | | | |
203 | | o 6:eea13746799a G |
|
203 | | o 6:eea13746799a G | |
204 | |/| |
|
204 | |/| | |
205 | o | 5:24b6387c8c8c F |
|
205 | o | 5:24b6387c8c8c F | |
206 | | | |
|
206 | | | | |
207 | | o 4:9520eea781bc E |
|
207 | | o 4:9520eea781bc E | |
208 | |/ |
|
208 | |/ | |
209 | o 0:cd010b8cd998 A |
|
209 | o 0:cd010b8cd998 A | |
210 |
|
210 | |||
211 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True |
|
211 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True | |
212 | rebasing 8:8877864f1edb "B" |
|
212 | rebasing 8:8877864f1edb "B" | |
213 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) |
|
213 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" (tip) | |
214 | rebasing 10:5ae4c968c6ac "C" |
|
214 | rebasing 10:5ae4c968c6ac "C" | |
215 | $ hg debugobsolete |
|
215 | $ hg debugobsolete | |
216 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
216 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
217 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
217 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
218 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} |
|
218 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} | |
219 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
219 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
220 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
220 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
221 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
221 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
222 | $ hg log --rev 'contentdivergent()' |
|
222 | $ hg log --rev 'contentdivergent()' | |
223 | $ hg log -G |
|
223 | $ hg log -G | |
224 | o 13:98f6af4ee953 C |
|
224 | o 13:98f6af4ee953 C | |
225 | | |
|
225 | | | |
226 | o 12:462a34d07e59 B |
|
226 | o 12:462a34d07e59 B | |
227 | | |
|
227 | | | |
228 | @ 11:4596109a6a43 D |
|
228 | @ 11:4596109a6a43 D | |
229 | | |
|
229 | | | |
230 | o 7:02de42196ebe H |
|
230 | o 7:02de42196ebe H | |
231 | | |
|
231 | | | |
232 | | o 6:eea13746799a G |
|
232 | | o 6:eea13746799a G | |
233 | |/| |
|
233 | |/| | |
234 | o | 5:24b6387c8c8c F |
|
234 | o | 5:24b6387c8c8c F | |
235 | | | |
|
235 | | | | |
236 | | o 4:9520eea781bc E |
|
236 | | o 4:9520eea781bc E | |
237 | |/ |
|
237 | |/ | |
238 | o 0:cd010b8cd998 A |
|
238 | o 0:cd010b8cd998 A | |
239 |
|
239 | |||
240 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
240 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
241 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
241 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 | |
242 | phase: draft |
|
242 | phase: draft | |
243 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
243 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
244 | parent: -1:0000000000000000000000000000000000000000 |
|
244 | parent: -1:0000000000000000000000000000000000000000 | |
245 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 |
|
245 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 | |
246 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
246 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
247 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
247 | date: Sat Apr 30 15:24:48 2011 +0200 | |
248 | files+: D |
|
248 | files+: D | |
249 | extra: branch=default |
|
249 | extra: branch=default | |
250 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c |
|
250 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c | |
251 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
251 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
252 | description: |
|
252 | description: | |
253 | D |
|
253 | D | |
254 |
|
254 | |||
255 |
|
255 | |||
256 | $ hg up -qr 'desc(G)' |
|
256 | $ hg up -qr 'desc(G)' | |
257 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
257 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 | |
258 | grafting 11:4596109a6a43 "D" |
|
258 | grafting 11:4596109a6a43 "D" | |
259 | $ hg up -qr 'desc(E)' |
|
259 | $ hg up -qr 'desc(E)' | |
260 | $ hg rebase -s tip -d . |
|
260 | $ hg rebase -s tip -d . | |
261 | rebasing 14:9e36056a46e3 "D" (tip) |
|
261 | rebasing 14:9e36056a46e3 "D" (tip) | |
262 | $ hg log --style default --debug -r tip |
|
262 | $ hg log --style default --debug -r tip | |
263 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab |
|
263 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab | |
264 | tag: tip |
|
264 | tag: tip | |
265 | phase: draft |
|
265 | phase: draft | |
266 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
266 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
267 | parent: -1:0000000000000000000000000000000000000000 |
|
267 | parent: -1:0000000000000000000000000000000000000000 | |
268 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 |
|
268 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 | |
269 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
269 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> | |
270 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
270 | date: Sat Apr 30 15:24:48 2011 +0200 | |
271 | files+: D |
|
271 | files+: D | |
272 | extra: branch=default |
|
272 | extra: branch=default | |
273 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
273 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 | |
274 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f |
|
274 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f | |
275 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
275 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a | |
276 | description: |
|
276 | description: | |
277 | D |
|
277 | D | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | Start rebase from a commit that is obsolete but not hidden only because it's |
|
280 | Start rebase from a commit that is obsolete but not hidden only because it's | |
281 | a working copy parent. We should be moved back to the starting commit as usual |
|
281 | a working copy parent. We should be moved back to the starting commit as usual | |
282 | even though it is hidden (until we're moved there). |
|
282 | even though it is hidden (until we're moved there). | |
283 |
|
283 | |||
284 | $ hg --hidden up -qr 'first(hidden())' |
|
284 | $ hg --hidden up -qr 'first(hidden())' | |
285 | updated to hidden changeset 42ccdea3bb16 |
|
285 | updated to hidden changeset 42ccdea3bb16 | |
286 | (hidden revision '42ccdea3bb16' is pruned) |
|
286 | (hidden revision '42ccdea3bb16' is pruned) | |
287 | $ hg rebase --rev 13 --dest 15 |
|
287 | $ hg rebase --rev 13 --dest 15 | |
288 | rebasing 13:98f6af4ee953 "C" |
|
288 | rebasing 13:98f6af4ee953 "C" | |
289 | $ hg log -G |
|
289 | $ hg log -G | |
290 | o 16:294a2b93eb4d C |
|
290 | o 16:294a2b93eb4d C | |
291 | | |
|
291 | | | |
292 | o 15:627d46148090 D |
|
292 | o 15:627d46148090 D | |
293 | | |
|
293 | | | |
294 | | o 12:462a34d07e59 B |
|
294 | | o 12:462a34d07e59 B | |
295 | | | |
|
295 | | | | |
296 | | o 11:4596109a6a43 D |
|
296 | | o 11:4596109a6a43 D | |
297 | | | |
|
297 | | | | |
298 | | o 7:02de42196ebe H |
|
298 | | o 7:02de42196ebe H | |
299 | | | |
|
299 | | | | |
300 | +---o 6:eea13746799a G |
|
300 | +---o 6:eea13746799a G | |
301 | | |/ |
|
301 | | |/ | |
302 | | o 5:24b6387c8c8c F |
|
302 | | o 5:24b6387c8c8c F | |
303 | | | |
|
303 | | | | |
304 | o | 4:9520eea781bc E |
|
304 | o | 4:9520eea781bc E | |
305 | |/ |
|
305 | |/ | |
306 | | @ 1:42ccdea3bb16 B (pruned using rebase) |
|
306 | | @ 1:42ccdea3bb16 B (pruned using rebase) | |
307 | |/ |
|
307 | |/ | |
308 | o 0:cd010b8cd998 A |
|
308 | o 0:cd010b8cd998 A | |
309 |
|
309 | |||
310 |
|
310 | |||
311 | $ cd .. |
|
311 | $ cd .. | |
312 |
|
312 | |||
313 | collapse rebase |
|
313 | collapse rebase | |
314 | --------------------------------- |
|
314 | --------------------------------- | |
315 |
|
315 | |||
316 | $ hg clone base collapse |
|
316 | $ hg clone base collapse | |
317 | updating to branch default |
|
317 | updating to branch default | |
318 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
318 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
319 | $ cd collapse |
|
319 | $ cd collapse | |
320 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse |
|
320 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse | |
321 | rebasing 1:42ccdea3bb16 "B" |
|
321 | rebasing 1:42ccdea3bb16 "B" | |
322 | rebasing 2:5fddd98957c8 "C" |
|
322 | rebasing 2:5fddd98957c8 "C" | |
323 | rebasing 3:32af7686d403 "D" |
|
323 | rebasing 3:32af7686d403 "D" | |
324 | $ hg log -G |
|
324 | $ hg log -G | |
325 | o 8:4dc2197e807b Collapsed revision |
|
325 | o 8:4dc2197e807b Collapsed revision | |
326 | | |
|
326 | | | |
327 | | @ 7:02de42196ebe H |
|
327 | | @ 7:02de42196ebe H | |
328 | | | |
|
328 | | | | |
329 | o | 6:eea13746799a G |
|
329 | o | 6:eea13746799a G | |
330 | |\| |
|
330 | |\| | |
331 | | o 5:24b6387c8c8c F |
|
331 | | o 5:24b6387c8c8c F | |
332 | | | |
|
332 | | | | |
333 | o | 4:9520eea781bc E |
|
333 | o | 4:9520eea781bc E | |
334 | |/ |
|
334 | |/ | |
335 | o 0:cd010b8cd998 A |
|
335 | o 0:cd010b8cd998 A | |
336 |
|
336 | |||
337 | $ hg log --hidden -G |
|
337 | $ hg log --hidden -G | |
338 | o 8:4dc2197e807b Collapsed revision |
|
338 | o 8:4dc2197e807b Collapsed revision | |
339 | | |
|
339 | | | |
340 | | @ 7:02de42196ebe H |
|
340 | | @ 7:02de42196ebe H | |
341 | | | |
|
341 | | | | |
342 | o | 6:eea13746799a G |
|
342 | o | 6:eea13746799a G | |
343 | |\| |
|
343 | |\| | |
344 | | o 5:24b6387c8c8c F |
|
344 | | o 5:24b6387c8c8c F | |
345 | | | |
|
345 | | | | |
346 | o | 4:9520eea781bc E |
|
346 | o | 4:9520eea781bc E | |
347 | |/ |
|
347 | |/ | |
348 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) |
|
348 | | x 3:32af7686d403 D (rewritten using rebase as 8:4dc2197e807b) | |
349 | | | |
|
349 | | | | |
350 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) |
|
350 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:4dc2197e807b) | |
351 | | | |
|
351 | | | | |
352 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) |
|
352 | | x 1:42ccdea3bb16 B (rewritten using rebase as 8:4dc2197e807b) | |
353 | |/ |
|
353 | |/ | |
354 | o 0:cd010b8cd998 A |
|
354 | o 0:cd010b8cd998 A | |
355 |
|
355 | |||
356 | $ hg id --debug -r tip |
|
356 | $ hg id --debug -r tip | |
357 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip |
|
357 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip | |
358 | $ hg debugobsolete |
|
358 | $ hg debugobsolete | |
359 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
359 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
360 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
360 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
361 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} |
|
361 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'rebase', 'user': 'test'} | |
362 |
|
362 | |||
363 | $ cd .. |
|
363 | $ cd .. | |
364 |
|
364 | |||
365 | Rebase set has hidden descendants |
|
365 | Rebase set has hidden descendants | |
366 | --------------------------------- |
|
366 | --------------------------------- | |
367 |
|
367 | |||
368 | We rebase a changeset which has hidden descendants. Hidden changesets must not |
|
368 | We rebase a changeset which has hidden descendants. Hidden changesets must not | |
369 | be rebased. |
|
369 | be rebased. | |
370 |
|
370 | |||
371 | $ hg clone base hidden |
|
371 | $ hg clone base hidden | |
372 | updating to branch default |
|
372 | updating to branch default | |
373 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
373 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
374 | $ cd hidden |
|
374 | $ cd hidden | |
375 | $ hg log -G |
|
375 | $ hg log -G | |
376 | @ 7:02de42196ebe H |
|
376 | @ 7:02de42196ebe H | |
377 | | |
|
377 | | | |
378 | | o 6:eea13746799a G |
|
378 | | o 6:eea13746799a G | |
379 | |/| |
|
379 | |/| | |
380 | o | 5:24b6387c8c8c F |
|
380 | o | 5:24b6387c8c8c F | |
381 | | | |
|
381 | | | | |
382 | | o 4:9520eea781bc E |
|
382 | | o 4:9520eea781bc E | |
383 | |/ |
|
383 | |/ | |
384 | | o 3:32af7686d403 D |
|
384 | | o 3:32af7686d403 D | |
385 | | | |
|
385 | | | | |
386 | | o 2:5fddd98957c8 C |
|
386 | | o 2:5fddd98957c8 C | |
387 | | | |
|
387 | | | | |
388 | | o 1:42ccdea3bb16 B |
|
388 | | o 1:42ccdea3bb16 B | |
389 | |/ |
|
389 | |/ | |
390 | o 0:cd010b8cd998 A |
|
390 | o 0:cd010b8cd998 A | |
391 |
|
391 | |||
392 | $ hg rebase -s 5fddd98957c8 -d eea13746799a |
|
392 | $ hg rebase -s 5fddd98957c8 -d eea13746799a | |
393 | rebasing 2:5fddd98957c8 "C" |
|
393 | rebasing 2:5fddd98957c8 "C" | |
394 | rebasing 3:32af7686d403 "D" |
|
394 | rebasing 3:32af7686d403 "D" | |
395 | $ hg log -G |
|
395 | $ hg log -G | |
396 | o 9:cf44d2f5a9f4 D |
|
396 | o 9:cf44d2f5a9f4 D | |
397 | | |
|
397 | | | |
398 | o 8:e273c5e7d2d2 C |
|
398 | o 8:e273c5e7d2d2 C | |
399 | | |
|
399 | | | |
400 | | @ 7:02de42196ebe H |
|
400 | | @ 7:02de42196ebe H | |
401 | | | |
|
401 | | | | |
402 | o | 6:eea13746799a G |
|
402 | o | 6:eea13746799a G | |
403 | |\| |
|
403 | |\| | |
404 | | o 5:24b6387c8c8c F |
|
404 | | o 5:24b6387c8c8c F | |
405 | | | |
|
405 | | | | |
406 | o | 4:9520eea781bc E |
|
406 | o | 4:9520eea781bc E | |
407 | |/ |
|
407 | |/ | |
408 | | o 1:42ccdea3bb16 B |
|
408 | | o 1:42ccdea3bb16 B | |
409 | |/ |
|
409 | |/ | |
410 | o 0:cd010b8cd998 A |
|
410 | o 0:cd010b8cd998 A | |
411 |
|
411 | |||
412 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe |
|
412 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe | |
413 | rebasing 1:42ccdea3bb16 "B" |
|
413 | rebasing 1:42ccdea3bb16 "B" | |
414 | $ hg log -G |
|
414 | $ hg log -G | |
415 | o 10:7c6027df6a99 B |
|
415 | o 10:7c6027df6a99 B | |
416 | | |
|
416 | | | |
417 | | o 9:cf44d2f5a9f4 D |
|
417 | | o 9:cf44d2f5a9f4 D | |
418 | | | |
|
418 | | | | |
419 | | o 8:e273c5e7d2d2 C |
|
419 | | o 8:e273c5e7d2d2 C | |
420 | | | |
|
420 | | | | |
421 | @ | 7:02de42196ebe H |
|
421 | @ | 7:02de42196ebe H | |
422 | | | |
|
422 | | | | |
423 | | o 6:eea13746799a G |
|
423 | | o 6:eea13746799a G | |
424 | |/| |
|
424 | |/| | |
425 | o | 5:24b6387c8c8c F |
|
425 | o | 5:24b6387c8c8c F | |
426 | | | |
|
426 | | | | |
427 | | o 4:9520eea781bc E |
|
427 | | o 4:9520eea781bc E | |
428 | |/ |
|
428 | |/ | |
429 | o 0:cd010b8cd998 A |
|
429 | o 0:cd010b8cd998 A | |
430 |
|
430 | |||
431 | $ hg log --hidden -G |
|
431 | $ hg log --hidden -G | |
432 | o 10:7c6027df6a99 B |
|
432 | o 10:7c6027df6a99 B | |
433 | | |
|
433 | | | |
434 | | o 9:cf44d2f5a9f4 D |
|
434 | | o 9:cf44d2f5a9f4 D | |
435 | | | |
|
435 | | | | |
436 | | o 8:e273c5e7d2d2 C |
|
436 | | o 8:e273c5e7d2d2 C | |
437 | | | |
|
437 | | | | |
438 | @ | 7:02de42196ebe H |
|
438 | @ | 7:02de42196ebe H | |
439 | | | |
|
439 | | | | |
440 | | o 6:eea13746799a G |
|
440 | | o 6:eea13746799a G | |
441 | |/| |
|
441 | |/| | |
442 | o | 5:24b6387c8c8c F |
|
442 | o | 5:24b6387c8c8c F | |
443 | | | |
|
443 | | | | |
444 | | o 4:9520eea781bc E |
|
444 | | o 4:9520eea781bc E | |
445 | |/ |
|
445 | |/ | |
446 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) |
|
446 | | x 3:32af7686d403 D (rewritten using rebase as 9:cf44d2f5a9f4) | |
447 | | | |
|
447 | | | | |
448 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) |
|
448 | | x 2:5fddd98957c8 C (rewritten using rebase as 8:e273c5e7d2d2) | |
449 | | | |
|
449 | | | | |
450 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) |
|
450 | | x 1:42ccdea3bb16 B (rewritten using rebase as 10:7c6027df6a99) | |
451 | |/ |
|
451 | |/ | |
452 | o 0:cd010b8cd998 A |
|
452 | o 0:cd010b8cd998 A | |
453 |
|
453 | |||
454 | $ hg debugobsolete |
|
454 | $ hg debugobsolete | |
455 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
455 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
456 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
456 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
457 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} |
|
457 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
458 |
|
458 | |||
459 | Test that rewriting leaving instability behind is allowed |
|
459 | Test that rewriting leaving instability behind is allowed | |
460 | --------------------------------------------------------------------- |
|
460 | --------------------------------------------------------------------- | |
461 |
|
461 | |||
462 | $ hg log -r 'children(8)' |
|
462 | $ hg log -r 'children(8)' | |
463 | 9:cf44d2f5a9f4 D (no-eol) |
|
463 | 9:cf44d2f5a9f4 D (no-eol) | |
464 | $ hg rebase -r 8 |
|
464 | $ hg rebase -r 8 | |
465 | rebasing 8:e273c5e7d2d2 "C" |
|
465 | rebasing 8:e273c5e7d2d2 "C" | |
466 | 1 new orphan changesets |
|
466 | 1 new orphan changesets | |
467 | $ hg log -G |
|
467 | $ hg log -G | |
468 | o 11:0d8f238b634c C |
|
468 | o 11:0d8f238b634c C | |
469 | | |
|
469 | | | |
470 | o 10:7c6027df6a99 B |
|
470 | o 10:7c6027df6a99 B | |
471 | | |
|
471 | | | |
472 | | * 9:cf44d2f5a9f4 D |
|
472 | | * 9:cf44d2f5a9f4 D | |
473 | | | |
|
473 | | | | |
474 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) |
|
474 | | x 8:e273c5e7d2d2 C (rewritten using rebase as 11:0d8f238b634c) | |
475 | | | |
|
475 | | | | |
476 | @ | 7:02de42196ebe H |
|
476 | @ | 7:02de42196ebe H | |
477 | | | |
|
477 | | | | |
478 | | o 6:eea13746799a G |
|
478 | | o 6:eea13746799a G | |
479 | |/| |
|
479 | |/| | |
480 | o | 5:24b6387c8c8c F |
|
480 | o | 5:24b6387c8c8c F | |
481 | | | |
|
481 | | | | |
482 | | o 4:9520eea781bc E |
|
482 | | o 4:9520eea781bc E | |
483 | |/ |
|
483 | |/ | |
484 | o 0:cd010b8cd998 A |
|
484 | o 0:cd010b8cd998 A | |
485 |
|
485 | |||
486 | $ cd .. |
|
486 | $ cd .. | |
487 | $ cp -R hidden stabilize |
|
487 | $ cp -R hidden stabilize | |
488 | $ cd stabilize |
|
488 | $ cd stabilize | |
489 | $ hg rebase --auto-orphans '0::' -d 10 |
|
489 | $ hg rebase --auto-orphans '0::' -d 10 | |
490 | abort: --auto-orphans is incompatible with --dest |
|
490 | abort: --auto-orphans is incompatible with --dest | |
491 | [255] |
|
491 | [255] | |
492 | $ hg rebase --auto-orphans '0::' |
|
492 | $ hg rebase --auto-orphans '0::' | |
493 | rebasing 9:cf44d2f5a9f4 "D" |
|
493 | rebasing 9:cf44d2f5a9f4 "D" | |
494 | $ hg log -G |
|
494 | $ hg log -G | |
495 | o 12:7e3935feaa68 D |
|
495 | o 12:7e3935feaa68 D | |
496 | | |
|
496 | | | |
497 | o 11:0d8f238b634c C |
|
497 | o 11:0d8f238b634c C | |
498 | | |
|
498 | | | |
499 | o 10:7c6027df6a99 B |
|
499 | o 10:7c6027df6a99 B | |
500 | | |
|
500 | | | |
501 | @ 7:02de42196ebe H |
|
501 | @ 7:02de42196ebe H | |
502 | | |
|
502 | | | |
503 | | o 6:eea13746799a G |
|
503 | | o 6:eea13746799a G | |
504 | |/| |
|
504 | |/| | |
505 | o | 5:24b6387c8c8c F |
|
505 | o | 5:24b6387c8c8c F | |
506 | | | |
|
506 | | | | |
507 | | o 4:9520eea781bc E |
|
507 | | o 4:9520eea781bc E | |
508 | |/ |
|
508 | |/ | |
509 | o 0:cd010b8cd998 A |
|
509 | o 0:cd010b8cd998 A | |
510 |
|
510 | |||
511 |
|
511 | |||
512 | $ cd ../hidden |
|
512 | $ cd ../hidden | |
513 | $ rm -r ../stabilize |
|
513 | $ rm -r ../stabilize | |
514 |
|
514 | |||
515 | Test multiple root handling |
|
515 | Test multiple root handling | |
516 | ------------------------------------ |
|
516 | ------------------------------------ | |
517 |
|
517 | |||
518 | $ hg rebase --dest 4 --rev '7+11+9' |
|
518 | $ hg rebase --dest 4 --rev '7+11+9' | |
519 | rebasing 9:cf44d2f5a9f4 "D" |
|
519 | rebasing 9:cf44d2f5a9f4 "D" | |
520 | rebasing 7:02de42196ebe "H" |
|
520 | rebasing 7:02de42196ebe "H" | |
521 | rebasing 11:0d8f238b634c "C" (tip) |
|
521 | rebasing 11:0d8f238b634c "C" (tip) | |
522 | $ hg log -G |
|
522 | $ hg log -G | |
523 | o 14:1e8370e38cca C |
|
523 | o 14:1e8370e38cca C | |
524 | | |
|
524 | | | |
525 | @ 13:bfe264faf697 H |
|
525 | @ 13:bfe264faf697 H | |
526 | | |
|
526 | | | |
527 | | o 12:102b4c1d889b D |
|
527 | | o 12:102b4c1d889b D | |
528 | |/ |
|
528 | |/ | |
529 | | * 10:7c6027df6a99 B |
|
529 | | * 10:7c6027df6a99 B | |
530 | | | |
|
530 | | | | |
531 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) |
|
531 | | x 7:02de42196ebe H (rewritten using rebase as 13:bfe264faf697) | |
532 | | | |
|
532 | | | | |
533 | +---o 6:eea13746799a G |
|
533 | +---o 6:eea13746799a G | |
534 | | |/ |
|
534 | | |/ | |
535 | | o 5:24b6387c8c8c F |
|
535 | | o 5:24b6387c8c8c F | |
536 | | | |
|
536 | | | | |
537 | o | 4:9520eea781bc E |
|
537 | o | 4:9520eea781bc E | |
538 | |/ |
|
538 | |/ | |
539 | o 0:cd010b8cd998 A |
|
539 | o 0:cd010b8cd998 A | |
540 |
|
540 | |||
541 | $ cd .. |
|
541 | $ cd .. | |
542 |
|
542 | |||
543 | Detach both parents |
|
543 | Detach both parents | |
544 |
|
544 | |||
545 | $ hg init double-detach |
|
545 | $ hg init double-detach | |
546 | $ cd double-detach |
|
546 | $ cd double-detach | |
547 |
|
547 | |||
548 | $ hg debugdrawdag <<EOF |
|
548 | $ hg debugdrawdag <<EOF | |
549 | > F |
|
549 | > F | |
550 | > /| |
|
550 | > /| | |
551 | > C E |
|
551 | > C E | |
552 | > | | |
|
552 | > | | | |
553 | > B D G |
|
553 | > B D G | |
554 | > \|/ |
|
554 | > \|/ | |
555 | > A |
|
555 | > A | |
556 | > EOF |
|
556 | > EOF | |
557 |
|
557 | |||
558 | $ hg rebase -d G -r 'B + D + F' |
|
558 | $ hg rebase -d G -r 'B + D + F' | |
559 | rebasing 1:112478962961 "B" (B) |
|
559 | rebasing 1:112478962961 "B" (B) | |
560 | rebasing 2:b18e25de2cf5 "D" (D) |
|
560 | rebasing 2:b18e25de2cf5 "D" (D) | |
561 | rebasing 6:f15c3adaf214 "F" (F tip) |
|
561 | rebasing 6:f15c3adaf214 "F" (F tip) | |
562 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents |
|
562 | abort: cannot rebase 6:f15c3adaf214 without moving at least one of its parents | |
563 | [255] |
|
563 | [255] | |
564 |
|
564 | |||
565 | $ cd .. |
|
565 | $ cd .. | |
566 |
|
566 | |||
567 | test on rebase dropping a merge |
|
567 | test on rebase dropping a merge | |
568 |
|
568 | |||
569 | (setup) |
|
569 | (setup) | |
570 |
|
570 | |||
571 | $ hg init dropmerge |
|
571 | $ hg init dropmerge | |
572 | $ cd dropmerge |
|
572 | $ cd dropmerge | |
573 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
573 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" | |
574 | adding changesets |
|
574 | adding changesets | |
575 | adding manifests |
|
575 | adding manifests | |
576 | adding file changes |
|
576 | adding file changes | |
577 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
577 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
578 | new changesets cd010b8cd998:02de42196ebe |
|
578 | new changesets cd010b8cd998:02de42196ebe | |
579 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
579 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
580 | $ hg up 3 |
|
580 | $ hg up 3 | |
581 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
581 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
582 | $ hg merge 7 |
|
582 | $ hg merge 7 | |
583 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
583 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
584 | (branch merge, don't forget to commit) |
|
584 | (branch merge, don't forget to commit) | |
585 | $ hg ci -m 'M' |
|
585 | $ hg ci -m 'M' | |
586 | $ echo I > I |
|
586 | $ echo I > I | |
587 | $ hg add I |
|
587 | $ hg add I | |
588 | $ hg ci -m I |
|
588 | $ hg ci -m I | |
589 | $ hg log -G |
|
589 | $ hg log -G | |
590 | @ 9:4bde274eefcf I |
|
590 | @ 9:4bde274eefcf I | |
591 | | |
|
591 | | | |
592 | o 8:53a6a128b2b7 M |
|
592 | o 8:53a6a128b2b7 M | |
593 | |\ |
|
593 | |\ | |
594 | | o 7:02de42196ebe H |
|
594 | | o 7:02de42196ebe H | |
595 | | | |
|
595 | | | | |
596 | | | o 6:eea13746799a G |
|
596 | | | o 6:eea13746799a G | |
597 | | |/| |
|
597 | | |/| | |
598 | | o | 5:24b6387c8c8c F |
|
598 | | o | 5:24b6387c8c8c F | |
599 | | | | |
|
599 | | | | | |
600 | | | o 4:9520eea781bc E |
|
600 | | | o 4:9520eea781bc E | |
601 | | |/ |
|
601 | | |/ | |
602 | o | 3:32af7686d403 D |
|
602 | o | 3:32af7686d403 D | |
603 | | | |
|
603 | | | | |
604 | o | 2:5fddd98957c8 C |
|
604 | o | 2:5fddd98957c8 C | |
605 | | | |
|
605 | | | | |
606 | o | 1:42ccdea3bb16 B |
|
606 | o | 1:42ccdea3bb16 B | |
607 | |/ |
|
607 | |/ | |
608 | o 0:cd010b8cd998 A |
|
608 | o 0:cd010b8cd998 A | |
609 |
|
609 | |||
610 | (actual test) |
|
610 | (actual test) | |
611 |
|
611 | |||
612 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' |
|
612 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' | |
613 | rebasing 3:32af7686d403 "D" |
|
613 | rebasing 3:32af7686d403 "D" | |
614 | rebasing 7:02de42196ebe "H" |
|
614 | rebasing 7:02de42196ebe "H" | |
615 | rebasing 9:4bde274eefcf "I" (tip) |
|
615 | rebasing 9:4bde274eefcf "I" (tip) | |
616 | 1 new orphan changesets |
|
616 | 1 new orphan changesets | |
617 | $ hg log -G |
|
617 | $ hg log -G | |
618 | @ 12:acd174b7ab39 I |
|
618 | @ 12:acd174b7ab39 I | |
619 | | |
|
619 | | | |
620 | o 11:6c11a6218c97 H |
|
620 | o 11:6c11a6218c97 H | |
621 | | |
|
621 | | | |
622 | | o 10:b5313c85b22e D |
|
622 | | o 10:b5313c85b22e D | |
623 | |/ |
|
623 | |/ | |
624 | | * 8:53a6a128b2b7 M |
|
624 | | * 8:53a6a128b2b7 M | |
625 | | |\ |
|
625 | | |\ | |
626 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
626 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
627 | | | | |
|
627 | | | | | |
628 | o---+ 6:eea13746799a G |
|
628 | o---+ 6:eea13746799a G | |
629 | | | | |
|
629 | | | | | |
630 | | | o 5:24b6387c8c8c F |
|
630 | | | o 5:24b6387c8c8c F | |
631 | | | | |
|
631 | | | | | |
632 | o---+ 4:9520eea781bc E |
|
632 | o---+ 4:9520eea781bc E | |
633 | / / |
|
633 | / / | |
634 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
634 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
635 | | | |
|
635 | | | | |
636 | o | 2:5fddd98957c8 C |
|
636 | o | 2:5fddd98957c8 C | |
637 | | | |
|
637 | | | | |
638 | o | 1:42ccdea3bb16 B |
|
638 | o | 1:42ccdea3bb16 B | |
639 | |/ |
|
639 | |/ | |
640 | o 0:cd010b8cd998 A |
|
640 | o 0:cd010b8cd998 A | |
641 |
|
641 | |||
642 |
|
642 | |||
643 | Test hidden changesets in the rebase set (issue4504) |
|
643 | Test hidden changesets in the rebase set (issue4504) | |
644 |
|
644 | |||
645 | $ hg up --hidden 9 |
|
645 | $ hg up --hidden 9 | |
646 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
646 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
647 | updated to hidden changeset 4bde274eefcf |
|
647 | updated to hidden changeset 4bde274eefcf | |
648 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) |
|
648 | (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) | |
649 | $ echo J > J |
|
649 | $ echo J > J | |
650 | $ hg add J |
|
650 | $ hg add J | |
651 | $ hg commit -m J |
|
651 | $ hg commit -m J | |
652 | 1 new orphan changesets |
|
652 | 1 new orphan changesets | |
653 | $ hg debugobsolete `hg log --rev . -T '{node}'` |
|
653 | $ hg debugobsolete `hg log --rev . -T '{node}'` | |
654 | obsoleted 1 changesets |
|
654 | obsoleted 1 changesets | |
655 |
|
655 | |||
656 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
|
656 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off | |
657 | rebasing 9:4bde274eefcf "I" |
|
657 | rebasing 9:4bde274eefcf "I" | |
658 | rebasing 13:06edfc82198f "J" (tip) |
|
658 | rebasing 13:06edfc82198f "J" (tip) | |
659 | 2 new content-divergent changesets |
|
659 | 2 new content-divergent changesets | |
660 | $ hg log -G |
|
660 | $ hg log -G | |
661 | @ 15:5ae8a643467b J |
|
661 | @ 15:5ae8a643467b J | |
662 | | |
|
662 | | | |
663 | * 14:9ad579b4a5de I |
|
663 | * 14:9ad579b4a5de I | |
664 | | |
|
664 | | | |
665 | | * 12:acd174b7ab39 I |
|
665 | | * 12:acd174b7ab39 I | |
666 | | | |
|
666 | | | | |
667 | | o 11:6c11a6218c97 H |
|
667 | | o 11:6c11a6218c97 H | |
668 | | | |
|
668 | | | | |
669 | o | 10:b5313c85b22e D |
|
669 | o | 10:b5313c85b22e D | |
670 | |/ |
|
670 | |/ | |
671 | | * 8:53a6a128b2b7 M |
|
671 | | * 8:53a6a128b2b7 M | |
672 | | |\ |
|
672 | | |\ | |
673 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
673 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
674 | | | | |
|
674 | | | | | |
675 | o---+ 6:eea13746799a G |
|
675 | o---+ 6:eea13746799a G | |
676 | | | | |
|
676 | | | | | |
677 | | | o 5:24b6387c8c8c F |
|
677 | | | o 5:24b6387c8c8c F | |
678 | | | | |
|
678 | | | | | |
679 | o---+ 4:9520eea781bc E |
|
679 | o---+ 4:9520eea781bc E | |
680 | / / |
|
680 | / / | |
681 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
681 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
682 | | | |
|
682 | | | | |
683 | o | 2:5fddd98957c8 C |
|
683 | o | 2:5fddd98957c8 C | |
684 | | | |
|
684 | | | | |
685 | o | 1:42ccdea3bb16 B |
|
685 | o | 1:42ccdea3bb16 B | |
686 | |/ |
|
686 | |/ | |
687 | o 0:cd010b8cd998 A |
|
687 | o 0:cd010b8cd998 A | |
688 |
|
688 | |||
689 | $ hg up 14 -C |
|
689 | $ hg up 14 -C | |
690 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
690 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
691 | $ echo "K" > K |
|
691 | $ echo "K" > K | |
692 | $ hg add K |
|
692 | $ hg add K | |
693 | $ hg commit --amend -m "K" |
|
693 | $ hg commit --amend -m "K" | |
694 | 1 new orphan changesets |
|
694 | 1 new orphan changesets | |
695 | $ echo "L" > L |
|
695 | $ echo "L" > L | |
696 | $ hg add L |
|
696 | $ hg add L | |
697 | $ hg commit -m "L" |
|
697 | $ hg commit -m "L" | |
698 | $ hg up '.^' |
|
698 | $ hg up '.^' | |
699 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
699 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
700 | $ echo "M" > M |
|
700 | $ echo "M" > M | |
701 | $ hg add M |
|
701 | $ hg add M | |
702 | $ hg commit --amend -m "M" |
|
702 | $ hg commit --amend -m "M" | |
703 | 1 new orphan changesets |
|
703 | 1 new orphan changesets | |
704 | $ hg log -G |
|
704 | $ hg log -G | |
705 | @ 18:bfaedf8eb73b M |
|
705 | @ 18:bfaedf8eb73b M | |
706 | | |
|
706 | | | |
707 | | * 17:97219452e4bd L |
|
707 | | * 17:97219452e4bd L | |
708 | | | |
|
708 | | | | |
709 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) |
|
709 | | x 16:fc37a630c901 K (rewritten using amend as 18:bfaedf8eb73b) | |
710 | |/ |
|
710 | |/ | |
711 | | * 15:5ae8a643467b J |
|
711 | | * 15:5ae8a643467b J | |
712 | | | |
|
712 | | | | |
713 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) |
|
713 | | x 14:9ad579b4a5de I (rewritten using amend as 16:fc37a630c901) | |
714 | |/ |
|
714 | |/ | |
715 | | * 12:acd174b7ab39 I |
|
715 | | * 12:acd174b7ab39 I | |
716 | | | |
|
716 | | | | |
717 | | o 11:6c11a6218c97 H |
|
717 | | o 11:6c11a6218c97 H | |
718 | | | |
|
718 | | | | |
719 | o | 10:b5313c85b22e D |
|
719 | o | 10:b5313c85b22e D | |
720 | |/ |
|
720 | |/ | |
721 | | * 8:53a6a128b2b7 M |
|
721 | | * 8:53a6a128b2b7 M | |
722 | | |\ |
|
722 | | |\ | |
723 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) |
|
723 | | | x 7:02de42196ebe H (rewritten using rebase as 11:6c11a6218c97) | |
724 | | | | |
|
724 | | | | | |
725 | o---+ 6:eea13746799a G |
|
725 | o---+ 6:eea13746799a G | |
726 | | | | |
|
726 | | | | | |
727 | | | o 5:24b6387c8c8c F |
|
727 | | | o 5:24b6387c8c8c F | |
728 | | | | |
|
728 | | | | | |
729 | o---+ 4:9520eea781bc E |
|
729 | o---+ 4:9520eea781bc E | |
730 | / / |
|
730 | / / | |
731 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) |
|
731 | x | 3:32af7686d403 D (rewritten using rebase as 10:b5313c85b22e) | |
732 | | | |
|
732 | | | | |
733 | o | 2:5fddd98957c8 C |
|
733 | o | 2:5fddd98957c8 C | |
734 | | | |
|
734 | | | | |
735 | o | 1:42ccdea3bb16 B |
|
735 | o | 1:42ccdea3bb16 B | |
736 | |/ |
|
736 | |/ | |
737 | o 0:cd010b8cd998 A |
|
737 | o 0:cd010b8cd998 A | |
738 |
|
738 | |||
739 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True |
|
739 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True | |
740 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" |
|
740 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" | |
741 | rebasing 15:5ae8a643467b "J" |
|
741 | rebasing 15:5ae8a643467b "J" | |
742 | 1 new orphan changesets |
|
742 | 1 new orphan changesets | |
743 |
|
743 | |||
744 | $ cd .. |
|
744 | $ cd .. | |
745 |
|
745 | |||
746 | Skip obsolete changeset even with multiple hops |
|
746 | Skip obsolete changeset even with multiple hops | |
747 | ----------------------------------------------- |
|
747 | ----------------------------------------------- | |
748 |
|
748 | |||
749 | setup |
|
749 | setup | |
750 |
|
750 | |||
751 | $ hg init obsskip |
|
751 | $ hg init obsskip | |
752 | $ cd obsskip |
|
752 | $ cd obsskip | |
753 | $ cat << EOF >> .hg/hgrc |
|
753 | $ cat << EOF >> .hg/hgrc | |
754 | > [experimental] |
|
754 | > [experimental] | |
755 | > rebaseskipobsolete = True |
|
755 | > rebaseskipobsolete = True | |
756 | > [extensions] |
|
756 | > [extensions] | |
757 | > strip = |
|
757 | > strip = | |
758 | > EOF |
|
758 | > EOF | |
759 | $ echo A > A |
|
759 | $ echo A > A | |
760 | $ hg add A |
|
760 | $ hg add A | |
761 | $ hg commit -m A |
|
761 | $ hg commit -m A | |
762 | $ echo B > B |
|
762 | $ echo B > B | |
763 | $ hg add B |
|
763 | $ hg add B | |
764 | $ hg commit -m B0 |
|
764 | $ hg commit -m B0 | |
765 | $ hg commit --amend -m B1 |
|
765 | $ hg commit --amend -m B1 | |
766 | $ hg commit --amend -m B2 |
|
766 | $ hg commit --amend -m B2 | |
767 | $ hg up --hidden 'desc(B0)' |
|
767 | $ hg up --hidden 'desc(B0)' | |
768 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
768 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
769 | updated to hidden changeset a8b11f55fb19 |
|
769 | updated to hidden changeset a8b11f55fb19 | |
770 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
770 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
771 | $ echo C > C |
|
771 | $ echo C > C | |
772 | $ hg add C |
|
772 | $ hg add C | |
773 | $ hg commit -m C |
|
773 | $ hg commit -m C | |
774 | 1 new orphan changesets |
|
774 | 1 new orphan changesets | |
775 | $ hg log -G |
|
775 | $ hg log -G | |
776 | @ 4:212cb178bcbb C |
|
776 | @ 4:212cb178bcbb C | |
777 | | |
|
777 | | | |
778 | | o 3:261e70097290 B2 |
|
778 | | o 3:261e70097290 B2 | |
779 | | | |
|
779 | | | | |
780 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) |
|
780 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 3:261e70097290) | |
781 | |/ |
|
781 | |/ | |
782 | o 0:4a2df7238c3b A |
|
782 | o 0:4a2df7238c3b A | |
783 |
|
783 | |||
784 |
|
784 | |||
785 | Rebase finds its way in a chain of marker |
|
785 | Rebase finds its way in a chain of marker | |
786 |
|
786 | |||
787 | $ hg rebase -d 'desc(B2)' |
|
787 | $ hg rebase -d 'desc(B2)' | |
788 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" |
|
788 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" | |
789 | rebasing 4:212cb178bcbb "C" (tip) |
|
789 | rebasing 4:212cb178bcbb "C" (tip) | |
790 |
|
790 | |||
791 | Even when the chain include missing node |
|
791 | Even when the chain include missing node | |
792 |
|
792 | |||
793 | $ hg up --hidden 'desc(B0)' |
|
793 | $ hg up --hidden 'desc(B0)' | |
794 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
794 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
795 | updated to hidden changeset a8b11f55fb19 |
|
795 | updated to hidden changeset a8b11f55fb19 | |
796 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) |
|
796 | (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) | |
797 | $ echo D > D |
|
797 | $ echo D > D | |
798 | $ hg add D |
|
798 | $ hg add D | |
799 | $ hg commit -m D |
|
799 | $ hg commit -m D | |
800 | 1 new orphan changesets |
|
800 | 1 new orphan changesets | |
801 | $ hg --hidden strip -r 'desc(B1)' |
|
801 | $ hg --hidden strip -r 'desc(B1)' | |
802 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg |
|
802 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg | |
803 | 1 new orphan changesets |
|
803 | 1 new orphan changesets | |
804 | $ hg log -G |
|
804 | $ hg log -G | |
805 | @ 5:1a79b7535141 D |
|
805 | @ 5:1a79b7535141 D | |
806 | | |
|
806 | | | |
807 | | o 4:ff2c4d47b71d C |
|
807 | | o 4:ff2c4d47b71d C | |
808 | | | |
|
808 | | | | |
809 | | o 2:261e70097290 B2 |
|
809 | | o 2:261e70097290 B2 | |
810 | | | |
|
810 | | | | |
811 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) |
|
811 | x | 1:a8b11f55fb19 B0 (rewritten using amend as 2:261e70097290) | |
812 | |/ |
|
812 | |/ | |
813 | o 0:4a2df7238c3b A |
|
813 | o 0:4a2df7238c3b A | |
814 |
|
814 | |||
815 |
|
815 | |||
816 | $ hg rebase -d 'desc(B2)' |
|
816 | $ hg rebase -d 'desc(B2)' | |
817 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" |
|
817 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" | |
818 | rebasing 5:1a79b7535141 "D" (tip) |
|
818 | rebasing 5:1a79b7535141 "D" (tip) | |
819 | $ hg up 4 |
|
819 | $ hg up 4 | |
820 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
820 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
821 | $ echo "O" > O |
|
821 | $ echo "O" > O | |
822 | $ hg add O |
|
822 | $ hg add O | |
823 | $ hg commit -m O |
|
823 | $ hg commit -m O | |
824 | $ echo "P" > P |
|
824 | $ echo "P" > P | |
825 | $ hg add P |
|
825 | $ hg add P | |
826 | $ hg commit -m P |
|
826 | $ hg commit -m P | |
827 | $ hg log -G |
|
827 | $ hg log -G | |
828 | @ 8:8d47583e023f P |
|
828 | @ 8:8d47583e023f P | |
829 | | |
|
829 | | | |
830 | o 7:360bbaa7d3ce O |
|
830 | o 7:360bbaa7d3ce O | |
831 | | |
|
831 | | | |
832 | | o 6:9c48361117de D |
|
832 | | o 6:9c48361117de D | |
833 | | | |
|
833 | | | | |
834 | o | 4:ff2c4d47b71d C |
|
834 | o | 4:ff2c4d47b71d C | |
835 | |/ |
|
835 | |/ | |
836 | o 2:261e70097290 B2 |
|
836 | o 2:261e70097290 B2 | |
837 | | |
|
837 | | | |
838 | o 0:4a2df7238c3b A |
|
838 | o 0:4a2df7238c3b A | |
839 |
|
839 | |||
840 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true |
|
840 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true | |
841 | obsoleted 1 changesets |
|
841 | obsoleted 1 changesets | |
842 | 1 new orphan changesets |
|
842 | 1 new orphan changesets | |
843 | $ hg rebase -d 6 -r "4::" |
|
843 | $ hg rebase -d 6 -r "4::" | |
844 | rebasing 4:ff2c4d47b71d "C" |
|
844 | rebasing 4:ff2c4d47b71d "C" | |
845 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
|
845 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor | |
846 | rebasing 8:8d47583e023f "P" (tip) |
|
846 | rebasing 8:8d47583e023f "P" (tip) | |
847 |
|
847 | |||
848 | If all the changeset to be rebased are obsolete and present in the destination, we |
|
848 | If all the changeset to be rebased are obsolete and present in the destination, we | |
849 | should display a friendly error message |
|
849 | should display a friendly error message | |
850 |
|
850 | |||
851 | $ hg log -G |
|
851 | $ hg log -G | |
852 | @ 10:121d9e3bc4c6 P |
|
852 | @ 10:121d9e3bc4c6 P | |
853 | | |
|
853 | | | |
854 | o 9:4be60e099a77 C |
|
854 | o 9:4be60e099a77 C | |
855 | | |
|
855 | | | |
856 | o 6:9c48361117de D |
|
856 | o 6:9c48361117de D | |
857 | | |
|
857 | | | |
858 | o 2:261e70097290 B2 |
|
858 | o 2:261e70097290 B2 | |
859 | | |
|
859 | | | |
860 | o 0:4a2df7238c3b A |
|
860 | o 0:4a2df7238c3b A | |
861 |
|
861 | |||
862 |
|
862 | |||
863 | $ hg up 9 |
|
863 | $ hg up 9 | |
864 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
864 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
865 | $ echo "non-relevant change" > nonrelevant |
|
865 | $ echo "non-relevant change" > nonrelevant | |
866 | $ hg add nonrelevant |
|
866 | $ hg add nonrelevant | |
867 | $ hg commit -m nonrelevant |
|
867 | $ hg commit -m nonrelevant | |
868 | created new head |
|
868 | created new head | |
869 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true |
|
869 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=true | |
870 | obsoleted 1 changesets |
|
870 | obsoleted 1 changesets | |
871 | $ hg log -G |
|
871 | $ hg log -G | |
872 | @ 11:f44da1f4954c nonrelevant (pruned) |
|
872 | @ 11:f44da1f4954c nonrelevant (pruned) | |
873 | | |
|
873 | | | |
874 | | o 10:121d9e3bc4c6 P |
|
874 | | o 10:121d9e3bc4c6 P | |
875 | |/ |
|
875 | |/ | |
876 | o 9:4be60e099a77 C |
|
876 | o 9:4be60e099a77 C | |
877 | | |
|
877 | | | |
878 | o 6:9c48361117de D |
|
878 | o 6:9c48361117de D | |
879 | | |
|
879 | | | |
880 | o 2:261e70097290 B2 |
|
880 | o 2:261e70097290 B2 | |
881 | | |
|
881 | | | |
882 | o 0:4a2df7238c3b A |
|
882 | o 0:4a2df7238c3b A | |
883 |
|
883 | |||
884 | $ hg rebase -r . -d 10 |
|
884 | $ hg rebase -r . -d 10 | |
885 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor |
|
885 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor | |
886 |
|
886 | |||
887 | If a rebase is going to create divergence, it should abort |
|
887 | If a rebase is going to create divergence, it should abort | |
888 |
|
888 | |||
889 | $ hg log -G |
|
889 | $ hg log -G | |
890 | @ 10:121d9e3bc4c6 P |
|
890 | @ 10:121d9e3bc4c6 P | |
891 | | |
|
891 | | | |
892 | o 9:4be60e099a77 C |
|
892 | o 9:4be60e099a77 C | |
893 | | |
|
893 | | | |
894 | o 6:9c48361117de D |
|
894 | o 6:9c48361117de D | |
895 | | |
|
895 | | | |
896 | o 2:261e70097290 B2 |
|
896 | o 2:261e70097290 B2 | |
897 | | |
|
897 | | | |
898 | o 0:4a2df7238c3b A |
|
898 | o 0:4a2df7238c3b A | |
899 |
|
899 | |||
900 |
|
900 | |||
901 | $ hg up 9 |
|
901 | $ hg up 9 | |
902 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
902 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
903 | $ echo "john" > doe |
|
903 | $ echo "john" > doe | |
904 | $ hg add doe |
|
904 | $ hg add doe | |
905 | $ hg commit -m "john doe" |
|
905 | $ hg commit -m "john doe" | |
906 | created new head |
|
906 | created new head | |
907 | $ hg up 10 |
|
907 | $ hg up 10 | |
908 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
908 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
909 | $ echo "foo" > bar |
|
909 | $ echo "foo" > bar | |
910 | $ hg add bar |
|
910 | $ hg add bar | |
911 | $ hg commit --amend -m "10'" |
|
911 | $ hg commit --amend -m "10'" | |
912 | $ hg up 10 --hidden |
|
912 | $ hg up 10 --hidden | |
913 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
913 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
914 | updated to hidden changeset 121d9e3bc4c6 |
|
914 | updated to hidden changeset 121d9e3bc4c6 | |
915 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) |
|
915 | (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) | |
916 | $ echo "bar" > foo |
|
916 | $ echo "bar" > foo | |
917 | $ hg add foo |
|
917 | $ hg add foo | |
918 | $ hg commit -m "bar foo" |
|
918 | $ hg commit -m "bar foo" | |
919 | 1 new orphan changesets |
|
919 | 1 new orphan changesets | |
920 | $ hg log -G |
|
920 | $ hg log -G | |
921 | @ 14:73568ab6879d bar foo |
|
921 | @ 14:73568ab6879d bar foo | |
922 | | |
|
922 | | | |
923 | | o 13:77d874d096a2 10' |
|
923 | | o 13:77d874d096a2 10' | |
924 | | | |
|
924 | | | | |
925 | | | o 12:3eb461388009 john doe |
|
925 | | | o 12:3eb461388009 john doe | |
926 | | |/ |
|
926 | | |/ | |
927 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
927 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
928 | |/ |
|
928 | |/ | |
929 | o 9:4be60e099a77 C |
|
929 | o 9:4be60e099a77 C | |
930 | | |
|
930 | | | |
931 | o 6:9c48361117de D |
|
931 | o 6:9c48361117de D | |
932 | | |
|
932 | | | |
933 | o 2:261e70097290 B2 |
|
933 | o 2:261e70097290 B2 | |
934 | | |
|
934 | | | |
935 | o 0:4a2df7238c3b A |
|
935 | o 0:4a2df7238c3b A | |
936 |
|
936 | |||
937 | $ hg summary |
|
937 | $ hg summary | |
938 | parent: 14:73568ab6879d tip (orphan) |
|
938 | parent: 14:73568ab6879d tip (orphan) | |
939 | bar foo |
|
939 | bar foo | |
940 | branch: default |
|
940 | branch: default | |
941 | commit: (clean) |
|
941 | commit: (clean) | |
942 | update: 2 new changesets, 3 branch heads (merge) |
|
942 | update: 2 new changesets, 3 branch heads (merge) | |
943 | phases: 8 draft |
|
943 | phases: 8 draft | |
944 | orphan: 1 changesets |
|
944 | orphan: 1 changesets | |
945 | $ hg rebase -s 10 -d 12 |
|
945 | $ hg rebase -s 10 -d 12 | |
946 | abort: this rebase will cause divergences from: 121d9e3bc4c6 |
|
946 | abort: this rebase will cause divergences from: 121d9e3bc4c6 | |
947 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
947 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
948 | [255] |
|
948 | [255] | |
949 | $ hg log -G |
|
949 | $ hg log -G | |
950 | @ 14:73568ab6879d bar foo |
|
950 | @ 14:73568ab6879d bar foo | |
951 | | |
|
951 | | | |
952 | | o 13:77d874d096a2 10' |
|
952 | | o 13:77d874d096a2 10' | |
953 | | | |
|
953 | | | | |
954 | | | o 12:3eb461388009 john doe |
|
954 | | | o 12:3eb461388009 john doe | |
955 | | |/ |
|
955 | | |/ | |
956 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) |
|
956 | x | 10:121d9e3bc4c6 P (rewritten using amend as 13:77d874d096a2) | |
957 | |/ |
|
957 | |/ | |
958 | o 9:4be60e099a77 C |
|
958 | o 9:4be60e099a77 C | |
959 | | |
|
959 | | | |
960 | o 6:9c48361117de D |
|
960 | o 6:9c48361117de D | |
961 | | |
|
961 | | | |
962 | o 2:261e70097290 B2 |
|
962 | o 2:261e70097290 B2 | |
963 | | |
|
963 | | | |
964 | o 0:4a2df7238c3b A |
|
964 | o 0:4a2df7238c3b A | |
965 |
|
965 | |||
966 | With experimental.evolution.allowdivergence=True, rebase can create divergence |
|
966 | With experimental.evolution.allowdivergence=True, rebase can create divergence | |
967 |
|
967 | |||
968 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True |
|
968 | $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True | |
969 | rebasing 10:121d9e3bc4c6 "P" |
|
969 | rebasing 10:121d9e3bc4c6 "P" | |
970 | rebasing 14:73568ab6879d "bar foo" (tip) |
|
970 | rebasing 14:73568ab6879d "bar foo" (tip) | |
971 | 2 new content-divergent changesets |
|
971 | 2 new content-divergent changesets | |
972 | $ hg summary |
|
972 | $ hg summary | |
973 | parent: 16:61bd55f69bc4 tip |
|
973 | parent: 16:61bd55f69bc4 tip | |
974 | bar foo |
|
974 | bar foo | |
975 | branch: default |
|
975 | branch: default | |
976 | commit: (clean) |
|
976 | commit: (clean) | |
977 | update: 1 new changesets, 2 branch heads (merge) |
|
977 | update: 1 new changesets, 2 branch heads (merge) | |
978 | phases: 8 draft |
|
978 | phases: 8 draft | |
979 | content-divergent: 2 changesets |
|
979 | content-divergent: 2 changesets | |
980 |
|
980 | |||
981 | rebase --continue + skipped rev because their successors are in destination |
|
981 | rebase --continue + skipped rev because their successors are in destination | |
982 | we make a change in trunk and work on conflicting changes to make rebase abort. |
|
982 | we make a change in trunk and work on conflicting changes to make rebase abort. | |
983 |
|
983 | |||
984 | $ hg log -G -r 16:: |
|
984 | $ hg log -G -r 16:: | |
985 | @ 16:61bd55f69bc4 bar foo |
|
985 | @ 16:61bd55f69bc4 bar foo | |
986 | | |
|
986 | | | |
987 | ~ |
|
987 | ~ | |
988 |
|
988 | |||
989 | Create the two changes in trunk |
|
989 | Create the two changes in trunk | |
990 | $ printf "a" > willconflict |
|
990 | $ printf "a" > willconflict | |
991 | $ hg add willconflict |
|
991 | $ hg add willconflict | |
992 | $ hg commit -m "willconflict first version" |
|
992 | $ hg commit -m "willconflict first version" | |
993 |
|
993 | |||
994 | $ printf "dummy" > C |
|
994 | $ printf "dummy" > C | |
995 | $ hg commit -m "dummy change successor" |
|
995 | $ hg commit -m "dummy change successor" | |
996 |
|
996 | |||
997 | Create the changes that we will rebase |
|
997 | Create the changes that we will rebase | |
998 | $ hg update -C 16 -q |
|
998 | $ hg update -C 16 -q | |
999 | $ printf "b" > willconflict |
|
999 | $ printf "b" > willconflict | |
1000 | $ hg add willconflict |
|
1000 | $ hg add willconflict | |
1001 | $ hg commit -m "willconflict second version" |
|
1001 | $ hg commit -m "willconflict second version" | |
1002 | created new head |
|
1002 | created new head | |
1003 | $ printf "dummy" > K |
|
1003 | $ printf "dummy" > K | |
1004 | $ hg add K |
|
1004 | $ hg add K | |
1005 | $ hg commit -m "dummy change" |
|
1005 | $ hg commit -m "dummy change" | |
1006 | $ printf "dummy" > L |
|
1006 | $ printf "dummy" > L | |
1007 | $ hg add L |
|
1007 | $ hg add L | |
1008 | $ hg commit -m "dummy change" |
|
1008 | $ hg commit -m "dummy change" | |
1009 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true |
|
1009 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true | |
1010 | obsoleted 1 changesets |
|
1010 | obsoleted 1 changesets | |
1011 | 1 new orphan changesets |
|
1011 | 1 new orphan changesets | |
1012 |
|
1012 | |||
1013 | $ hg log -G -r 16:: |
|
1013 | $ hg log -G -r 16:: | |
1014 | @ 21:7bdc8a87673d dummy change |
|
1014 | @ 21:7bdc8a87673d dummy change | |
1015 | | |
|
1015 | | | |
1016 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) |
|
1016 | x 20:8b31da3c4919 dummy change (rewritten as 18:601db7a18f51) | |
1017 | | |
|
1017 | | | |
1018 | o 19:b82fb57ea638 willconflict second version |
|
1018 | o 19:b82fb57ea638 willconflict second version | |
1019 | | |
|
1019 | | | |
1020 | | o 18:601db7a18f51 dummy change successor |
|
1020 | | o 18:601db7a18f51 dummy change successor | |
1021 | | | |
|
1021 | | | | |
1022 | | o 17:357ddf1602d5 willconflict first version |
|
1022 | | o 17:357ddf1602d5 willconflict first version | |
1023 | |/ |
|
1023 | |/ | |
1024 | o 16:61bd55f69bc4 bar foo |
|
1024 | o 16:61bd55f69bc4 bar foo | |
1025 | | |
|
1025 | | | |
1026 | ~ |
|
1026 | ~ | |
1027 | $ hg rebase -r ".^^ + .^ + ." -d 18 |
|
1027 | $ hg rebase -r ".^^ + .^ + ." -d 18 | |
1028 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
1028 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1029 | merging willconflict |
|
1029 | merging willconflict | |
1030 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') |
|
1030 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') | |
1031 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1031 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1032 | [1] |
|
1032 | [1] | |
1033 |
|
1033 | |||
1034 | $ hg resolve --mark willconflict |
|
1034 | $ hg resolve --mark willconflict | |
1035 | (no more unresolved files) |
|
1035 | (no more unresolved files) | |
1036 | continue: hg rebase --continue |
|
1036 | continue: hg rebase --continue | |
1037 | $ hg rebase --continue |
|
1037 | $ hg rebase --continue | |
1038 | rebasing 19:b82fb57ea638 "willconflict second version" |
|
1038 | rebasing 19:b82fb57ea638 "willconflict second version" | |
1039 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" |
|
1039 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" | |
1040 | rebasing 21:7bdc8a87673d "dummy change" (tip) |
|
1040 | rebasing 21:7bdc8a87673d "dummy change" (tip) | |
1041 | $ cd .. |
|
1041 | $ cd .. | |
1042 |
|
1042 | |||
1043 | Divergence cases due to obsolete changesets |
|
1043 | Divergence cases due to obsolete changesets | |
1044 | ------------------------------------------- |
|
1044 | ------------------------------------------- | |
1045 |
|
1045 | |||
1046 | We should ignore branches with unstable changesets when they are based on an |
|
1046 | We should ignore branches with unstable changesets when they are based on an | |
1047 | obsolete changeset which successor is in rebase set. |
|
1047 | obsolete changeset which successor is in rebase set. | |
1048 |
|
1048 | |||
1049 | $ hg init divergence |
|
1049 | $ hg init divergence | |
1050 | $ cd divergence |
|
1050 | $ cd divergence | |
1051 | $ cat >> .hg/hgrc << EOF |
|
1051 | $ cat >> .hg/hgrc << EOF | |
1052 | > [extensions] |
|
1052 | > [extensions] | |
1053 | > strip = |
|
1053 | > strip = | |
1054 | > [alias] |
|
1054 | > [alias] | |
1055 | > strip = strip --no-backup --quiet |
|
1055 | > strip = strip --no-backup --quiet | |
1056 | > [templates] |
|
1056 | > [templates] | |
1057 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' |
|
1057 | > instabilities = '{rev}:{node|short} {desc|firstline}{if(instabilities," ({instabilities})")}\n' | |
1058 | > EOF |
|
1058 | > EOF | |
1059 |
|
1059 | |||
1060 | $ hg debugdrawdag <<EOF |
|
1060 | $ hg debugdrawdag <<EOF | |
1061 | > e f |
|
1061 | > e f | |
1062 | > | | |
|
1062 | > | | | |
1063 | > d' d # replace: d -> d' |
|
1063 | > d' d # replace: d -> d' | |
1064 | > \ / |
|
1064 | > \ / | |
1065 | > c |
|
1065 | > c | |
1066 | > | |
|
1066 | > | | |
1067 | > x b |
|
1067 | > x b | |
1068 | > \| |
|
1068 | > \| | |
1069 | > a |
|
1069 | > a | |
1070 | > EOF |
|
1070 | > EOF | |
1071 | 1 new orphan changesets |
|
1071 | 1 new orphan changesets | |
1072 | $ hg log -G -r 'a':: |
|
1072 | $ hg log -G -r 'a':: | |
1073 | * 7:1143e9adc121 f |
|
1073 | * 7:1143e9adc121 f | |
1074 | | |
|
1074 | | | |
1075 | | o 6:d60ebfa0f1cb e |
|
1075 | | o 6:d60ebfa0f1cb e | |
1076 | | | |
|
1076 | | | | |
1077 | | o 5:027ad6c5830d d' |
|
1077 | | o 5:027ad6c5830d d' | |
1078 | | | |
|
1078 | | | | |
1079 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1079 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1080 | |/ |
|
1080 | |/ | |
1081 | o 3:a82ac2b38757 c |
|
1081 | o 3:a82ac2b38757 c | |
1082 | | |
|
1082 | | | |
1083 | | o 2:630d7c95eff7 x |
|
1083 | | o 2:630d7c95eff7 x | |
1084 | | | |
|
1084 | | | | |
1085 | o | 1:488e1b7e7341 b |
|
1085 | o | 1:488e1b7e7341 b | |
1086 | |/ |
|
1086 | |/ | |
1087 | o 0:b173517d0057 a |
|
1087 | o 0:b173517d0057 a | |
1088 |
|
1088 | |||
1089 |
|
1089 | |||
1090 | Changeset d and its descendants are excluded to avoid divergence of d, which |
|
1090 | Changeset d and its descendants are excluded to avoid divergence of d, which | |
1091 | would occur because the successor of d (d') is also in rebaseset. As a |
|
1091 | would occur because the successor of d (d') is also in rebaseset. As a | |
1092 | consequence f (descendant of d) is left behind. |
|
1092 | consequence f (descendant of d) is left behind. | |
1093 |
|
1093 | |||
1094 | $ hg rebase -b 'e' -d 'x' |
|
1094 | $ hg rebase -b 'e' -d 'x' | |
1095 | rebasing 1:488e1b7e7341 "b" (b) |
|
1095 | rebasing 1:488e1b7e7341 "b" (b) | |
1096 | rebasing 3:a82ac2b38757 "c" (c) |
|
1096 | rebasing 3:a82ac2b38757 "c" (c) | |
1097 | rebasing 5:027ad6c5830d "d'" (d') |
|
1097 | rebasing 5:027ad6c5830d "d'" (d') | |
1098 | rebasing 6:d60ebfa0f1cb "e" (e) |
|
1098 | rebasing 6:d60ebfa0f1cb "e" (e) | |
1099 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence |
|
1099 | note: not rebasing 4:76be324c128b "d" (d) and its descendants as this would cause divergence | |
1100 | $ hg log -G -r 'a':: |
|
1100 | $ hg log -G -r 'a':: | |
1101 | o 11:eb6d63fc4ed5 e |
|
1101 | o 11:eb6d63fc4ed5 e | |
1102 | | |
|
1102 | | | |
1103 | o 10:44d8c724a70c d' |
|
1103 | o 10:44d8c724a70c d' | |
1104 | | |
|
1104 | | | |
1105 | o 9:d008e6b4d3fd c |
|
1105 | o 9:d008e6b4d3fd c | |
1106 | | |
|
1106 | | | |
1107 | o 8:67e8f4a16c49 b |
|
1107 | o 8:67e8f4a16c49 b | |
1108 | | |
|
1108 | | | |
1109 | | * 7:1143e9adc121 f |
|
1109 | | * 7:1143e9adc121 f | |
1110 | | | |
|
1110 | | | | |
1111 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) |
|
1111 | | | x 6:d60ebfa0f1cb e (rewritten using rebase as 11:eb6d63fc4ed5) | |
1112 | | | | |
|
1112 | | | | | |
1113 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) |
|
1113 | | | x 5:027ad6c5830d d' (rewritten using rebase as 10:44d8c724a70c) | |
1114 | | | | |
|
1114 | | | | | |
1115 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1115 | | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1116 | | |/ |
|
1116 | | |/ | |
1117 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) |
|
1117 | | x 3:a82ac2b38757 c (rewritten using rebase as 9:d008e6b4d3fd) | |
1118 | | | |
|
1118 | | | | |
1119 | o | 2:630d7c95eff7 x |
|
1119 | o | 2:630d7c95eff7 x | |
1120 | | | |
|
1120 | | | | |
1121 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) |
|
1121 | | x 1:488e1b7e7341 b (rewritten using rebase as 8:67e8f4a16c49) | |
1122 | |/ |
|
1122 | |/ | |
1123 | o 0:b173517d0057 a |
|
1123 | o 0:b173517d0057 a | |
1124 |
|
1124 | |||
1125 | $ hg strip -r 8: |
|
1125 | $ hg strip -r 8: | |
1126 | $ hg log -G -r 'a':: |
|
1126 | $ hg log -G -r 'a':: | |
1127 | * 7:1143e9adc121 f |
|
1127 | * 7:1143e9adc121 f | |
1128 | | |
|
1128 | | | |
1129 | | o 6:d60ebfa0f1cb e |
|
1129 | | o 6:d60ebfa0f1cb e | |
1130 | | | |
|
1130 | | | | |
1131 | | o 5:027ad6c5830d d' |
|
1131 | | o 5:027ad6c5830d d' | |
1132 | | | |
|
1132 | | | | |
1133 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) |
|
1133 | x | 4:76be324c128b d (rewritten using replace as 5:027ad6c5830d) | |
1134 | |/ |
|
1134 | |/ | |
1135 | o 3:a82ac2b38757 c |
|
1135 | o 3:a82ac2b38757 c | |
1136 | | |
|
1136 | | | |
1137 | | o 2:630d7c95eff7 x |
|
1137 | | o 2:630d7c95eff7 x | |
1138 | | | |
|
1138 | | | | |
1139 | o | 1:488e1b7e7341 b |
|
1139 | o | 1:488e1b7e7341 b | |
1140 | |/ |
|
1140 | |/ | |
1141 | o 0:b173517d0057 a |
|
1141 | o 0:b173517d0057 a | |
1142 |
|
1142 | |||
1143 |
|
1143 | |||
1144 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase |
|
1144 | If the rebase set has an obsolete (d) with a successor (d') outside the rebase | |
1145 | set and none in destination, we still get the divergence warning. |
|
1145 | set and none in destination, we still get the divergence warning. | |
1146 | By allowing divergence, we can perform the rebase. |
|
1146 | By allowing divergence, we can perform the rebase. | |
1147 |
|
1147 | |||
1148 | $ hg rebase -r 'c'::'f' -d 'x' |
|
1148 | $ hg rebase -r 'c'::'f' -d 'x' | |
1149 | abort: this rebase will cause divergences from: 76be324c128b |
|
1149 | abort: this rebase will cause divergences from: 76be324c128b | |
1150 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
1150 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1151 | [255] |
|
1151 | [255] | |
1152 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' |
|
1152 | $ hg rebase --config experimental.evolution.allowdivergence=true -r 'c'::'f' -d 'x' | |
1153 | rebasing 3:a82ac2b38757 "c" (c) |
|
1153 | rebasing 3:a82ac2b38757 "c" (c) | |
1154 | rebasing 4:76be324c128b "d" (d) |
|
1154 | rebasing 4:76be324c128b "d" (d) | |
1155 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1155 | rebasing 7:1143e9adc121 "f" (f tip) | |
1156 | 1 new orphan changesets |
|
1156 | 1 new orphan changesets | |
1157 | 2 new content-divergent changesets |
|
1157 | 2 new content-divergent changesets | |
1158 | $ hg log -G -r 'a':: -T instabilities |
|
1158 | $ hg log -G -r 'a':: -T instabilities | |
1159 | o 10:e1744ea07510 f |
|
1159 | o 10:e1744ea07510 f | |
1160 | | |
|
1160 | | | |
1161 | * 9:e2b36ea9a0a0 d (content-divergent) |
|
1161 | * 9:e2b36ea9a0a0 d (content-divergent) | |
1162 | | |
|
1162 | | | |
1163 | o 8:6a0376de376e c |
|
1163 | o 8:6a0376de376e c | |
1164 | | |
|
1164 | | | |
1165 | | x 7:1143e9adc121 f |
|
1165 | | x 7:1143e9adc121 f | |
1166 | | | |
|
1166 | | | | |
1167 | | | * 6:d60ebfa0f1cb e (orphan) |
|
1167 | | | * 6:d60ebfa0f1cb e (orphan) | |
1168 | | | | |
|
1168 | | | | | |
1169 | | | * 5:027ad6c5830d d' (orphan content-divergent) |
|
1169 | | | * 5:027ad6c5830d d' (orphan content-divergent) | |
1170 | | | | |
|
1170 | | | | | |
1171 | | x | 4:76be324c128b d |
|
1171 | | x | 4:76be324c128b d | |
1172 | | |/ |
|
1172 | | |/ | |
1173 | | x 3:a82ac2b38757 c |
|
1173 | | x 3:a82ac2b38757 c | |
1174 | | | |
|
1174 | | | | |
1175 | o | 2:630d7c95eff7 x |
|
1175 | o | 2:630d7c95eff7 x | |
1176 | | | |
|
1176 | | | | |
1177 | | o 1:488e1b7e7341 b |
|
1177 | | o 1:488e1b7e7341 b | |
1178 | |/ |
|
1178 | |/ | |
1179 | o 0:b173517d0057 a |
|
1179 | o 0:b173517d0057 a | |
1180 |
|
1180 | |||
1181 | $ hg strip -r 8: |
|
1181 | $ hg strip -r 8: | |
1182 |
|
1182 | |||
1183 | (Not skipping obsoletes means that divergence is allowed.) |
|
1183 | (Not skipping obsoletes means that divergence is allowed.) | |
1184 |
|
1184 | |||
1185 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' |
|
1185 | $ hg rebase --config experimental.rebaseskipobsolete=false -r 'c'::'f' -d 'x' | |
1186 | rebasing 3:a82ac2b38757 "c" (c) |
|
1186 | rebasing 3:a82ac2b38757 "c" (c) | |
1187 | rebasing 4:76be324c128b "d" (d) |
|
1187 | rebasing 4:76be324c128b "d" (d) | |
1188 | rebasing 7:1143e9adc121 "f" (f tip) |
|
1188 | rebasing 7:1143e9adc121 "f" (f tip) | |
1189 | 1 new orphan changesets |
|
1189 | 1 new orphan changesets | |
1190 | 2 new content-divergent changesets |
|
1190 | 2 new content-divergent changesets | |
1191 |
|
1191 | |||
1192 | $ hg strip -r 0: |
|
1192 | $ hg strip -r 0: | |
1193 |
|
1193 | |||
1194 | Similar test on a more complex graph |
|
1194 | Similar test on a more complex graph | |
1195 |
|
1195 | |||
1196 | $ hg debugdrawdag <<EOF |
|
1196 | $ hg debugdrawdag <<EOF | |
1197 | > g |
|
1197 | > g | |
1198 | > | |
|
1198 | > | | |
1199 | > f e |
|
1199 | > f e | |
1200 | > | | |
|
1200 | > | | | |
1201 | > e' d # replace: e -> e' |
|
1201 | > e' d # replace: e -> e' | |
1202 | > \ / |
|
1202 | > \ / | |
1203 | > c |
|
1203 | > c | |
1204 | > | |
|
1204 | > | | |
1205 | > x b |
|
1205 | > x b | |
1206 | > \| |
|
1206 | > \| | |
1207 | > a |
|
1207 | > a | |
1208 | > EOF |
|
1208 | > EOF | |
1209 | 1 new orphan changesets |
|
1209 | 1 new orphan changesets | |
1210 | $ hg log -G -r 'a': |
|
1210 | $ hg log -G -r 'a': | |
1211 | * 8:2876ce66c6eb g |
|
1211 | * 8:2876ce66c6eb g | |
1212 | | |
|
1212 | | | |
1213 | | o 7:3ffec603ab53 f |
|
1213 | | o 7:3ffec603ab53 f | |
1214 | | | |
|
1214 | | | | |
1215 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1215 | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1216 | | | |
|
1216 | | | | |
1217 | | o 5:63324dc512ea e' |
|
1217 | | o 5:63324dc512ea e' | |
1218 | | | |
|
1218 | | | | |
1219 | o | 4:76be324c128b d |
|
1219 | o | 4:76be324c128b d | |
1220 | |/ |
|
1220 | |/ | |
1221 | o 3:a82ac2b38757 c |
|
1221 | o 3:a82ac2b38757 c | |
1222 | | |
|
1222 | | | |
1223 | | o 2:630d7c95eff7 x |
|
1223 | | o 2:630d7c95eff7 x | |
1224 | | | |
|
1224 | | | | |
1225 | o | 1:488e1b7e7341 b |
|
1225 | o | 1:488e1b7e7341 b | |
1226 | |/ |
|
1226 | |/ | |
1227 | o 0:b173517d0057 a |
|
1227 | o 0:b173517d0057 a | |
1228 |
|
1228 | |||
1229 | $ hg rebase -b 'f' -d 'x' |
|
1229 | $ hg rebase -b 'f' -d 'x' | |
1230 | rebasing 1:488e1b7e7341 "b" (b) |
|
1230 | rebasing 1:488e1b7e7341 "b" (b) | |
1231 | rebasing 3:a82ac2b38757 "c" (c) |
|
1231 | rebasing 3:a82ac2b38757 "c" (c) | |
1232 | rebasing 5:63324dc512ea "e'" (e') |
|
1232 | rebasing 5:63324dc512ea "e'" (e') | |
1233 | rebasing 7:3ffec603ab53 "f" (f) |
|
1233 | rebasing 7:3ffec603ab53 "f" (f) | |
1234 | rebasing 4:76be324c128b "d" (d) |
|
1234 | rebasing 4:76be324c128b "d" (d) | |
1235 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence |
|
1235 | note: not rebasing 6:e36fae928aec "e" (e) and its descendants as this would cause divergence | |
1236 | $ hg log -G -r 'a': |
|
1236 | $ hg log -G -r 'a': | |
1237 | o 13:a1707a5b7c2c d |
|
1237 | o 13:a1707a5b7c2c d | |
1238 | | |
|
1238 | | | |
1239 | | o 12:ef6251596616 f |
|
1239 | | o 12:ef6251596616 f | |
1240 | | | |
|
1240 | | | | |
1241 | | o 11:b6f172e64af9 e' |
|
1241 | | o 11:b6f172e64af9 e' | |
1242 | |/ |
|
1242 | |/ | |
1243 | o 10:d008e6b4d3fd c |
|
1243 | o 10:d008e6b4d3fd c | |
1244 | | |
|
1244 | | | |
1245 | o 9:67e8f4a16c49 b |
|
1245 | o 9:67e8f4a16c49 b | |
1246 | | |
|
1246 | | | |
1247 | | * 8:2876ce66c6eb g |
|
1247 | | * 8:2876ce66c6eb g | |
1248 | | | |
|
1248 | | | | |
1249 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) |
|
1249 | | | x 7:3ffec603ab53 f (rewritten using rebase as 12:ef6251596616) | |
1250 | | | | |
|
1250 | | | | | |
1251 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) |
|
1251 | | x | 6:e36fae928aec e (rewritten using replace as 5:63324dc512ea) | |
1252 | | | | |
|
1252 | | | | | |
1253 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) |
|
1253 | | | x 5:63324dc512ea e' (rewritten using rebase as 11:b6f172e64af9) | |
1254 | | | | |
|
1254 | | | | | |
1255 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) |
|
1255 | | x | 4:76be324c128b d (rewritten using rebase as 13:a1707a5b7c2c) | |
1256 | | |/ |
|
1256 | | |/ | |
1257 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) |
|
1257 | | x 3:a82ac2b38757 c (rewritten using rebase as 10:d008e6b4d3fd) | |
1258 | | | |
|
1258 | | | | |
1259 | o | 2:630d7c95eff7 x |
|
1259 | o | 2:630d7c95eff7 x | |
1260 | | | |
|
1260 | | | | |
1261 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) |
|
1261 | | x 1:488e1b7e7341 b (rewritten using rebase as 9:67e8f4a16c49) | |
1262 | |/ |
|
1262 | |/ | |
1263 | o 0:b173517d0057 a |
|
1263 | o 0:b173517d0057 a | |
1264 |
|
1264 | |||
1265 |
|
1265 | |||
1266 | issue5782 |
|
1266 | issue5782 | |
1267 | $ hg strip -r 0: |
|
1267 | $ hg strip -r 0: | |
1268 | $ hg debugdrawdag <<EOF |
|
1268 | $ hg debugdrawdag <<EOF | |
1269 | > d |
|
1269 | > d | |
1270 | > | |
|
1270 | > | | |
1271 | > c1 c # replace: c -> c1 |
|
1271 | > c1 c # replace: c -> c1 | |
1272 | > \ / |
|
1272 | > \ / | |
1273 | > b |
|
1273 | > b | |
1274 | > | |
|
1274 | > | | |
1275 | > a |
|
1275 | > a | |
1276 | > EOF |
|
1276 | > EOF | |
1277 | 1 new orphan changesets |
|
1277 | 1 new orphan changesets | |
1278 | $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` |
|
1278 | $ hg debugobsolete `hg log -T "{node}" --hidden -r 'desc("c1")'` | |
1279 | obsoleted 1 changesets |
|
1279 | obsoleted 1 changesets | |
1280 | $ hg log -G -r 'a': --hidden |
|
1280 | $ hg log -G -r 'a': --hidden | |
1281 | * 4:76be324c128b d |
|
1281 | * 4:76be324c128b d | |
1282 | | |
|
1282 | | | |
1283 | | x 3:ef8a456de8fa c1 (pruned) |
|
1283 | | x 3:ef8a456de8fa c1 (pruned) | |
1284 | | | |
|
1284 | | | | |
1285 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) |
|
1285 | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa) | |
1286 | |/ |
|
1286 | |/ | |
1287 | o 1:488e1b7e7341 b |
|
1287 | o 1:488e1b7e7341 b | |
1288 | | |
|
1288 | | | |
1289 | o 0:b173517d0057 a |
|
1289 | o 0:b173517d0057 a | |
1290 |
|
1290 | |||
1291 | $ hg rebase -d 0 -r 2 |
|
1291 | $ hg rebase -d 0 -r 2 | |
1292 | rebasing 2:a82ac2b38757 "c" (c) |
|
1292 | rebasing 2:a82ac2b38757 "c" (c) | |
1293 | $ hg log -G -r 'a': --hidden |
|
1293 | $ hg log -G -r 'a': --hidden | |
1294 | o 5:69ad416a4a26 c |
|
1294 | o 5:69ad416a4a26 c | |
1295 | | |
|
1295 | | | |
1296 | | * 4:76be324c128b d |
|
1296 | | * 4:76be324c128b d | |
1297 | | | |
|
1297 | | | | |
1298 | | | x 3:ef8a456de8fa c1 (pruned) |
|
1298 | | | x 3:ef8a456de8fa c1 (pruned) | |
1299 | | | | |
|
1299 | | | | | |
1300 | | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) |
|
1300 | | x | 2:a82ac2b38757 c (rewritten using replace as 3:ef8a456de8fa rewritten using rebase as 5:69ad416a4a26) | |
1301 | | |/ |
|
1301 | | |/ | |
1302 | | o 1:488e1b7e7341 b |
|
1302 | | o 1:488e1b7e7341 b | |
1303 | |/ |
|
1303 | |/ | |
1304 | o 0:b173517d0057 a |
|
1304 | o 0:b173517d0057 a | |
1305 |
|
1305 | |||
1306 | $ cd .. |
|
1306 | $ cd .. | |
1307 |
|
1307 | |||
1308 | Rebase merge where successor of one parent is equal to destination (issue5198) |
|
1308 | Rebase merge where successor of one parent is equal to destination (issue5198) | |
1309 |
|
1309 | |||
1310 | $ hg init p1-succ-is-dest |
|
1310 | $ hg init p1-succ-is-dest | |
1311 | $ cd p1-succ-is-dest |
|
1311 | $ cd p1-succ-is-dest | |
1312 |
|
1312 | |||
1313 | $ hg debugdrawdag <<EOF |
|
1313 | $ hg debugdrawdag <<EOF | |
1314 | > F |
|
1314 | > F | |
1315 | > /| |
|
1315 | > /| | |
1316 | > E D B # replace: D -> B |
|
1316 | > E D B # replace: D -> B | |
1317 | > \|/ |
|
1317 | > \|/ | |
1318 | > A |
|
1318 | > A | |
1319 | > EOF |
|
1319 | > EOF | |
1320 | 1 new orphan changesets |
|
1320 | 1 new orphan changesets | |
1321 |
|
1321 | |||
1322 | $ hg rebase -d B -s D |
|
1322 | $ hg rebase -d B -s D | |
1323 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1323 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1324 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1324 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1325 | $ hg log -G |
|
1325 | $ hg log -G | |
1326 | o 5:50e9d60b99c6 F |
|
1326 | o 5:50e9d60b99c6 F | |
1327 | |\ |
|
1327 | |\ | |
1328 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) |
|
1328 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:50e9d60b99c6) | |
1329 | | |/| |
|
1329 | | |/| | |
1330 | | o | 3:7fb047a69f22 E |
|
1330 | | o | 3:7fb047a69f22 E | |
1331 | | | | |
|
1331 | | | | | |
1332 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1332 | | | x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1333 | | |/ |
|
1333 | | |/ | |
1334 | o | 1:112478962961 B |
|
1334 | o | 1:112478962961 B | |
1335 | |/ |
|
1335 | |/ | |
1336 | o 0:426bada5c675 A |
|
1336 | o 0:426bada5c675 A | |
1337 |
|
1337 | |||
1338 | $ cd .. |
|
1338 | $ cd .. | |
1339 |
|
1339 | |||
1340 | Rebase merge where successor of other parent is equal to destination |
|
1340 | Rebase merge where successor of other parent is equal to destination | |
1341 |
|
1341 | |||
1342 | $ hg init p2-succ-is-dest |
|
1342 | $ hg init p2-succ-is-dest | |
1343 | $ cd p2-succ-is-dest |
|
1343 | $ cd p2-succ-is-dest | |
1344 |
|
1344 | |||
1345 | $ hg debugdrawdag <<EOF |
|
1345 | $ hg debugdrawdag <<EOF | |
1346 | > F |
|
1346 | > F | |
1347 | > /| |
|
1347 | > /| | |
1348 | > E D B # replace: E -> B |
|
1348 | > E D B # replace: E -> B | |
1349 | > \|/ |
|
1349 | > \|/ | |
1350 | > A |
|
1350 | > A | |
1351 | > EOF |
|
1351 | > EOF | |
1352 | 1 new orphan changesets |
|
1352 | 1 new orphan changesets | |
1353 |
|
1353 | |||
1354 | $ hg rebase -d B -s E |
|
1354 | $ hg rebase -d B -s E | |
1355 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1355 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1356 | rebasing 4:66f1a38021c9 "F" (F tip) |
|
1356 | rebasing 4:66f1a38021c9 "F" (F tip) | |
1357 | $ hg log -G |
|
1357 | $ hg log -G | |
1358 | o 5:aae1787dacee F |
|
1358 | o 5:aae1787dacee F | |
1359 | |\ |
|
1359 | |\ | |
1360 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) |
|
1360 | | | x 4:66f1a38021c9 F (rewritten using rebase as 5:aae1787dacee) | |
1361 | | |/| |
|
1361 | | |/| | |
1362 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1362 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1363 | | | | |
|
1363 | | | | | |
1364 | | o | 2:b18e25de2cf5 D |
|
1364 | | o | 2:b18e25de2cf5 D | |
1365 | | |/ |
|
1365 | | |/ | |
1366 | o / 1:112478962961 B |
|
1366 | o / 1:112478962961 B | |
1367 | |/ |
|
1367 | |/ | |
1368 | o 0:426bada5c675 A |
|
1368 | o 0:426bada5c675 A | |
1369 |
|
1369 | |||
1370 | $ cd .. |
|
1370 | $ cd .. | |
1371 |
|
1371 | |||
1372 | Rebase merge where successor of one parent is ancestor of destination |
|
1372 | Rebase merge where successor of one parent is ancestor of destination | |
1373 |
|
1373 | |||
1374 | $ hg init p1-succ-in-dest |
|
1374 | $ hg init p1-succ-in-dest | |
1375 | $ cd p1-succ-in-dest |
|
1375 | $ cd p1-succ-in-dest | |
1376 |
|
1376 | |||
1377 | $ hg debugdrawdag <<EOF |
|
1377 | $ hg debugdrawdag <<EOF | |
1378 | > F C |
|
1378 | > F C | |
1379 | > /| | |
|
1379 | > /| | | |
1380 | > E D B # replace: D -> B |
|
1380 | > E D B # replace: D -> B | |
1381 | > \|/ |
|
1381 | > \|/ | |
1382 | > A |
|
1382 | > A | |
1383 | > EOF |
|
1383 | > EOF | |
1384 | 1 new orphan changesets |
|
1384 | 1 new orphan changesets | |
1385 |
|
1385 | |||
1386 | $ hg rebase -d C -s D |
|
1386 | $ hg rebase -d C -s D | |
1387 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1387 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1388 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1388 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1389 |
|
1389 | |||
1390 | $ hg log -G |
|
1390 | $ hg log -G | |
1391 | o 6:0913febf6439 F |
|
1391 | o 6:0913febf6439 F | |
1392 | |\ |
|
1392 | |\ | |
1393 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) |
|
1393 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:0913febf6439) | |
1394 | | | | |
|
1394 | | | | | |
1395 | | o | 4:26805aba1e60 C |
|
1395 | | o | 4:26805aba1e60 C | |
1396 | | | | |
|
1396 | | | | | |
1397 | o | | 3:7fb047a69f22 E |
|
1397 | o | | 3:7fb047a69f22 E | |
1398 | | | | |
|
1398 | | | | | |
1399 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1399 | +---x 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1400 | | | |
|
1400 | | | | |
1401 | | o 1:112478962961 B |
|
1401 | | o 1:112478962961 B | |
1402 | |/ |
|
1402 | |/ | |
1403 | o 0:426bada5c675 A |
|
1403 | o 0:426bada5c675 A | |
1404 |
|
1404 | |||
1405 | $ cd .. |
|
1405 | $ cd .. | |
1406 |
|
1406 | |||
1407 | Rebase merge where successor of other parent is ancestor of destination |
|
1407 | Rebase merge where successor of other parent is ancestor of destination | |
1408 |
|
1408 | |||
1409 | $ hg init p2-succ-in-dest |
|
1409 | $ hg init p2-succ-in-dest | |
1410 | $ cd p2-succ-in-dest |
|
1410 | $ cd p2-succ-in-dest | |
1411 |
|
1411 | |||
1412 | $ hg debugdrawdag <<EOF |
|
1412 | $ hg debugdrawdag <<EOF | |
1413 | > F C |
|
1413 | > F C | |
1414 | > /| | |
|
1414 | > /| | | |
1415 | > E D B # replace: E -> B |
|
1415 | > E D B # replace: E -> B | |
1416 | > \|/ |
|
1416 | > \|/ | |
1417 | > A |
|
1417 | > A | |
1418 | > EOF |
|
1418 | > EOF | |
1419 | 1 new orphan changesets |
|
1419 | 1 new orphan changesets | |
1420 |
|
1420 | |||
1421 | $ hg rebase -d C -s E |
|
1421 | $ hg rebase -d C -s E | |
1422 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1422 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1423 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1423 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1424 | $ hg log -G |
|
1424 | $ hg log -G | |
1425 | o 6:c6ab0cc6d220 F |
|
1425 | o 6:c6ab0cc6d220 F | |
1426 | |\ |
|
1426 | |\ | |
1427 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) |
|
1427 | +---x 5:66f1a38021c9 F (rewritten using rebase as 6:c6ab0cc6d220) | |
1428 | | | | |
|
1428 | | | | | |
1429 | | o | 4:26805aba1e60 C |
|
1429 | | o | 4:26805aba1e60 C | |
1430 | | | | |
|
1430 | | | | | |
1431 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1431 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1432 | | | | |
|
1432 | | | | | |
1433 | o---+ 2:b18e25de2cf5 D |
|
1433 | o---+ 2:b18e25de2cf5 D | |
1434 | / / |
|
1434 | / / | |
1435 | o / 1:112478962961 B |
|
1435 | o / 1:112478962961 B | |
1436 | |/ |
|
1436 | |/ | |
1437 | o 0:426bada5c675 A |
|
1437 | o 0:426bada5c675 A | |
1438 |
|
1438 | |||
1439 | $ cd .. |
|
1439 | $ cd .. | |
1440 |
|
1440 | |||
1441 | Rebase merge where successor of one parent is ancestor of destination |
|
1441 | Rebase merge where successor of one parent is ancestor of destination | |
1442 |
|
1442 | |||
1443 | $ hg init p1-succ-in-dest-b |
|
1443 | $ hg init p1-succ-in-dest-b | |
1444 | $ cd p1-succ-in-dest-b |
|
1444 | $ cd p1-succ-in-dest-b | |
1445 |
|
1445 | |||
1446 | $ hg debugdrawdag <<EOF |
|
1446 | $ hg debugdrawdag <<EOF | |
1447 | > F C |
|
1447 | > F C | |
1448 | > /| | |
|
1448 | > /| | | |
1449 | > E D B # replace: E -> B |
|
1449 | > E D B # replace: E -> B | |
1450 | > \|/ |
|
1450 | > \|/ | |
1451 | > A |
|
1451 | > A | |
1452 | > EOF |
|
1452 | > EOF | |
1453 | 1 new orphan changesets |
|
1453 | 1 new orphan changesets | |
1454 |
|
1454 | |||
1455 | $ hg rebase -d C -b F |
|
1455 | $ hg rebase -d C -b F | |
1456 | rebasing 2:b18e25de2cf5 "D" (D) |
|
1456 | rebasing 2:b18e25de2cf5 "D" (D) | |
1457 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) |
|
1457 | note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) | |
1458 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1458 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1459 | note: rebase of 5:66f1a38021c9 created no changes to commit |
|
1459 | note: rebase of 5:66f1a38021c9 created no changes to commit | |
1460 | $ hg log -G |
|
1460 | $ hg log -G | |
1461 | o 6:8f47515dda15 D |
|
1461 | o 6:8f47515dda15 D | |
1462 | | |
|
1462 | | | |
1463 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1463 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1464 | | |\ |
|
1464 | | |\ | |
1465 | o | | 4:26805aba1e60 C |
|
1465 | o | | 4:26805aba1e60 C | |
1466 | | | | |
|
1466 | | | | | |
1467 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) |
|
1467 | | | x 3:7fb047a69f22 E (rewritten using replace as 1:112478962961) | |
1468 | | | | |
|
1468 | | | | | |
1469 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) |
|
1469 | | x | 2:b18e25de2cf5 D (rewritten using rebase as 6:8f47515dda15) | |
1470 | | |/ |
|
1470 | | |/ | |
1471 | o / 1:112478962961 B |
|
1471 | o / 1:112478962961 B | |
1472 | |/ |
|
1472 | |/ | |
1473 | o 0:426bada5c675 A |
|
1473 | o 0:426bada5c675 A | |
1474 |
|
1474 | |||
1475 | $ cd .. |
|
1475 | $ cd .. | |
1476 |
|
1476 | |||
1477 | Rebase merge where successor of other parent is ancestor of destination |
|
1477 | Rebase merge where successor of other parent is ancestor of destination | |
1478 |
|
1478 | |||
1479 | $ hg init p2-succ-in-dest-b |
|
1479 | $ hg init p2-succ-in-dest-b | |
1480 | $ cd p2-succ-in-dest-b |
|
1480 | $ cd p2-succ-in-dest-b | |
1481 |
|
1481 | |||
1482 | $ hg debugdrawdag <<EOF |
|
1482 | $ hg debugdrawdag <<EOF | |
1483 | > F C |
|
1483 | > F C | |
1484 | > /| | |
|
1484 | > /| | | |
1485 | > E D B # replace: D -> B |
|
1485 | > E D B # replace: D -> B | |
1486 | > \|/ |
|
1486 | > \|/ | |
1487 | > A |
|
1487 | > A | |
1488 | > EOF |
|
1488 | > EOF | |
1489 | 1 new orphan changesets |
|
1489 | 1 new orphan changesets | |
1490 |
|
1490 | |||
1491 | $ hg rebase -d C -b F |
|
1491 | $ hg rebase -d C -b F | |
1492 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) |
|
1492 | note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) | |
1493 | rebasing 3:7fb047a69f22 "E" (E) |
|
1493 | rebasing 3:7fb047a69f22 "E" (E) | |
1494 | rebasing 5:66f1a38021c9 "F" (F tip) |
|
1494 | rebasing 5:66f1a38021c9 "F" (F tip) | |
1495 | note: rebase of 5:66f1a38021c9 created no changes to commit |
|
1495 | note: rebase of 5:66f1a38021c9 created no changes to commit | |
1496 |
|
1496 | |||
1497 | $ hg log -G |
|
1497 | $ hg log -G | |
1498 | o 6:533690786a86 E |
|
1498 | o 6:533690786a86 E | |
1499 | | |
|
1499 | | | |
1500 | | x 5:66f1a38021c9 F (pruned using rebase) |
|
1500 | | x 5:66f1a38021c9 F (pruned using rebase) | |
1501 | | |\ |
|
1501 | | |\ | |
1502 | o | | 4:26805aba1e60 C |
|
1502 | o | | 4:26805aba1e60 C | |
1503 | | | | |
|
1503 | | | | | |
1504 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) |
|
1504 | | | x 3:7fb047a69f22 E (rewritten using rebase as 6:533690786a86) | |
1505 | | | | |
|
1505 | | | | | |
1506 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) |
|
1506 | | x | 2:b18e25de2cf5 D (rewritten using replace as 1:112478962961) | |
1507 | | |/ |
|
1507 | | |/ | |
1508 | o / 1:112478962961 B |
|
1508 | o / 1:112478962961 B | |
1509 | |/ |
|
1509 | |/ | |
1510 | o 0:426bada5c675 A |
|
1510 | o 0:426bada5c675 A | |
1511 |
|
1511 | |||
1512 | $ cd .. |
|
1512 | $ cd .. | |
1513 |
|
1513 | |||
|
1514 | Rebase merge where extinct node has successor that is not an ancestor of | |||
|
1515 | destination | |||
|
1516 | ||||
|
1517 | $ hg init extinct-with-succ-not-in-dest | |||
|
1518 | $ cd extinct-with-succ-not-in-dest | |||
|
1519 | ||||
|
1520 | $ hg debugdrawdag <<EOF | |||
|
1521 | > E C # replace: C -> E | |||
|
1522 | > | | | |||
|
1523 | > D B | |||
|
1524 | > |/ | |||
|
1525 | > A | |||
|
1526 | > EOF | |||
|
1527 | ||||
|
1528 | TODO: There doesn't seem to be much reason to fail this rebase. Make it pass? | |||
|
1529 | $ hg rebase -d D -s B | |||
|
1530 | abort: this rebase will cause divergences from: 26805aba1e60 | |||
|
1531 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |||
|
1532 | [255] | |||
|
1533 | ||||
|
1534 | $ cd .. | |||
|
1535 | ||||
1514 | $ hg init p2-succ-in-dest-c |
|
1536 | $ hg init p2-succ-in-dest-c | |
1515 | $ cd p2-succ-in-dest-c |
|
1537 | $ cd p2-succ-in-dest-c | |
1516 |
|
1538 | |||
1517 | The scenario here was that B::D were developed on default. B was queued on |
|
1539 | The scenario here was that B::D were developed on default. B was queued on | |
1518 | stable, but amended before being push to hg-committed. C was queued on default, |
|
1540 | stable, but amended before being push to hg-committed. C was queued on default, | |
1519 | along with unrelated J. |
|
1541 | along with unrelated J. | |
1520 |
|
1542 | |||
1521 | $ hg debugdrawdag <<EOF |
|
1543 | $ hg debugdrawdag <<EOF | |
1522 | > J |
|
1544 | > J | |
1523 | > | |
|
1545 | > | | |
1524 | > F |
|
1546 | > F | |
1525 | > | |
|
1547 | > | | |
1526 | > E |
|
1548 | > E | |
1527 | > | D |
|
1549 | > | D | |
1528 | > | | |
|
1550 | > | | | |
1529 | > | C # replace: C -> F |
|
1551 | > | C # replace: C -> F | |
1530 | > | | H I # replace: B -> H -> I |
|
1552 | > | | H I # replace: B -> H -> I | |
1531 | > | B |/ |
|
1553 | > | B |/ | |
1532 | > |/ G |
|
1554 | > |/ G | |
1533 | > A |
|
1555 | > A | |
1534 | > EOF |
|
1556 | > EOF | |
1535 | 1 new orphan changesets |
|
1557 | 1 new orphan changesets | |
1536 |
|
1558 | |||
1537 | This strip seems to be the key to avoid an early divergence warning. |
|
1559 | This strip seems to be the key to avoid an early divergence warning. | |
1538 | $ hg --config extensions.strip= --hidden strip -qr H |
|
1560 | $ hg --config extensions.strip= --hidden strip -qr H | |
1539 | 1 new orphan changesets |
|
1561 | 1 new orphan changesets | |
1540 |
|
1562 | |||
1541 | $ hg rebase -b 'desc("D")' -d 'desc("J")' |
|
1563 | $ hg rebase -b 'desc("D")' -d 'desc("J")' | |
1542 | abort: this rebase will cause divergences from: 112478962961 |
|
1564 | abort: this rebase will cause divergences from: 112478962961 | |
1543 | (to force the rebase please set experimental.evolution.allowdivergence=True) |
|
1565 | (to force the rebase please set experimental.evolution.allowdivergence=True) | |
1544 | [255] |
|
1566 | [255] | |
1545 |
|
1567 | |||
1546 | Rebase merge where both parents have successors in destination |
|
1568 | Rebase merge where both parents have successors in destination | |
1547 |
|
1569 | |||
1548 | $ hg init p12-succ-in-dest |
|
1570 | $ hg init p12-succ-in-dest | |
1549 | $ cd p12-succ-in-dest |
|
1571 | $ cd p12-succ-in-dest | |
1550 | $ hg debugdrawdag <<'EOS' |
|
1572 | $ hg debugdrawdag <<'EOS' | |
1551 | > E F |
|
1573 | > E F | |
1552 | > /| /| # replace: A -> C |
|
1574 | > /| /| # replace: A -> C | |
1553 | > A B C D # replace: B -> D |
|
1575 | > A B C D # replace: B -> D | |
1554 | > | | |
|
1576 | > | | | |
1555 | > X Y |
|
1577 | > X Y | |
1556 | > EOS |
|
1578 | > EOS | |
1557 | 1 new orphan changesets |
|
1579 | 1 new orphan changesets | |
1558 | $ hg rebase -r A+B+E -d F |
|
1580 | $ hg rebase -r A+B+E -d F | |
1559 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) |
|
1581 | note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) | |
1560 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) |
|
1582 | note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) | |
1561 | rebasing 7:dac5d11c5a7d "E" (E tip) |
|
1583 | rebasing 7:dac5d11c5a7d "E" (E tip) | |
1562 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f |
|
1584 | abort: rebasing 7:dac5d11c5a7d will include unwanted changes from 3:59c792af609c, 5:b23a2cc00842 or 2:ba2b7fa7166d, 4:a3d17304151f | |
1563 | [255] |
|
1585 | [255] | |
1564 | $ cd .. |
|
1586 | $ cd .. | |
1565 |
|
1587 | |||
1566 | Rebase a non-clean merge. One parent has successor in destination, the other |
|
1588 | Rebase a non-clean merge. One parent has successor in destination, the other | |
1567 | parent moves as requested. |
|
1589 | parent moves as requested. | |
1568 |
|
1590 | |||
1569 | $ hg init p1-succ-p2-move |
|
1591 | $ hg init p1-succ-p2-move | |
1570 | $ cd p1-succ-p2-move |
|
1592 | $ cd p1-succ-p2-move | |
1571 | $ hg debugdrawdag <<'EOS' |
|
1593 | $ hg debugdrawdag <<'EOS' | |
1572 | > D Z |
|
1594 | > D Z | |
1573 | > /| | # replace: A -> C |
|
1595 | > /| | # replace: A -> C | |
1574 | > A B C # D/D = D |
|
1596 | > A B C # D/D = D | |
1575 | > EOS |
|
1597 | > EOS | |
1576 | 1 new orphan changesets |
|
1598 | 1 new orphan changesets | |
1577 | $ hg rebase -r A+B+D -d Z |
|
1599 | $ hg rebase -r A+B+D -d Z | |
1578 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) |
|
1600 | note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) | |
1579 | rebasing 1:fc2b737bb2e5 "B" (B) |
|
1601 | rebasing 1:fc2b737bb2e5 "B" (B) | |
1580 | rebasing 3:b8ed089c80ad "D" (D) |
|
1602 | rebasing 3:b8ed089c80ad "D" (D) | |
1581 |
|
1603 | |||
1582 | $ rm .hg/localtags |
|
1604 | $ rm .hg/localtags | |
1583 | $ hg log -G |
|
1605 | $ hg log -G | |
1584 | o 6:e4f78693cc88 D |
|
1606 | o 6:e4f78693cc88 D | |
1585 | | |
|
1607 | | | |
1586 | o 5:76840d832e98 B |
|
1608 | o 5:76840d832e98 B | |
1587 | | |
|
1609 | | | |
1588 | o 4:50e41c1f3950 Z |
|
1610 | o 4:50e41c1f3950 Z | |
1589 | | |
|
1611 | | | |
1590 | o 2:96cc3511f894 C |
|
1612 | o 2:96cc3511f894 C | |
1591 |
|
1613 | |||
1592 | $ hg files -r tip |
|
1614 | $ hg files -r tip | |
1593 | B |
|
1615 | B | |
1594 | C |
|
1616 | C | |
1595 | D |
|
1617 | D | |
1596 | Z |
|
1618 | Z | |
1597 |
|
1619 | |||
1598 | $ cd .. |
|
1620 | $ cd .. | |
1599 |
|
1621 | |||
1600 | $ hg init p1-move-p2-succ |
|
1622 | $ hg init p1-move-p2-succ | |
1601 | $ cd p1-move-p2-succ |
|
1623 | $ cd p1-move-p2-succ | |
1602 | $ hg debugdrawdag <<'EOS' |
|
1624 | $ hg debugdrawdag <<'EOS' | |
1603 | > D Z |
|
1625 | > D Z | |
1604 | > /| | # replace: B -> C |
|
1626 | > /| | # replace: B -> C | |
1605 | > A B C # D/D = D |
|
1627 | > A B C # D/D = D | |
1606 | > EOS |
|
1628 | > EOS | |
1607 | 1 new orphan changesets |
|
1629 | 1 new orphan changesets | |
1608 | $ hg rebase -r B+A+D -d Z |
|
1630 | $ hg rebase -r B+A+D -d Z | |
1609 | rebasing 0:426bada5c675 "A" (A) |
|
1631 | rebasing 0:426bada5c675 "A" (A) | |
1610 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) |
|
1632 | note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) | |
1611 | rebasing 3:b8ed089c80ad "D" (D) |
|
1633 | rebasing 3:b8ed089c80ad "D" (D) | |
1612 |
|
1634 | |||
1613 | $ rm .hg/localtags |
|
1635 | $ rm .hg/localtags | |
1614 | $ hg log -G |
|
1636 | $ hg log -G | |
1615 | o 6:1b355ed94d82 D |
|
1637 | o 6:1b355ed94d82 D | |
1616 | | |
|
1638 | | | |
1617 | o 5:a81a74d764a6 A |
|
1639 | o 5:a81a74d764a6 A | |
1618 | | |
|
1640 | | | |
1619 | o 4:50e41c1f3950 Z |
|
1641 | o 4:50e41c1f3950 Z | |
1620 | | |
|
1642 | | | |
1621 | o 2:96cc3511f894 C |
|
1643 | o 2:96cc3511f894 C | |
1622 |
|
1644 | |||
1623 | $ hg files -r tip |
|
1645 | $ hg files -r tip | |
1624 | A |
|
1646 | A | |
1625 | C |
|
1647 | C | |
1626 | D |
|
1648 | D | |
1627 | Z |
|
1649 | Z | |
1628 |
|
1650 | |||
1629 | $ cd .. |
|
1651 | $ cd .. | |
1630 |
|
1652 | |||
1631 | Test that bookmark is moved and working dir is updated when all changesets have |
|
1653 | Test that bookmark is moved and working dir is updated when all changesets have | |
1632 | equivalents in destination |
|
1654 | equivalents in destination | |
1633 | $ hg init rbsrepo && cd rbsrepo |
|
1655 | $ hg init rbsrepo && cd rbsrepo | |
1634 | $ echo "[experimental]" > .hg/hgrc |
|
1656 | $ echo "[experimental]" > .hg/hgrc | |
1635 | $ echo "evolution=true" >> .hg/hgrc |
|
1657 | $ echo "evolution=true" >> .hg/hgrc | |
1636 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc |
|
1658 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc | |
1637 | $ echo root > root && hg ci -Am root |
|
1659 | $ echo root > root && hg ci -Am root | |
1638 | adding root |
|
1660 | adding root | |
1639 | $ echo a > a && hg ci -Am a |
|
1661 | $ echo a > a && hg ci -Am a | |
1640 | adding a |
|
1662 | adding a | |
1641 | $ hg up 0 |
|
1663 | $ hg up 0 | |
1642 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1664 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1643 | $ echo b > b && hg ci -Am b |
|
1665 | $ echo b > b && hg ci -Am b | |
1644 | adding b |
|
1666 | adding b | |
1645 | created new head |
|
1667 | created new head | |
1646 | $ hg rebase -r 2 -d 1 |
|
1668 | $ hg rebase -r 2 -d 1 | |
1647 | rebasing 2:1e9a3c00cbe9 "b" (tip) |
|
1669 | rebasing 2:1e9a3c00cbe9 "b" (tip) | |
1648 | $ hg log -r . # working dir is at rev 3 (successor of 2) |
|
1670 | $ hg log -r . # working dir is at rev 3 (successor of 2) | |
1649 | 3:be1832deae9a b (no-eol) |
|
1671 | 3:be1832deae9a b (no-eol) | |
1650 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now |
|
1672 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now | |
1651 | bookmarking hidden changeset 1e9a3c00cbe9 |
|
1673 | bookmarking hidden changeset 1e9a3c00cbe9 | |
1652 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) |
|
1674 | (hidden revision '1e9a3c00cbe9' was rewritten as: be1832deae9a) | |
1653 | $ hg up 2 && hg log -r . # working dir is at rev 2 again |
|
1675 | $ hg up 2 && hg log -r . # working dir is at rev 2 again | |
1654 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1676 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1655 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) |
|
1677 | 2:1e9a3c00cbe9 b (rewritten using rebase as 3:be1832deae9a) (no-eol) | |
1656 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 |
|
1678 | $ hg rebase -r 2 -d 3 --config experimental.evolution.track-operation=1 | |
1657 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) |
|
1679 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" (tip) | |
1658 | Check that working directory and bookmark was updated to rev 3 although rev 2 |
|
1680 | Check that working directory and bookmark was updated to rev 3 although rev 2 | |
1659 | was skipped |
|
1681 | was skipped | |
1660 | $ hg log -r . |
|
1682 | $ hg log -r . | |
1661 | 3:be1832deae9a b (no-eol) |
|
1683 | 3:be1832deae9a b (no-eol) | |
1662 | $ hg bookmarks |
|
1684 | $ hg bookmarks | |
1663 | mybook 3:be1832deae9a |
|
1685 | mybook 3:be1832deae9a | |
1664 | $ hg debugobsolete --rev tip |
|
1686 | $ hg debugobsolete --rev tip | |
1665 |
1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {' |
|
1687 | 1e9a3c00cbe90d236ac05ef61efcc5e40b7412bc be1832deae9ac531caa7438b8dcf6055a122cd8e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} | |
1666 |
|
1688 | |||
1667 | Obsoleted working parent and bookmark could be moved if an ancestor of working |
|
1689 | Obsoleted working parent and bookmark could be moved if an ancestor of working | |
1668 | parent gets moved: |
|
1690 | parent gets moved: | |
1669 |
|
1691 | |||
1670 | $ hg init $TESTTMP/ancestor-wd-move |
|
1692 | $ hg init $TESTTMP/ancestor-wd-move | |
1671 | $ cd $TESTTMP/ancestor-wd-move |
|
1693 | $ cd $TESTTMP/ancestor-wd-move | |
1672 | $ hg debugdrawdag <<'EOS' |
|
1694 | $ hg debugdrawdag <<'EOS' | |
1673 | > E D1 # rebase: D1 -> D2 |
|
1695 | > E D1 # rebase: D1 -> D2 | |
1674 | > | | |
|
1696 | > | | | |
1675 | > | C |
|
1697 | > | C | |
1676 | > D2 | |
|
1698 | > D2 | | |
1677 | > | B |
|
1699 | > | B | |
1678 | > |/ |
|
1700 | > |/ | |
1679 | > A |
|
1701 | > A | |
1680 | > EOS |
|
1702 | > EOS | |
1681 | $ hg update D1 -q |
|
1703 | $ hg update D1 -q | |
1682 | $ hg bookmark book -i |
|
1704 | $ hg bookmark book -i | |
1683 | $ hg rebase -r B+D1 -d E |
|
1705 | $ hg rebase -r B+D1 -d E | |
1684 | rebasing 1:112478962961 "B" (B) |
|
1706 | rebasing 1:112478962961 "B" (B) | |
1685 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) |
|
1707 | note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) | |
1686 | 1 new orphan changesets |
|
1708 | 1 new orphan changesets | |
1687 | $ hg log -G -T '{desc} {bookmarks}' |
|
1709 | $ hg log -G -T '{desc} {bookmarks}' | |
1688 | @ B book |
|
1710 | @ B book | |
1689 | | |
|
1711 | | | |
1690 | | x D1 |
|
1712 | | x D1 | |
1691 | | | |
|
1713 | | | | |
1692 | o | E |
|
1714 | o | E | |
1693 | | | |
|
1715 | | | | |
1694 | | * C |
|
1716 | | * C | |
1695 | | | |
|
1717 | | | | |
1696 | o | D2 |
|
1718 | o | D2 | |
1697 | | | |
|
1719 | | | | |
1698 | | x B |
|
1720 | | x B | |
1699 | |/ |
|
1721 | |/ | |
1700 | o A |
|
1722 | o A | |
1701 |
|
1723 | |||
1702 | Rebasing a merge with one of its parent having a hidden successor |
|
1724 | Rebasing a merge with one of its parent having a hidden successor | |
1703 |
|
1725 | |||
1704 | $ hg init $TESTTMP/merge-p1-hidden-successor |
|
1726 | $ hg init $TESTTMP/merge-p1-hidden-successor | |
1705 | $ cd $TESTTMP/merge-p1-hidden-successor |
|
1727 | $ cd $TESTTMP/merge-p1-hidden-successor | |
1706 |
|
1728 | |||
1707 | $ hg debugdrawdag <<'EOS' |
|
1729 | $ hg debugdrawdag <<'EOS' | |
1708 | > E |
|
1730 | > E | |
1709 | > | |
|
1731 | > | | |
1710 | > B3 B2 # amend: B1 -> B2 -> B3 |
|
1732 | > B3 B2 # amend: B1 -> B2 -> B3 | |
1711 | > |/ # B2 is hidden |
|
1733 | > |/ # B2 is hidden | |
1712 | > | D |
|
1734 | > | D | |
1713 | > | |\ |
|
1735 | > | |\ | |
1714 | > | B1 C |
|
1736 | > | B1 C | |
1715 | > |/ |
|
1737 | > |/ | |
1716 | > A |
|
1738 | > A | |
1717 | > EOS |
|
1739 | > EOS | |
1718 | 1 new orphan changesets |
|
1740 | 1 new orphan changesets | |
1719 |
|
1741 | |||
1720 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1742 | $ eval `hg tags -T '{tag}={node}\n'` | |
1721 | $ rm .hg/localtags |
|
1743 | $ rm .hg/localtags | |
1722 |
|
1744 | |||
1723 | $ hg rebase -r $D -d $E |
|
1745 | $ hg rebase -r $D -d $E | |
1724 | rebasing 5:9e62094e4d94 "D" |
|
1746 | rebasing 5:9e62094e4d94 "D" | |
1725 |
|
1747 | |||
1726 | $ hg log -G |
|
1748 | $ hg log -G | |
1727 | o 7:a699d059adcf D |
|
1749 | o 7:a699d059adcf D | |
1728 | |\ |
|
1750 | |\ | |
1729 | | o 6:ecc93090a95c E |
|
1751 | | o 6:ecc93090a95c E | |
1730 | | | |
|
1752 | | | | |
1731 | | o 4:0dc878468a23 B3 |
|
1753 | | o 4:0dc878468a23 B3 | |
1732 | | | |
|
1754 | | | | |
1733 | o | 1:96cc3511f894 C |
|
1755 | o | 1:96cc3511f894 C | |
1734 | / |
|
1756 | / | |
1735 | o 0:426bada5c675 A |
|
1757 | o 0:426bada5c675 A | |
1736 |
|
1758 | |||
1737 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), |
|
1759 | For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.), | |
1738 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. |
|
1760 | rebasestate may contain hidden hashes. "rebase --abort" should work regardless. | |
1739 |
|
1761 | |||
1740 | $ hg init $TESTTMP/hidden-state1 |
|
1762 | $ hg init $TESTTMP/hidden-state1 | |
1741 | $ cd $TESTTMP/hidden-state1 |
|
1763 | $ cd $TESTTMP/hidden-state1 | |
1742 | $ cat >> .hg/hgrc <<EOF |
|
1764 | $ cat >> .hg/hgrc <<EOF | |
1743 | > [experimental] |
|
1765 | > [experimental] | |
1744 | > rebaseskipobsolete=0 |
|
1766 | > rebaseskipobsolete=0 | |
1745 | > EOF |
|
1767 | > EOF | |
1746 |
|
1768 | |||
1747 | $ hg debugdrawdag <<'EOS' |
|
1769 | $ hg debugdrawdag <<'EOS' | |
1748 | > C |
|
1770 | > C | |
1749 | > | |
|
1771 | > | | |
1750 | > D B # prune: B, C |
|
1772 | > D B # prune: B, C | |
1751 | > |/ # B/D=B |
|
1773 | > |/ # B/D=B | |
1752 | > A |
|
1774 | > A | |
1753 | > EOS |
|
1775 | > EOS | |
1754 |
|
1776 | |||
1755 | $ eval `hg tags -T '{tag}={node}\n'` |
|
1777 | $ eval `hg tags -T '{tag}={node}\n'` | |
1756 | $ rm .hg/localtags |
|
1778 | $ rm .hg/localtags | |
1757 |
|
1779 | |||
1758 | $ hg update -q $C --hidden |
|
1780 | $ hg update -q $C --hidden | |
1759 | updated to hidden changeset 7829726be4dc |
|
1781 | updated to hidden changeset 7829726be4dc | |
1760 | (hidden revision '7829726be4dc' is pruned) |
|
1782 | (hidden revision '7829726be4dc' is pruned) | |
1761 | $ hg rebase -s $B -d $D |
|
1783 | $ hg rebase -s $B -d $D | |
1762 | rebasing 1:2ec65233581b "B" |
|
1784 | rebasing 1:2ec65233581b "B" | |
1763 | merging D |
|
1785 | merging D | |
1764 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') |
|
1786 | warning: conflicts while merging D! (edit, then use 'hg resolve --mark') | |
1765 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1787 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1766 | [1] |
|
1788 | [1] | |
1767 |
|
1789 | |||
1768 | $ cp -R . $TESTTMP/hidden-state2 |
|
1790 | $ cp -R . $TESTTMP/hidden-state2 | |
1769 |
|
1791 | |||
1770 | $ hg log -G |
|
1792 | $ hg log -G | |
1771 | @ 2:b18e25de2cf5 D |
|
1793 | @ 2:b18e25de2cf5 D | |
1772 | | |
|
1794 | | | |
1773 | | @ 1:2ec65233581b B (pruned using prune) |
|
1795 | | @ 1:2ec65233581b B (pruned using prune) | |
1774 | |/ |
|
1796 | |/ | |
1775 | o 0:426bada5c675 A |
|
1797 | o 0:426bada5c675 A | |
1776 |
|
1798 | |||
1777 | $ hg summary |
|
1799 | $ hg summary | |
1778 | parent: 2:b18e25de2cf5 tip |
|
1800 | parent: 2:b18e25de2cf5 tip | |
1779 | D |
|
1801 | D | |
1780 | parent: 1:2ec65233581b (obsolete) |
|
1802 | parent: 1:2ec65233581b (obsolete) | |
1781 | B |
|
1803 | B | |
1782 | branch: default |
|
1804 | branch: default | |
1783 | commit: 2 modified, 1 unknown, 1 unresolved (merge) |
|
1805 | commit: 2 modified, 1 unknown, 1 unresolved (merge) | |
1784 | update: (current) |
|
1806 | update: (current) | |
1785 | phases: 3 draft |
|
1807 | phases: 3 draft | |
1786 | rebase: 0 rebased, 2 remaining (rebase --continue) |
|
1808 | rebase: 0 rebased, 2 remaining (rebase --continue) | |
1787 |
|
1809 | |||
1788 | $ hg rebase --abort |
|
1810 | $ hg rebase --abort | |
1789 | rebase aborted |
|
1811 | rebase aborted | |
1790 |
|
1812 | |||
1791 | Also test --continue for the above case |
|
1813 | Also test --continue for the above case | |
1792 |
|
1814 | |||
1793 | $ cd $TESTTMP/hidden-state2 |
|
1815 | $ cd $TESTTMP/hidden-state2 | |
1794 | $ hg resolve -m |
|
1816 | $ hg resolve -m | |
1795 | (no more unresolved files) |
|
1817 | (no more unresolved files) | |
1796 | continue: hg rebase --continue |
|
1818 | continue: hg rebase --continue | |
1797 | $ hg rebase --continue |
|
1819 | $ hg rebase --continue | |
1798 | rebasing 1:2ec65233581b "B" |
|
1820 | rebasing 1:2ec65233581b "B" | |
1799 | rebasing 3:7829726be4dc "C" (tip) |
|
1821 | rebasing 3:7829726be4dc "C" (tip) | |
1800 | $ hg log -G |
|
1822 | $ hg log -G | |
1801 | @ 5:1964d5d5b547 C |
|
1823 | @ 5:1964d5d5b547 C | |
1802 | | |
|
1824 | | | |
1803 | o 4:68deb90c12a2 B |
|
1825 | o 4:68deb90c12a2 B | |
1804 | | |
|
1826 | | | |
1805 | o 2:b18e25de2cf5 D |
|
1827 | o 2:b18e25de2cf5 D | |
1806 | | |
|
1828 | | | |
1807 | o 0:426bada5c675 A |
|
1829 | o 0:426bada5c675 A | |
1808 |
|
1830 | |||
1809 | ==================== |
|
1831 | ==================== | |
1810 | Test --stop option | |
|
1832 | Test --stop option | | |
1811 | ==================== |
|
1833 | ==================== | |
1812 | $ cd .. |
|
1834 | $ cd .. | |
1813 | $ hg init rbstop |
|
1835 | $ hg init rbstop | |
1814 | $ cd rbstop |
|
1836 | $ cd rbstop | |
1815 | $ echo a>a |
|
1837 | $ echo a>a | |
1816 | $ hg ci -Aqma |
|
1838 | $ hg ci -Aqma | |
1817 | $ echo b>b |
|
1839 | $ echo b>b | |
1818 | $ hg ci -Aqmb |
|
1840 | $ hg ci -Aqmb | |
1819 | $ echo c>c |
|
1841 | $ echo c>c | |
1820 | $ hg ci -Aqmc |
|
1842 | $ hg ci -Aqmc | |
1821 | $ echo d>d |
|
1843 | $ echo d>d | |
1822 | $ hg ci -Aqmd |
|
1844 | $ hg ci -Aqmd | |
1823 | $ hg up 0 -q |
|
1845 | $ hg up 0 -q | |
1824 | $ echo f>f |
|
1846 | $ echo f>f | |
1825 | $ hg ci -Aqmf |
|
1847 | $ hg ci -Aqmf | |
1826 | $ echo D>d |
|
1848 | $ echo D>d | |
1827 | $ hg ci -Aqm "conflict with d" |
|
1849 | $ hg ci -Aqm "conflict with d" | |
1828 | $ hg up 3 -q |
|
1850 | $ hg up 3 -q | |
1829 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1851 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1830 | o 5:00bfc9898aeb test |
|
1852 | o 5:00bfc9898aeb test | |
1831 | | conflict with d |
|
1853 | | conflict with d | |
1832 | | |
|
1854 | | | |
1833 | o 4:dafd40200f93 test |
|
1855 | o 4:dafd40200f93 test | |
1834 | | f |
|
1856 | | f | |
1835 | | |
|
1857 | | | |
1836 | | @ 3:055a42cdd887 test |
|
1858 | | @ 3:055a42cdd887 test | |
1837 | | | d |
|
1859 | | | d | |
1838 | | | |
|
1860 | | | | |
1839 | | o 2:177f92b77385 test |
|
1861 | | o 2:177f92b77385 test | |
1840 | | | c |
|
1862 | | | c | |
1841 | | | |
|
1863 | | | | |
1842 | | o 1:d2ae7f538514 test |
|
1864 | | o 1:d2ae7f538514 test | |
1843 | |/ b |
|
1865 | |/ b | |
1844 | | |
|
1866 | | | |
1845 | o 0:cb9a9f314b8b test |
|
1867 | o 0:cb9a9f314b8b test | |
1846 | a |
|
1868 | a | |
1847 |
|
1869 | |||
1848 | $ hg rebase -s 1 -d 5 |
|
1870 | $ hg rebase -s 1 -d 5 | |
1849 | rebasing 1:d2ae7f538514 "b" |
|
1871 | rebasing 1:d2ae7f538514 "b" | |
1850 | rebasing 2:177f92b77385 "c" |
|
1872 | rebasing 2:177f92b77385 "c" | |
1851 | rebasing 3:055a42cdd887 "d" |
|
1873 | rebasing 3:055a42cdd887 "d" | |
1852 | merging d |
|
1874 | merging d | |
1853 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1875 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1854 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1876 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1855 | [1] |
|
1877 | [1] | |
1856 | $ hg rebase --stop |
|
1878 | $ hg rebase --stop | |
1857 | 1 new orphan changesets |
|
1879 | 1 new orphan changesets | |
1858 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1880 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1859 | o 7:7fffad344617 test |
|
1881 | o 7:7fffad344617 test | |
1860 | | c |
|
1882 | | c | |
1861 | | |
|
1883 | | | |
1862 | o 6:b15528633407 test |
|
1884 | o 6:b15528633407 test | |
1863 | | b |
|
1885 | | b | |
1864 | | |
|
1886 | | | |
1865 | o 5:00bfc9898aeb test |
|
1887 | o 5:00bfc9898aeb test | |
1866 | | conflict with d |
|
1888 | | conflict with d | |
1867 | | |
|
1889 | | | |
1868 | o 4:dafd40200f93 test |
|
1890 | o 4:dafd40200f93 test | |
1869 | | f |
|
1891 | | f | |
1870 | | |
|
1892 | | | |
1871 | | @ 3:055a42cdd887 test |
|
1893 | | @ 3:055a42cdd887 test | |
1872 | | | d |
|
1894 | | | d | |
1873 | | | |
|
1895 | | | | |
1874 | | x 2:177f92b77385 test |
|
1896 | | x 2:177f92b77385 test | |
1875 | | | c |
|
1897 | | | c | |
1876 | | | |
|
1898 | | | | |
1877 | | x 1:d2ae7f538514 test |
|
1899 | | x 1:d2ae7f538514 test | |
1878 | |/ b |
|
1900 | |/ b | |
1879 | | |
|
1901 | | | |
1880 | o 0:cb9a9f314b8b test |
|
1902 | o 0:cb9a9f314b8b test | |
1881 | a |
|
1903 | a | |
1882 |
|
1904 | |||
1883 | Test it aborts if unstable csets is not allowed: |
|
1905 | Test it aborts if unstable csets is not allowed: | |
1884 | =============================================== |
|
1906 | =============================================== | |
1885 | $ cat >> $HGRCPATH << EOF |
|
1907 | $ cat >> $HGRCPATH << EOF | |
1886 | > [experimental] |
|
1908 | > [experimental] | |
1887 | > evolution.allowunstable=False |
|
1909 | > evolution.allowunstable=False | |
1888 | > EOF |
|
1910 | > EOF | |
1889 |
|
1911 | |||
1890 | $ hg strip 6 --no-backup -q |
|
1912 | $ hg strip 6 --no-backup -q | |
1891 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1913 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1892 | o 5:00bfc9898aeb test |
|
1914 | o 5:00bfc9898aeb test | |
1893 | | conflict with d |
|
1915 | | conflict with d | |
1894 | | |
|
1916 | | | |
1895 | o 4:dafd40200f93 test |
|
1917 | o 4:dafd40200f93 test | |
1896 | | f |
|
1918 | | f | |
1897 | | |
|
1919 | | | |
1898 | | @ 3:055a42cdd887 test |
|
1920 | | @ 3:055a42cdd887 test | |
1899 | | | d |
|
1921 | | | d | |
1900 | | | |
|
1922 | | | | |
1901 | | o 2:177f92b77385 test |
|
1923 | | o 2:177f92b77385 test | |
1902 | | | c |
|
1924 | | | c | |
1903 | | | |
|
1925 | | | | |
1904 | | o 1:d2ae7f538514 test |
|
1926 | | o 1:d2ae7f538514 test | |
1905 | |/ b |
|
1927 | |/ b | |
1906 | | |
|
1928 | | | |
1907 | o 0:cb9a9f314b8b test |
|
1929 | o 0:cb9a9f314b8b test | |
1908 | a |
|
1930 | a | |
1909 |
|
1931 | |||
1910 | $ hg rebase -s 1 -d 5 |
|
1932 | $ hg rebase -s 1 -d 5 | |
1911 | rebasing 1:d2ae7f538514 "b" |
|
1933 | rebasing 1:d2ae7f538514 "b" | |
1912 | rebasing 2:177f92b77385 "c" |
|
1934 | rebasing 2:177f92b77385 "c" | |
1913 | rebasing 3:055a42cdd887 "d" |
|
1935 | rebasing 3:055a42cdd887 "d" | |
1914 | merging d |
|
1936 | merging d | |
1915 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1937 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1916 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1938 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1917 | [1] |
|
1939 | [1] | |
1918 | $ hg rebase --stop |
|
1940 | $ hg rebase --stop | |
1919 | abort: cannot remove original changesets with unrebased descendants |
|
1941 | abort: cannot remove original changesets with unrebased descendants | |
1920 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) |
|
1942 | (either enable obsmarkers to allow unstable revisions or use --keep to keep original changesets) | |
1921 | [255] |
|
1943 | [255] | |
1922 | $ hg rebase --abort |
|
1944 | $ hg rebase --abort | |
1923 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
1945 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
1924 | rebase aborted |
|
1946 | rebase aborted | |
1925 |
|
1947 | |||
1926 | Test --stop when --keep is passed: |
|
1948 | Test --stop when --keep is passed: | |
1927 | ================================== |
|
1949 | ================================== | |
1928 | $ hg rebase -s 1 -d 5 --keep |
|
1950 | $ hg rebase -s 1 -d 5 --keep | |
1929 | rebasing 1:d2ae7f538514 "b" |
|
1951 | rebasing 1:d2ae7f538514 "b" | |
1930 | rebasing 2:177f92b77385 "c" |
|
1952 | rebasing 2:177f92b77385 "c" | |
1931 | rebasing 3:055a42cdd887 "d" |
|
1953 | rebasing 3:055a42cdd887 "d" | |
1932 | merging d |
|
1954 | merging d | |
1933 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
1955 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1934 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
1956 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1935 | [1] |
|
1957 | [1] | |
1936 | $ hg rebase --stop |
|
1958 | $ hg rebase --stop | |
1937 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1959 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1938 | o 7:7fffad344617 test |
|
1960 | o 7:7fffad344617 test | |
1939 | | c |
|
1961 | | c | |
1940 | | |
|
1962 | | | |
1941 | o 6:b15528633407 test |
|
1963 | o 6:b15528633407 test | |
1942 | | b |
|
1964 | | b | |
1943 | | |
|
1965 | | | |
1944 | o 5:00bfc9898aeb test |
|
1966 | o 5:00bfc9898aeb test | |
1945 | | conflict with d |
|
1967 | | conflict with d | |
1946 | | |
|
1968 | | | |
1947 | o 4:dafd40200f93 test |
|
1969 | o 4:dafd40200f93 test | |
1948 | | f |
|
1970 | | f | |
1949 | | |
|
1971 | | | |
1950 | | @ 3:055a42cdd887 test |
|
1972 | | @ 3:055a42cdd887 test | |
1951 | | | d |
|
1973 | | | d | |
1952 | | | |
|
1974 | | | | |
1953 | | o 2:177f92b77385 test |
|
1975 | | o 2:177f92b77385 test | |
1954 | | | c |
|
1976 | | | c | |
1955 | | | |
|
1977 | | | | |
1956 | | o 1:d2ae7f538514 test |
|
1978 | | o 1:d2ae7f538514 test | |
1957 | |/ b |
|
1979 | |/ b | |
1958 | | |
|
1980 | | | |
1959 | o 0:cb9a9f314b8b test |
|
1981 | o 0:cb9a9f314b8b test | |
1960 | a |
|
1982 | a | |
1961 |
|
1983 | |||
1962 | Test --stop aborts when --collapse was passed: |
|
1984 | Test --stop aborts when --collapse was passed: | |
1963 | ============================================= |
|
1985 | ============================================= | |
1964 | $ cat >> $HGRCPATH << EOF |
|
1986 | $ cat >> $HGRCPATH << EOF | |
1965 | > [experimental] |
|
1987 | > [experimental] | |
1966 | > evolution.allowunstable=True |
|
1988 | > evolution.allowunstable=True | |
1967 | > EOF |
|
1989 | > EOF | |
1968 |
|
1990 | |||
1969 | $ hg strip 6 |
|
1991 | $ hg strip 6 | |
1970 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg |
|
1992 | saved backup bundle to $TESTTMP/rbstop/.hg/strip-backup/b15528633407-6eb72b6f-backup.hg | |
1971 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
1993 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
1972 | o 5:00bfc9898aeb test |
|
1994 | o 5:00bfc9898aeb test | |
1973 | | conflict with d |
|
1995 | | conflict with d | |
1974 | | |
|
1996 | | | |
1975 | o 4:dafd40200f93 test |
|
1997 | o 4:dafd40200f93 test | |
1976 | | f |
|
1998 | | f | |
1977 | | |
|
1999 | | | |
1978 | | @ 3:055a42cdd887 test |
|
2000 | | @ 3:055a42cdd887 test | |
1979 | | | d |
|
2001 | | | d | |
1980 | | | |
|
2002 | | | | |
1981 | | o 2:177f92b77385 test |
|
2003 | | o 2:177f92b77385 test | |
1982 | | | c |
|
2004 | | | c | |
1983 | | | |
|
2005 | | | | |
1984 | | o 1:d2ae7f538514 test |
|
2006 | | o 1:d2ae7f538514 test | |
1985 | |/ b |
|
2007 | |/ b | |
1986 | | |
|
2008 | | | |
1987 | o 0:cb9a9f314b8b test |
|
2009 | o 0:cb9a9f314b8b test | |
1988 | a |
|
2010 | a | |
1989 |
|
2011 | |||
1990 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" |
|
2012 | $ hg rebase -s 1 -d 5 --collapse -m "collapsed b c d" | |
1991 | rebasing 1:d2ae7f538514 "b" |
|
2013 | rebasing 1:d2ae7f538514 "b" | |
1992 | rebasing 2:177f92b77385 "c" |
|
2014 | rebasing 2:177f92b77385 "c" | |
1993 | rebasing 3:055a42cdd887 "d" |
|
2015 | rebasing 3:055a42cdd887 "d" | |
1994 | merging d |
|
2016 | merging d | |
1995 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2017 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
1996 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
2018 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
1997 | [1] |
|
2019 | [1] | |
1998 | $ hg rebase --stop |
|
2020 | $ hg rebase --stop | |
1999 | abort: cannot stop in --collapse session |
|
2021 | abort: cannot stop in --collapse session | |
2000 | [255] |
|
2022 | [255] | |
2001 | $ hg rebase --abort |
|
2023 | $ hg rebase --abort | |
2002 | rebase aborted |
|
2024 | rebase aborted | |
2003 | $ hg diff |
|
2025 | $ hg diff | |
2004 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" |
|
2026 | $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" | |
2005 | o 5:00bfc9898aeb test |
|
2027 | o 5:00bfc9898aeb test | |
2006 | | conflict with d |
|
2028 | | conflict with d | |
2007 | | |
|
2029 | | | |
2008 | o 4:dafd40200f93 test |
|
2030 | o 4:dafd40200f93 test | |
2009 | | f |
|
2031 | | f | |
2010 | | |
|
2032 | | | |
2011 | | @ 3:055a42cdd887 test |
|
2033 | | @ 3:055a42cdd887 test | |
2012 | | | d |
|
2034 | | | d | |
2013 | | | |
|
2035 | | | | |
2014 | | o 2:177f92b77385 test |
|
2036 | | o 2:177f92b77385 test | |
2015 | | | c |
|
2037 | | | c | |
2016 | | | |
|
2038 | | | | |
2017 | | o 1:d2ae7f538514 test |
|
2039 | | o 1:d2ae7f538514 test | |
2018 | |/ b |
|
2040 | |/ b | |
2019 | | |
|
2041 | | | |
2020 | o 0:cb9a9f314b8b test |
|
2042 | o 0:cb9a9f314b8b test | |
2021 | a |
|
2043 | a | |
2022 |
|
2044 | |||
2023 | Test --stop raise errors with conflicting options: |
|
2045 | Test --stop raise errors with conflicting options: | |
2024 | ================================================= |
|
2046 | ================================================= | |
2025 | $ hg rebase -s 3 -d 5 |
|
2047 | $ hg rebase -s 3 -d 5 | |
2026 | rebasing 3:055a42cdd887 "d" |
|
2048 | rebasing 3:055a42cdd887 "d" | |
2027 | merging d |
|
2049 | merging d | |
2028 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2050 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
2029 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
2051 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
2030 | [1] |
|
2052 | [1] | |
2031 | $ hg rebase --stop --dry-run |
|
2053 | $ hg rebase --stop --dry-run | |
2032 | abort: cannot specify both --dry-run and --stop |
|
2054 | abort: cannot specify both --dry-run and --stop | |
2033 | [255] |
|
2055 | [255] | |
2034 |
|
2056 | |||
2035 | $ hg rebase -s 3 -d 5 |
|
2057 | $ hg rebase -s 3 -d 5 | |
2036 | abort: rebase in progress |
|
2058 | abort: rebase in progress | |
2037 | (use 'hg rebase --continue' or 'hg rebase --abort') |
|
2059 | (use 'hg rebase --continue' or 'hg rebase --abort') | |
2038 | [255] |
|
2060 | [255] | |
2039 | $ hg rebase --stop --continue |
|
2061 | $ hg rebase --stop --continue | |
2040 | abort: cannot use --stop with --continue |
|
2062 | abort: cannot use --stop with --continue | |
2041 | [255] |
|
2063 | [255] | |
2042 |
|
2064 | |||
2043 | Test --stop moves bookmarks of original revisions to new rebased nodes: |
|
2065 | Test --stop moves bookmarks of original revisions to new rebased nodes: | |
2044 | ====================================================================== |
|
2066 | ====================================================================== | |
2045 | $ cd .. |
|
2067 | $ cd .. | |
2046 | $ hg init repo |
|
2068 | $ hg init repo | |
2047 | $ cd repo |
|
2069 | $ cd repo | |
2048 |
|
2070 | |||
2049 | $ echo a > a |
|
2071 | $ echo a > a | |
2050 | $ hg ci -Am A |
|
2072 | $ hg ci -Am A | |
2051 | adding a |
|
2073 | adding a | |
2052 |
|
2074 | |||
2053 | $ echo b > b |
|
2075 | $ echo b > b | |
2054 | $ hg ci -Am B |
|
2076 | $ hg ci -Am B | |
2055 | adding b |
|
2077 | adding b | |
2056 | $ hg book X |
|
2078 | $ hg book X | |
2057 | $ hg book Y |
|
2079 | $ hg book Y | |
2058 |
|
2080 | |||
2059 | $ echo c > c |
|
2081 | $ echo c > c | |
2060 | $ hg ci -Am C |
|
2082 | $ hg ci -Am C | |
2061 | adding c |
|
2083 | adding c | |
2062 | $ hg book Z |
|
2084 | $ hg book Z | |
2063 |
|
2085 | |||
2064 | $ echo d > d |
|
2086 | $ echo d > d | |
2065 | $ hg ci -Am D |
|
2087 | $ hg ci -Am D | |
2066 | adding d |
|
2088 | adding d | |
2067 |
|
2089 | |||
2068 | $ hg up 0 -q |
|
2090 | $ hg up 0 -q | |
2069 | $ echo e > e |
|
2091 | $ echo e > e | |
2070 | $ hg ci -Am E |
|
2092 | $ hg ci -Am E | |
2071 | adding e |
|
2093 | adding e | |
2072 | created new head |
|
2094 | created new head | |
2073 |
|
2095 | |||
2074 | $ echo doubt > d |
|
2096 | $ echo doubt > d | |
2075 | $ hg ci -Am "conflict with d" |
|
2097 | $ hg ci -Am "conflict with d" | |
2076 | adding d |
|
2098 | adding d | |
2077 |
|
2099 | |||
2078 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
2100 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
2079 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
2101 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
2080 | | |
|
2102 | | | |
2081 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
2103 | o 4: 9c1e55f411b6 'E' bookmarks: | |
2082 | | |
|
2104 | | | |
2083 | | o 3: 67a385d4e6f2 'D' bookmarks: Z |
|
2105 | | o 3: 67a385d4e6f2 'D' bookmarks: Z | |
2084 | | | |
|
2106 | | | | |
2085 | | o 2: 49cb3485fa0c 'C' bookmarks: Y |
|
2107 | | o 2: 49cb3485fa0c 'C' bookmarks: Y | |
2086 | | | |
|
2108 | | | | |
2087 | | o 1: 6c81ed0049f8 'B' bookmarks: X |
|
2109 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
2088 | |/ |
|
2110 | |/ | |
2089 | o 0: 1994f17a630e 'A' bookmarks: |
|
2111 | o 0: 1994f17a630e 'A' bookmarks: | |
2090 |
|
2112 | |||
2091 | $ hg rebase -s 1 -d 5 |
|
2113 | $ hg rebase -s 1 -d 5 | |
2092 | rebasing 1:6c81ed0049f8 "B" (X) |
|
2114 | rebasing 1:6c81ed0049f8 "B" (X) | |
2093 | rebasing 2:49cb3485fa0c "C" (Y) |
|
2115 | rebasing 2:49cb3485fa0c "C" (Y) | |
2094 | rebasing 3:67a385d4e6f2 "D" (Z) |
|
2116 | rebasing 3:67a385d4e6f2 "D" (Z) | |
2095 | merging d |
|
2117 | merging d | |
2096 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
|
2118 | warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | |
2097 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
2119 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
2098 | [1] |
|
2120 | [1] | |
2099 | $ hg rebase --stop |
|
2121 | $ hg rebase --stop | |
2100 | 1 new orphan changesets |
|
2122 | 1 new orphan changesets | |
2101 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" |
|
2123 | $ hg log -GT "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
2102 | o 7: 9c86c650b686 'C' bookmarks: Y |
|
2124 | o 7: 9c86c650b686 'C' bookmarks: Y | |
2103 | | |
|
2125 | | | |
2104 | o 6: 9b87b54e5fd8 'B' bookmarks: X |
|
2126 | o 6: 9b87b54e5fd8 'B' bookmarks: X | |
2105 | | |
|
2127 | | | |
2106 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: |
|
2128 | @ 5: 39adf30bc1be 'conflict with d' bookmarks: | |
2107 | | |
|
2129 | | | |
2108 | o 4: 9c1e55f411b6 'E' bookmarks: |
|
2130 | o 4: 9c1e55f411b6 'E' bookmarks: | |
2109 | | |
|
2131 | | | |
2110 | | * 3: 67a385d4e6f2 'D' bookmarks: Z |
|
2132 | | * 3: 67a385d4e6f2 'D' bookmarks: Z | |
2111 | | | |
|
2133 | | | | |
2112 | | x 2: 49cb3485fa0c 'C' bookmarks: |
|
2134 | | x 2: 49cb3485fa0c 'C' bookmarks: | |
2113 | | | |
|
2135 | | | | |
2114 | | x 1: 6c81ed0049f8 'B' bookmarks: |
|
2136 | | x 1: 6c81ed0049f8 'B' bookmarks: | |
2115 | |/ |
|
2137 | |/ | |
2116 | o 0: 1994f17a630e 'A' bookmarks: |
|
2138 | o 0: 1994f17a630e 'A' bookmarks: | |
2117 |
|
2139 |
General Comments 0
You need to be logged in to leave comments.
Login now