Show More
@@ -1,951 +1,964 b'' | |||
|
1 | 1 | ========================== |
|
2 | 2 | Test rebase with obsolete |
|
3 | 3 | ========================== |
|
4 | 4 | |
|
5 | 5 | Enable obsolete |
|
6 | 6 | |
|
7 | 7 | $ cat >> $HGRCPATH << EOF |
|
8 | 8 | > [ui] |
|
9 | 9 | > logtemplate= {rev}:{node|short} {desc|firstline} |
|
10 | 10 | > [experimental] |
|
11 | 11 | > evolution=createmarkers,allowunstable |
|
12 | 12 | > [phases] |
|
13 | 13 | > publish=False |
|
14 | 14 | > [extensions] |
|
15 | 15 | > rebase= |
|
16 | 16 | > EOF |
|
17 | 17 | |
|
18 | 18 | Setup rebase canonical repo |
|
19 | 19 | |
|
20 | 20 | $ hg init base |
|
21 | 21 | $ cd base |
|
22 | 22 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
23 | 23 | adding changesets |
|
24 | 24 | adding manifests |
|
25 | 25 | adding file changes |
|
26 | 26 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
27 | 27 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
28 | 28 | $ hg up tip |
|
29 | 29 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 30 | $ hg log -G |
|
31 | 31 | @ 7:02de42196ebe H |
|
32 | 32 | | |
|
33 | 33 | | o 6:eea13746799a G |
|
34 | 34 | |/| |
|
35 | 35 | o | 5:24b6387c8c8c F |
|
36 | 36 | | | |
|
37 | 37 | | o 4:9520eea781bc E |
|
38 | 38 | |/ |
|
39 | 39 | | o 3:32af7686d403 D |
|
40 | 40 | | | |
|
41 | 41 | | o 2:5fddd98957c8 C |
|
42 | 42 | | | |
|
43 | 43 | | o 1:42ccdea3bb16 B |
|
44 | 44 | |/ |
|
45 | 45 | o 0:cd010b8cd998 A |
|
46 | 46 | |
|
47 | 47 | $ cd .. |
|
48 | 48 | |
|
49 | 49 | simple rebase |
|
50 | 50 | --------------------------------- |
|
51 | 51 | |
|
52 | 52 | $ hg clone base simple |
|
53 | 53 | updating to branch default |
|
54 | 54 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 55 | $ cd simple |
|
56 | 56 | $ hg up 32af7686d403 |
|
57 | 57 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
58 | 58 | $ hg rebase -d eea13746799a |
|
59 | 59 | rebasing 1:42ccdea3bb16 "B" |
|
60 | 60 | rebasing 2:5fddd98957c8 "C" |
|
61 | 61 | rebasing 3:32af7686d403 "D" |
|
62 | 62 | $ hg log -G |
|
63 | 63 | @ 10:8eeb3c33ad33 D |
|
64 | 64 | | |
|
65 | 65 | o 9:2327fea05063 C |
|
66 | 66 | | |
|
67 | 67 | o 8:e4e5be0395b2 B |
|
68 | 68 | | |
|
69 | 69 | | o 7:02de42196ebe H |
|
70 | 70 | | | |
|
71 | 71 | o | 6:eea13746799a G |
|
72 | 72 | |\| |
|
73 | 73 | | o 5:24b6387c8c8c F |
|
74 | 74 | | | |
|
75 | 75 | o | 4:9520eea781bc E |
|
76 | 76 | |/ |
|
77 | 77 | o 0:cd010b8cd998 A |
|
78 | 78 | |
|
79 | 79 | $ hg log --hidden -G |
|
80 | 80 | @ 10:8eeb3c33ad33 D |
|
81 | 81 | | |
|
82 | 82 | o 9:2327fea05063 C |
|
83 | 83 | | |
|
84 | 84 | o 8:e4e5be0395b2 B |
|
85 | 85 | | |
|
86 | 86 | | o 7:02de42196ebe H |
|
87 | 87 | | | |
|
88 | 88 | o | 6:eea13746799a G |
|
89 | 89 | |\| |
|
90 | 90 | | o 5:24b6387c8c8c F |
|
91 | 91 | | | |
|
92 | 92 | o | 4:9520eea781bc E |
|
93 | 93 | |/ |
|
94 | 94 | | x 3:32af7686d403 D |
|
95 | 95 | | | |
|
96 | 96 | | x 2:5fddd98957c8 C |
|
97 | 97 | | | |
|
98 | 98 | | x 1:42ccdea3bb16 B |
|
99 | 99 | |/ |
|
100 | 100 | o 0:cd010b8cd998 A |
|
101 | 101 | |
|
102 | 102 | $ hg debugobsolete |
|
103 | 103 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 e4e5be0395b2cbd471ed22a26b1b6a1a0658a794 0 (*) {'user': 'test'} (glob) |
|
104 | 104 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 2327fea05063f39961b14cb69435a9898dc9a245 0 (*) {'user': 'test'} (glob) |
|
105 | 105 | 32af7686d403cf45b5d95f2d70cebea587ac806a 8eeb3c33ad33d452c89e5dcf611c347f978fb42b 0 (*) {'user': 'test'} (glob) |
|
106 | 106 | |
|
107 | 107 | |
|
108 | 108 | $ cd .. |
|
109 | 109 | |
|
110 | 110 | empty changeset |
|
111 | 111 | --------------------------------- |
|
112 | 112 | |
|
113 | 113 | $ hg clone base empty |
|
114 | 114 | updating to branch default |
|
115 | 115 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 116 | $ cd empty |
|
117 | 117 | $ hg up eea13746799a |
|
118 | 118 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
119 | 119 | |
|
120 | 120 | We make a copy of both the first changeset in the rebased and some other in the |
|
121 | 121 | set. |
|
122 | 122 | |
|
123 | 123 | $ hg graft 42ccdea3bb16 32af7686d403 |
|
124 | 124 | grafting 1:42ccdea3bb16 "B" |
|
125 | 125 | grafting 3:32af7686d403 "D" |
|
126 | 126 | $ hg rebase -s 42ccdea3bb16 -d . |
|
127 | 127 | rebasing 1:42ccdea3bb16 "B" |
|
128 | 128 | note: rebase of 1:42ccdea3bb16 created no changes to commit |
|
129 | 129 | rebasing 2:5fddd98957c8 "C" |
|
130 | 130 | rebasing 3:32af7686d403 "D" |
|
131 | 131 | note: rebase of 3:32af7686d403 created no changes to commit |
|
132 | 132 | $ hg log -G |
|
133 | 133 | o 10:5ae4c968c6ac C |
|
134 | 134 | | |
|
135 | 135 | @ 9:08483444fef9 D |
|
136 | 136 | | |
|
137 | 137 | o 8:8877864f1edb B |
|
138 | 138 | | |
|
139 | 139 | | o 7:02de42196ebe H |
|
140 | 140 | | | |
|
141 | 141 | o | 6:eea13746799a G |
|
142 | 142 | |\| |
|
143 | 143 | | o 5:24b6387c8c8c F |
|
144 | 144 | | | |
|
145 | 145 | o | 4:9520eea781bc E |
|
146 | 146 | |/ |
|
147 | 147 | o 0:cd010b8cd998 A |
|
148 | 148 | |
|
149 | 149 | $ hg log --hidden -G |
|
150 | 150 | o 10:5ae4c968c6ac C |
|
151 | 151 | | |
|
152 | 152 | @ 9:08483444fef9 D |
|
153 | 153 | | |
|
154 | 154 | o 8:8877864f1edb B |
|
155 | 155 | | |
|
156 | 156 | | o 7:02de42196ebe H |
|
157 | 157 | | | |
|
158 | 158 | o | 6:eea13746799a G |
|
159 | 159 | |\| |
|
160 | 160 | | o 5:24b6387c8c8c F |
|
161 | 161 | | | |
|
162 | 162 | o | 4:9520eea781bc E |
|
163 | 163 | |/ |
|
164 | 164 | | x 3:32af7686d403 D |
|
165 | 165 | | | |
|
166 | 166 | | x 2:5fddd98957c8 C |
|
167 | 167 | | | |
|
168 | 168 | | x 1:42ccdea3bb16 B |
|
169 | 169 | |/ |
|
170 | 170 | o 0:cd010b8cd998 A |
|
171 | 171 | |
|
172 | 172 | $ hg debugobsolete |
|
173 | 173 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) |
|
174 | 174 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (*) {'user': 'test'} (glob) |
|
175 | 175 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob) |
|
176 | 176 | |
|
177 | 177 | |
|
178 | More complex case were part of the rebase set were already rebased | |
|
178 | More complex case where part of the rebase set were already rebased | |
|
179 | 179 | |
|
180 | 180 | $ hg rebase --rev 'desc(D)' --dest 'desc(H)' |
|
181 | 181 | rebasing 9:08483444fef9 "D" |
|
182 | 182 | $ hg debugobsolete |
|
183 | 183 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) |
|
184 | 184 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (*) {'user': 'test'} (glob) |
|
185 | 185 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob) |
|
186 | 186 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (*) {'user': 'test'} (glob) |
|
187 | 187 | $ hg log -G |
|
188 | 188 | @ 11:4596109a6a43 D |
|
189 | 189 | | |
|
190 | 190 | | o 10:5ae4c968c6ac C |
|
191 | 191 | | | |
|
192 | 192 | | x 9:08483444fef9 D |
|
193 | 193 | | | |
|
194 | 194 | | o 8:8877864f1edb B |
|
195 | 195 | | | |
|
196 | 196 | o | 7:02de42196ebe H |
|
197 | 197 | | | |
|
198 | 198 | | o 6:eea13746799a G |
|
199 | 199 | |/| |
|
200 | 200 | o | 5:24b6387c8c8c F |
|
201 | 201 | | | |
|
202 | 202 | | o 4:9520eea781bc E |
|
203 | 203 | |/ |
|
204 | 204 | o 0:cd010b8cd998 A |
|
205 | 205 | |
|
206 | 206 | $ hg rebase --source 'desc(B)' --dest 'tip' --config experimental.rebaseskipobsolete=True |
|
207 | 207 | rebasing 8:8877864f1edb "B" |
|
208 | 208 | note: not rebasing 9:08483444fef9 "D", already in destination as 11:4596109a6a43 "D" |
|
209 | 209 | rebasing 10:5ae4c968c6ac "C" |
|
210 | 210 | $ hg debugobsolete |
|
211 | 211 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) |
|
212 | 212 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (*) {'user': 'test'} (glob) |
|
213 | 213 | 32af7686d403cf45b5d95f2d70cebea587ac806a 0 {5fddd98957c8a54a4d436dfe1da9d87f21a1b97b} (*) {'user': 'test'} (glob) |
|
214 | 214 | 08483444fef91d6224f6655ee586a65d263ad34c 4596109a6a4328c398bde3a4a3b6737cfade3003 0 (*) {'user': 'test'} (glob) |
|
215 | 215 | 8877864f1edb05d0e07dc4ba77b67a80a7b86672 462a34d07e599b87ea08676a449373fe4e2e1347 0 (*) {'user': 'test'} (glob) |
|
216 | 216 | 5ae4c968c6aca831df823664e706c9d4aa34473d 98f6af4ee9539e14da4465128f894c274900b6e5 0 (*) {'user': 'test'} (glob) |
|
217 | 217 | $ hg log --rev 'divergent()' |
|
218 | 218 | $ hg log -G |
|
219 | 219 | o 13:98f6af4ee953 C |
|
220 | 220 | | |
|
221 | 221 | o 12:462a34d07e59 B |
|
222 | 222 | | |
|
223 | 223 | @ 11:4596109a6a43 D |
|
224 | 224 | | |
|
225 | 225 | o 7:02de42196ebe H |
|
226 | 226 | | |
|
227 | 227 | | o 6:eea13746799a G |
|
228 | 228 | |/| |
|
229 | 229 | o | 5:24b6387c8c8c F |
|
230 | 230 | | | |
|
231 | 231 | | o 4:9520eea781bc E |
|
232 | 232 | |/ |
|
233 | 233 | o 0:cd010b8cd998 A |
|
234 | 234 | |
|
235 | 235 | $ hg log --style default --debug -r 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
236 | 236 | changeset: 11:4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
237 | 237 | phase: draft |
|
238 | 238 | parent: 7:02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
239 | 239 | parent: -1:0000000000000000000000000000000000000000 |
|
240 | 240 | manifest: 11:a91006e3a02f1edf631f7018e6e5684cf27dd905 |
|
241 | 241 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
242 | 242 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
243 | 243 | files+: D |
|
244 | 244 | extra: branch=default |
|
245 | 245 | extra: rebase_source=08483444fef91d6224f6655ee586a65d263ad34c |
|
246 | 246 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
247 | 247 | description: |
|
248 | 248 | D |
|
249 | 249 | |
|
250 | 250 | |
|
251 | 251 | $ hg up -qr 'desc(G)' |
|
252 | 252 | $ hg graft 4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
253 | 253 | grafting 11:4596109a6a43 "D" |
|
254 | 254 | $ hg up -qr 'desc(E)' |
|
255 | 255 | $ hg rebase -s tip -d . |
|
256 | 256 | rebasing 14:9e36056a46e3 "D" (tip) |
|
257 | 257 | $ hg log --style default --debug -r tip |
|
258 | 258 | changeset: 15:627d4614809036ba22b9e7cb31638ddc06ab99ab |
|
259 | 259 | tag: tip |
|
260 | 260 | phase: draft |
|
261 | 261 | parent: 4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
262 | 262 | parent: -1:0000000000000000000000000000000000000000 |
|
263 | 263 | manifest: 15:648e8ede73ae3e497d093d3a4c8fcc2daa864f42 |
|
264 | 264 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
265 | 265 | date: Sat Apr 30 15:24:48 2011 +0200 |
|
266 | 266 | files+: D |
|
267 | 267 | extra: branch=default |
|
268 | 268 | extra: intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003 |
|
269 | 269 | extra: rebase_source=9e36056a46e37c9776168c7375734eebc70e294f |
|
270 | 270 | extra: source=32af7686d403cf45b5d95f2d70cebea587ac806a |
|
271 | 271 | description: |
|
272 | 272 | D |
|
273 | 273 | |
|
274 | 274 | |
|
275 | Start rebase from a commit that is obsolete but not hidden only because it's | |
|
276 | a working copy parent. We should be moved back to the starting commit as usual | |
|
277 | even though it is hidden (until we're moved there). | |
|
278 | ||
|
279 | $ hg --hidden up -qr 'first(hidden())' | |
|
280 | $ hg rebase --rev 13 --dest 15 | |
|
281 | rebasing 13:98f6af4ee953 "C" | |
|
282 | transaction abort! | |
|
283 | rollback completed | |
|
284 | abort: hidden revision '1'! | |
|
285 | (use --hidden to access hidden revisions) | |
|
286 | [255] | |
|
287 | ||
|
275 | 288 | $ cd .. |
|
276 | 289 | |
|
277 | 290 | collapse rebase |
|
278 | 291 | --------------------------------- |
|
279 | 292 | |
|
280 | 293 | $ hg clone base collapse |
|
281 | 294 | updating to branch default |
|
282 | 295 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
283 | 296 | $ cd collapse |
|
284 | 297 | $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse |
|
285 | 298 | rebasing 1:42ccdea3bb16 "B" |
|
286 | 299 | rebasing 2:5fddd98957c8 "C" |
|
287 | 300 | rebasing 3:32af7686d403 "D" |
|
288 | 301 | $ hg log -G |
|
289 | 302 | o 8:4dc2197e807b Collapsed revision |
|
290 | 303 | | |
|
291 | 304 | | @ 7:02de42196ebe H |
|
292 | 305 | | | |
|
293 | 306 | o | 6:eea13746799a G |
|
294 | 307 | |\| |
|
295 | 308 | | o 5:24b6387c8c8c F |
|
296 | 309 | | | |
|
297 | 310 | o | 4:9520eea781bc E |
|
298 | 311 | |/ |
|
299 | 312 | o 0:cd010b8cd998 A |
|
300 | 313 | |
|
301 | 314 | $ hg log --hidden -G |
|
302 | 315 | o 8:4dc2197e807b Collapsed revision |
|
303 | 316 | | |
|
304 | 317 | | @ 7:02de42196ebe H |
|
305 | 318 | | | |
|
306 | 319 | o | 6:eea13746799a G |
|
307 | 320 | |\| |
|
308 | 321 | | o 5:24b6387c8c8c F |
|
309 | 322 | | | |
|
310 | 323 | o | 4:9520eea781bc E |
|
311 | 324 | |/ |
|
312 | 325 | | x 3:32af7686d403 D |
|
313 | 326 | | | |
|
314 | 327 | | x 2:5fddd98957c8 C |
|
315 | 328 | | | |
|
316 | 329 | | x 1:42ccdea3bb16 B |
|
317 | 330 | |/ |
|
318 | 331 | o 0:cd010b8cd998 A |
|
319 | 332 | |
|
320 | 333 | $ hg id --debug -r tip |
|
321 | 334 | 4dc2197e807bae9817f09905b50ab288be2dbbcf tip |
|
322 | 335 | $ hg debugobsolete |
|
323 | 336 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (*) {'user': 'test'} (glob) |
|
324 | 337 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (*) {'user': 'test'} (glob) |
|
325 | 338 | 32af7686d403cf45b5d95f2d70cebea587ac806a 4dc2197e807bae9817f09905b50ab288be2dbbcf 0 (*) {'user': 'test'} (glob) |
|
326 | 339 | |
|
327 | 340 | $ cd .. |
|
328 | 341 | |
|
329 | 342 | Rebase set has hidden descendants |
|
330 | 343 | --------------------------------- |
|
331 | 344 | |
|
332 | 345 | We rebase a changeset which has a hidden changeset. The hidden changeset must |
|
333 | 346 | not be rebased. |
|
334 | 347 | |
|
335 | 348 | $ hg clone base hidden |
|
336 | 349 | updating to branch default |
|
337 | 350 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
338 | 351 | $ cd hidden |
|
339 | 352 | $ hg rebase -s 5fddd98957c8 -d eea13746799a |
|
340 | 353 | rebasing 2:5fddd98957c8 "C" |
|
341 | 354 | rebasing 3:32af7686d403 "D" |
|
342 | 355 | $ hg rebase -s 42ccdea3bb16 -d 02de42196ebe |
|
343 | 356 | rebasing 1:42ccdea3bb16 "B" |
|
344 | 357 | $ hg log -G |
|
345 | 358 | o 10:7c6027df6a99 B |
|
346 | 359 | | |
|
347 | 360 | | o 9:cf44d2f5a9f4 D |
|
348 | 361 | | | |
|
349 | 362 | | o 8:e273c5e7d2d2 C |
|
350 | 363 | | | |
|
351 | 364 | @ | 7:02de42196ebe H |
|
352 | 365 | | | |
|
353 | 366 | | o 6:eea13746799a G |
|
354 | 367 | |/| |
|
355 | 368 | o | 5:24b6387c8c8c F |
|
356 | 369 | | | |
|
357 | 370 | | o 4:9520eea781bc E |
|
358 | 371 | |/ |
|
359 | 372 | o 0:cd010b8cd998 A |
|
360 | 373 | |
|
361 | 374 | $ hg log --hidden -G |
|
362 | 375 | o 10:7c6027df6a99 B |
|
363 | 376 | | |
|
364 | 377 | | o 9:cf44d2f5a9f4 D |
|
365 | 378 | | | |
|
366 | 379 | | o 8:e273c5e7d2d2 C |
|
367 | 380 | | | |
|
368 | 381 | @ | 7:02de42196ebe H |
|
369 | 382 | | | |
|
370 | 383 | | o 6:eea13746799a G |
|
371 | 384 | |/| |
|
372 | 385 | o | 5:24b6387c8c8c F |
|
373 | 386 | | | |
|
374 | 387 | | o 4:9520eea781bc E |
|
375 | 388 | |/ |
|
376 | 389 | | x 3:32af7686d403 D |
|
377 | 390 | | | |
|
378 | 391 | | x 2:5fddd98957c8 C |
|
379 | 392 | | | |
|
380 | 393 | | x 1:42ccdea3bb16 B |
|
381 | 394 | |/ |
|
382 | 395 | o 0:cd010b8cd998 A |
|
383 | 396 | |
|
384 | 397 | $ hg debugobsolete |
|
385 | 398 | 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b e273c5e7d2d29df783dce9f9eaa3ac4adc69c15d 0 (*) {'user': 'test'} (glob) |
|
386 | 399 | 32af7686d403cf45b5d95f2d70cebea587ac806a cf44d2f5a9f4297a62be94cbdd3dff7c7dc54258 0 (*) {'user': 'test'} (glob) |
|
387 | 400 | 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 7c6027df6a99d93f461868e5433f63bde20b6dfb 0 (*) {'user': 'test'} (glob) |
|
388 | 401 | |
|
389 | 402 | Test that rewriting leaving instability behind is allowed |
|
390 | 403 | --------------------------------------------------------------------- |
|
391 | 404 | |
|
392 | 405 | $ hg log -r 'children(8)' |
|
393 | 406 | 9:cf44d2f5a9f4 D (no-eol) |
|
394 | 407 | $ hg rebase -r 8 |
|
395 | 408 | rebasing 8:e273c5e7d2d2 "C" |
|
396 | 409 | $ hg log -G |
|
397 | 410 | o 11:0d8f238b634c C |
|
398 | 411 | | |
|
399 | 412 | o 10:7c6027df6a99 B |
|
400 | 413 | | |
|
401 | 414 | | o 9:cf44d2f5a9f4 D |
|
402 | 415 | | | |
|
403 | 416 | | x 8:e273c5e7d2d2 C |
|
404 | 417 | | | |
|
405 | 418 | @ | 7:02de42196ebe H |
|
406 | 419 | | | |
|
407 | 420 | | o 6:eea13746799a G |
|
408 | 421 | |/| |
|
409 | 422 | o | 5:24b6387c8c8c F |
|
410 | 423 | | | |
|
411 | 424 | | o 4:9520eea781bc E |
|
412 | 425 | |/ |
|
413 | 426 | o 0:cd010b8cd998 A |
|
414 | 427 | |
|
415 | 428 | |
|
416 | 429 | |
|
417 | 430 | Test multiple root handling |
|
418 | 431 | ------------------------------------ |
|
419 | 432 | |
|
420 | 433 | $ hg rebase --dest 4 --rev '7+11+9' |
|
421 | 434 | rebasing 9:cf44d2f5a9f4 "D" |
|
422 | 435 | rebasing 7:02de42196ebe "H" |
|
423 | 436 | not rebasing ignored 10:7c6027df6a99 "B" |
|
424 | 437 | rebasing 11:0d8f238b634c "C" (tip) |
|
425 | 438 | $ hg log -G |
|
426 | 439 | o 14:1e8370e38cca C |
|
427 | 440 | | |
|
428 | 441 | @ 13:bfe264faf697 H |
|
429 | 442 | | |
|
430 | 443 | | o 12:102b4c1d889b D |
|
431 | 444 | |/ |
|
432 | 445 | | o 10:7c6027df6a99 B |
|
433 | 446 | | | |
|
434 | 447 | | x 7:02de42196ebe H |
|
435 | 448 | | | |
|
436 | 449 | +---o 6:eea13746799a G |
|
437 | 450 | | |/ |
|
438 | 451 | | o 5:24b6387c8c8c F |
|
439 | 452 | | | |
|
440 | 453 | o | 4:9520eea781bc E |
|
441 | 454 | |/ |
|
442 | 455 | o 0:cd010b8cd998 A |
|
443 | 456 | |
|
444 | 457 | $ cd .. |
|
445 | 458 | |
|
446 | 459 | test on rebase dropping a merge |
|
447 | 460 | |
|
448 | 461 | (setup) |
|
449 | 462 | |
|
450 | 463 | $ hg init dropmerge |
|
451 | 464 | $ cd dropmerge |
|
452 | 465 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
453 | 466 | adding changesets |
|
454 | 467 | adding manifests |
|
455 | 468 | adding file changes |
|
456 | 469 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
457 | 470 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
458 | 471 | $ hg up 3 |
|
459 | 472 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
460 | 473 | $ hg merge 7 |
|
461 | 474 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 475 | (branch merge, don't forget to commit) |
|
463 | 476 | $ hg ci -m 'M' |
|
464 | 477 | $ echo I > I |
|
465 | 478 | $ hg add I |
|
466 | 479 | $ hg ci -m I |
|
467 | 480 | $ hg log -G |
|
468 | 481 | @ 9:4bde274eefcf I |
|
469 | 482 | | |
|
470 | 483 | o 8:53a6a128b2b7 M |
|
471 | 484 | |\ |
|
472 | 485 | | o 7:02de42196ebe H |
|
473 | 486 | | | |
|
474 | 487 | | | o 6:eea13746799a G |
|
475 | 488 | | |/| |
|
476 | 489 | | o | 5:24b6387c8c8c F |
|
477 | 490 | | | | |
|
478 | 491 | | | o 4:9520eea781bc E |
|
479 | 492 | | |/ |
|
480 | 493 | o | 3:32af7686d403 D |
|
481 | 494 | | | |
|
482 | 495 | o | 2:5fddd98957c8 C |
|
483 | 496 | | | |
|
484 | 497 | o | 1:42ccdea3bb16 B |
|
485 | 498 | |/ |
|
486 | 499 | o 0:cd010b8cd998 A |
|
487 | 500 | |
|
488 | 501 | (actual test) |
|
489 | 502 | |
|
490 | 503 | $ hg rebase --dest 6 --rev '((desc(H) + desc(D))::) - desc(M)' |
|
491 | 504 | rebasing 3:32af7686d403 "D" |
|
492 | 505 | rebasing 7:02de42196ebe "H" |
|
493 | 506 | not rebasing ignored 8:53a6a128b2b7 "M" |
|
494 | 507 | rebasing 9:4bde274eefcf "I" (tip) |
|
495 | 508 | $ hg log -G |
|
496 | 509 | @ 12:acd174b7ab39 I |
|
497 | 510 | | |
|
498 | 511 | o 11:6c11a6218c97 H |
|
499 | 512 | | |
|
500 | 513 | | o 10:b5313c85b22e D |
|
501 | 514 | |/ |
|
502 | 515 | | o 8:53a6a128b2b7 M |
|
503 | 516 | | |\ |
|
504 | 517 | | | x 7:02de42196ebe H |
|
505 | 518 | | | | |
|
506 | 519 | o---+ 6:eea13746799a G |
|
507 | 520 | | | | |
|
508 | 521 | | | o 5:24b6387c8c8c F |
|
509 | 522 | | | | |
|
510 | 523 | o---+ 4:9520eea781bc E |
|
511 | 524 | / / |
|
512 | 525 | x | 3:32af7686d403 D |
|
513 | 526 | | | |
|
514 | 527 | o | 2:5fddd98957c8 C |
|
515 | 528 | | | |
|
516 | 529 | o | 1:42ccdea3bb16 B |
|
517 | 530 | |/ |
|
518 | 531 | o 0:cd010b8cd998 A |
|
519 | 532 | |
|
520 | 533 | |
|
521 | 534 | Test hidden changesets in the rebase set (issue4504) |
|
522 | 535 | |
|
523 | 536 | $ hg up --hidden 9 |
|
524 | 537 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
525 | 538 | $ echo J > J |
|
526 | 539 | $ hg add J |
|
527 | 540 | $ hg commit -m J |
|
528 | 541 | $ hg debugobsolete `hg log --rev . -T '{node}'` |
|
529 | 542 | |
|
530 | 543 | $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off |
|
531 | 544 | rebasing 9:4bde274eefcf "I" |
|
532 | 545 | rebasing 13:06edfc82198f "J" (tip) |
|
533 | 546 | $ hg log -G |
|
534 | 547 | @ 15:5ae8a643467b J |
|
535 | 548 | | |
|
536 | 549 | o 14:9ad579b4a5de I |
|
537 | 550 | | |
|
538 | 551 | | o 12:acd174b7ab39 I |
|
539 | 552 | | | |
|
540 | 553 | | o 11:6c11a6218c97 H |
|
541 | 554 | | | |
|
542 | 555 | o | 10:b5313c85b22e D |
|
543 | 556 | |/ |
|
544 | 557 | | o 8:53a6a128b2b7 M |
|
545 | 558 | | |\ |
|
546 | 559 | | | x 7:02de42196ebe H |
|
547 | 560 | | | | |
|
548 | 561 | o---+ 6:eea13746799a G |
|
549 | 562 | | | | |
|
550 | 563 | | | o 5:24b6387c8c8c F |
|
551 | 564 | | | | |
|
552 | 565 | o---+ 4:9520eea781bc E |
|
553 | 566 | / / |
|
554 | 567 | x | 3:32af7686d403 D |
|
555 | 568 | | | |
|
556 | 569 | o | 2:5fddd98957c8 C |
|
557 | 570 | | | |
|
558 | 571 | o | 1:42ccdea3bb16 B |
|
559 | 572 | |/ |
|
560 | 573 | o 0:cd010b8cd998 A |
|
561 | 574 | |
|
562 | 575 | $ hg up 14 -C |
|
563 | 576 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
564 | 577 | $ echo "K" > K |
|
565 | 578 | $ hg add K |
|
566 | 579 | $ hg commit --amend -m "K" |
|
567 | 580 | $ echo "L" > L |
|
568 | 581 | $ hg add L |
|
569 | 582 | $ hg commit -m "L" |
|
570 | 583 | $ hg up '.^' |
|
571 | 584 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
572 | 585 | $ echo "M" > M |
|
573 | 586 | $ hg add M |
|
574 | 587 | $ hg commit --amend -m "M" |
|
575 | 588 | $ hg log -G |
|
576 | 589 | @ 20:bfaedf8eb73b M |
|
577 | 590 | | |
|
578 | 591 | | o 18:97219452e4bd L |
|
579 | 592 | | | |
|
580 | 593 | | x 17:fc37a630c901 K |
|
581 | 594 | |/ |
|
582 | 595 | | o 15:5ae8a643467b J |
|
583 | 596 | | | |
|
584 | 597 | | x 14:9ad579b4a5de I |
|
585 | 598 | |/ |
|
586 | 599 | | o 12:acd174b7ab39 I |
|
587 | 600 | | | |
|
588 | 601 | | o 11:6c11a6218c97 H |
|
589 | 602 | | | |
|
590 | 603 | o | 10:b5313c85b22e D |
|
591 | 604 | |/ |
|
592 | 605 | | o 8:53a6a128b2b7 M |
|
593 | 606 | | |\ |
|
594 | 607 | | | x 7:02de42196ebe H |
|
595 | 608 | | | | |
|
596 | 609 | o---+ 6:eea13746799a G |
|
597 | 610 | | | | |
|
598 | 611 | | | o 5:24b6387c8c8c F |
|
599 | 612 | | | | |
|
600 | 613 | o---+ 4:9520eea781bc E |
|
601 | 614 | / / |
|
602 | 615 | x | 3:32af7686d403 D |
|
603 | 616 | | | |
|
604 | 617 | o | 2:5fddd98957c8 C |
|
605 | 618 | | | |
|
606 | 619 | o | 1:42ccdea3bb16 B |
|
607 | 620 | |/ |
|
608 | 621 | o 0:cd010b8cd998 A |
|
609 | 622 | |
|
610 | 623 | $ hg rebase -s 14 -d 18 --config experimental.rebaseskipobsolete=True |
|
611 | 624 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 17:fc37a630c901 "K" |
|
612 | 625 | rebasing 15:5ae8a643467b "J" |
|
613 | 626 | |
|
614 | 627 | $ cd .. |
|
615 | 628 | |
|
616 | 629 | Skip obsolete changeset even with multiple hops |
|
617 | 630 | ----------------------------------------------- |
|
618 | 631 | |
|
619 | 632 | setup |
|
620 | 633 | |
|
621 | 634 | $ hg init obsskip |
|
622 | 635 | $ cd obsskip |
|
623 | 636 | $ cat << EOF >> .hg/hgrc |
|
624 | 637 | > [experimental] |
|
625 | 638 | > rebaseskipobsolete = True |
|
626 | 639 | > [extensions] |
|
627 | 640 | > strip = |
|
628 | 641 | > EOF |
|
629 | 642 | $ echo A > A |
|
630 | 643 | $ hg add A |
|
631 | 644 | $ hg commit -m A |
|
632 | 645 | $ echo B > B |
|
633 | 646 | $ hg add B |
|
634 | 647 | $ hg commit -m B0 |
|
635 | 648 | $ hg commit --amend -m B1 |
|
636 | 649 | $ hg commit --amend -m B2 |
|
637 | 650 | $ hg up --hidden 'desc(B0)' |
|
638 | 651 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
639 | 652 | $ echo C > C |
|
640 | 653 | $ hg add C |
|
641 | 654 | $ hg commit -m C |
|
642 | 655 | |
|
643 | 656 | Rebase finds its way in a chain of marker |
|
644 | 657 | |
|
645 | 658 | $ hg rebase -d 'desc(B2)' |
|
646 | 659 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2" |
|
647 | 660 | rebasing 4:212cb178bcbb "C" (tip) |
|
648 | 661 | |
|
649 | 662 | Even when the chain include missing node |
|
650 | 663 | |
|
651 | 664 | $ hg up --hidden 'desc(B0)' |
|
652 | 665 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
653 | 666 | $ echo D > D |
|
654 | 667 | $ hg add D |
|
655 | 668 | $ hg commit -m D |
|
656 | 669 | $ hg --hidden strip -r 'desc(B1)' |
|
657 | 670 | saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob) |
|
658 | 671 | |
|
659 | 672 | $ hg rebase -d 'desc(B2)' |
|
660 | 673 | note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2" |
|
661 | 674 | rebasing 5:1a79b7535141 "D" (tip) |
|
662 | 675 | $ hg up 4 |
|
663 | 676 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
664 | 677 | $ echo "O" > O |
|
665 | 678 | $ hg add O |
|
666 | 679 | $ hg commit -m O |
|
667 | 680 | $ echo "P" > P |
|
668 | 681 | $ hg add P |
|
669 | 682 | $ hg commit -m P |
|
670 | 683 | $ hg log -G |
|
671 | 684 | @ 8:8d47583e023f P |
|
672 | 685 | | |
|
673 | 686 | o 7:360bbaa7d3ce O |
|
674 | 687 | | |
|
675 | 688 | | o 6:9c48361117de D |
|
676 | 689 | | | |
|
677 | 690 | o | 4:ff2c4d47b71d C |
|
678 | 691 | |/ |
|
679 | 692 | o 2:261e70097290 B2 |
|
680 | 693 | | |
|
681 | 694 | o 0:4a2df7238c3b A |
|
682 | 695 | |
|
683 | 696 | $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=all |
|
684 | 697 | $ hg rebase -d 6 -r "4::" |
|
685 | 698 | rebasing 4:ff2c4d47b71d "C" |
|
686 | 699 | note: not rebasing 7:360bbaa7d3ce "O", it has no successor |
|
687 | 700 | rebasing 8:8d47583e023f "P" (tip) |
|
688 | 701 | |
|
689 | 702 | If all the changeset to be rebased are obsolete and present in the destination, we |
|
690 | 703 | should display a friendly error message |
|
691 | 704 | |
|
692 | 705 | $ hg log -G |
|
693 | 706 | @ 10:121d9e3bc4c6 P |
|
694 | 707 | | |
|
695 | 708 | o 9:4be60e099a77 C |
|
696 | 709 | | |
|
697 | 710 | o 6:9c48361117de D |
|
698 | 711 | | |
|
699 | 712 | o 2:261e70097290 B2 |
|
700 | 713 | | |
|
701 | 714 | o 0:4a2df7238c3b A |
|
702 | 715 | |
|
703 | 716 | |
|
704 | 717 | $ hg up 9 |
|
705 | 718 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
706 | 719 | $ echo "non-relevant change" > nonrelevant |
|
707 | 720 | $ hg add nonrelevant |
|
708 | 721 | $ hg commit -m nonrelevant |
|
709 | 722 | created new head |
|
710 | 723 | $ hg debugobsolete `hg log -r 11 -T '{node}\n'` --config experimental.evolution=all |
|
711 | 724 | $ hg rebase -r . -d 10 |
|
712 | 725 | note: not rebasing 11:f44da1f4954c "nonrelevant" (tip), it has no successor |
|
713 | 726 | |
|
714 | 727 | If a rebase is going to create divergence, it should abort |
|
715 | 728 | |
|
716 | 729 | $ hg log -G |
|
717 | 730 | @ 11:f44da1f4954c nonrelevant |
|
718 | 731 | | |
|
719 | 732 | | o 10:121d9e3bc4c6 P |
|
720 | 733 | |/ |
|
721 | 734 | o 9:4be60e099a77 C |
|
722 | 735 | | |
|
723 | 736 | o 6:9c48361117de D |
|
724 | 737 | | |
|
725 | 738 | o 2:261e70097290 B2 |
|
726 | 739 | | |
|
727 | 740 | o 0:4a2df7238c3b A |
|
728 | 741 | |
|
729 | 742 | |
|
730 | 743 | $ hg up 9 |
|
731 | 744 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
732 | 745 | $ echo "john" > doe |
|
733 | 746 | $ hg add doe |
|
734 | 747 | $ hg commit -m "john doe" |
|
735 | 748 | created new head |
|
736 | 749 | $ hg up 10 |
|
737 | 750 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
738 | 751 | $ echo "foo" > bar |
|
739 | 752 | $ hg add bar |
|
740 | 753 | $ hg commit --amend -m "10'" |
|
741 | 754 | $ hg up 10 --hidden |
|
742 | 755 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
743 | 756 | $ echo "bar" > foo |
|
744 | 757 | $ hg add foo |
|
745 | 758 | $ hg commit -m "bar foo" |
|
746 | 759 | $ hg log -G |
|
747 | 760 | @ 15:73568ab6879d bar foo |
|
748 | 761 | | |
|
749 | 762 | | o 14:77d874d096a2 10' |
|
750 | 763 | | | |
|
751 | 764 | | | o 12:3eb461388009 john doe |
|
752 | 765 | | |/ |
|
753 | 766 | x | 10:121d9e3bc4c6 P |
|
754 | 767 | |/ |
|
755 | 768 | o 9:4be60e099a77 C |
|
756 | 769 | | |
|
757 | 770 | o 6:9c48361117de D |
|
758 | 771 | | |
|
759 | 772 | o 2:261e70097290 B2 |
|
760 | 773 | | |
|
761 | 774 | o 0:4a2df7238c3b A |
|
762 | 775 | |
|
763 | 776 | $ hg summary |
|
764 | 777 | parent: 15:73568ab6879d tip (unstable) |
|
765 | 778 | bar foo |
|
766 | 779 | branch: default |
|
767 | 780 | commit: (clean) |
|
768 | 781 | update: 2 new changesets, 3 branch heads (merge) |
|
769 | 782 | phases: 8 draft |
|
770 | 783 | unstable: 1 changesets |
|
771 | 784 | $ hg rebase -s 10 -d 12 |
|
772 | 785 | abort: this rebase will cause divergences from: 121d9e3bc4c6 |
|
773 | 786 | (to force the rebase please set experimental.allowdivergence=True) |
|
774 | 787 | [255] |
|
775 | 788 | $ hg log -G |
|
776 | 789 | @ 15:73568ab6879d bar foo |
|
777 | 790 | | |
|
778 | 791 | | o 14:77d874d096a2 10' |
|
779 | 792 | | | |
|
780 | 793 | | | o 12:3eb461388009 john doe |
|
781 | 794 | | |/ |
|
782 | 795 | x | 10:121d9e3bc4c6 P |
|
783 | 796 | |/ |
|
784 | 797 | o 9:4be60e099a77 C |
|
785 | 798 | | |
|
786 | 799 | o 6:9c48361117de D |
|
787 | 800 | | |
|
788 | 801 | o 2:261e70097290 B2 |
|
789 | 802 | | |
|
790 | 803 | o 0:4a2df7238c3b A |
|
791 | 804 | |
|
792 | 805 | With experimental.allowdivergence=True, rebase can create divergence |
|
793 | 806 | |
|
794 | 807 | $ hg rebase -s 10 -d 12 --config experimental.allowdivergence=True |
|
795 | 808 | rebasing 10:121d9e3bc4c6 "P" |
|
796 | 809 | rebasing 15:73568ab6879d "bar foo" (tip) |
|
797 | 810 | $ hg summary |
|
798 | 811 | parent: 17:61bd55f69bc4 tip |
|
799 | 812 | bar foo |
|
800 | 813 | branch: default |
|
801 | 814 | commit: (clean) |
|
802 | 815 | update: 1 new changesets, 2 branch heads (merge) |
|
803 | 816 | phases: 8 draft |
|
804 | 817 | divergent: 2 changesets |
|
805 | 818 | |
|
806 | 819 | rebase --continue + skipped rev because their successors are in destination |
|
807 | 820 | we make a change in trunk and work on conflicting changes to make rebase abort. |
|
808 | 821 | |
|
809 | 822 | $ hg log -G -r 17:: |
|
810 | 823 | @ 17:61bd55f69bc4 bar foo |
|
811 | 824 | | |
|
812 | 825 | ~ |
|
813 | 826 | |
|
814 | 827 | Create the two changes in trunk |
|
815 | 828 | $ printf "a" > willconflict |
|
816 | 829 | $ hg add willconflict |
|
817 | 830 | $ hg commit -m "willconflict first version" |
|
818 | 831 | |
|
819 | 832 | $ printf "dummy" > C |
|
820 | 833 | $ hg commit -m "dummy change successor" |
|
821 | 834 | |
|
822 | 835 | Create the changes that we will rebase |
|
823 | 836 | $ hg update -C 17 -q |
|
824 | 837 | $ printf "b" > willconflict |
|
825 | 838 | $ hg add willconflict |
|
826 | 839 | $ hg commit -m "willconflict second version" |
|
827 | 840 | created new head |
|
828 | 841 | $ printf "dummy" > K |
|
829 | 842 | $ hg add K |
|
830 | 843 | $ hg commit -m "dummy change" |
|
831 | 844 | $ printf "dummy" > L |
|
832 | 845 | $ hg add L |
|
833 | 846 | $ hg commit -m "dummy change" |
|
834 | 847 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 19 -T '{node}'` --config experimental.evolution=all |
|
835 | 848 | |
|
836 | 849 | $ hg log -G -r 17:: |
|
837 | 850 | @ 22:7bdc8a87673d dummy change |
|
838 | 851 | | |
|
839 | 852 | x 21:8b31da3c4919 dummy change |
|
840 | 853 | | |
|
841 | 854 | o 20:b82fb57ea638 willconflict second version |
|
842 | 855 | | |
|
843 | 856 | | o 19:601db7a18f51 dummy change successor |
|
844 | 857 | | | |
|
845 | 858 | | o 18:357ddf1602d5 willconflict first version |
|
846 | 859 | |/ |
|
847 | 860 | o 17:61bd55f69bc4 bar foo |
|
848 | 861 | | |
|
849 | 862 | ~ |
|
850 | 863 | $ hg rebase -r ".^^ + .^ + ." -d 19 |
|
851 | 864 | rebasing 20:b82fb57ea638 "willconflict second version" |
|
852 | 865 | merging willconflict |
|
853 | 866 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') |
|
854 | 867 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
855 | 868 | [1] |
|
856 | 869 | |
|
857 | 870 | $ hg resolve --mark willconflict |
|
858 | 871 | (no more unresolved files) |
|
859 | 872 | continue: hg rebase --continue |
|
860 | 873 | $ hg rebase --continue |
|
861 | 874 | rebasing 20:b82fb57ea638 "willconflict second version" |
|
862 | 875 | note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor" |
|
863 | 876 | rebasing 22:7bdc8a87673d "dummy change" (tip) |
|
864 | 877 | $ cd .. |
|
865 | 878 | |
|
866 | 879 | rebase source is obsoleted (issue5198) |
|
867 | 880 | --------------------------------- |
|
868 | 881 | |
|
869 | 882 | $ hg clone base amended |
|
870 | 883 | updating to branch default |
|
871 | 884 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
872 | 885 | $ cd amended |
|
873 | 886 | $ hg up 9520eea781bc |
|
874 | 887 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
875 | 888 | $ echo 1 >> E |
|
876 | 889 | $ hg commit --amend -m "E'" |
|
877 | 890 | $ hg log -G |
|
878 | 891 | @ 9:69abe8906104 E' |
|
879 | 892 | | |
|
880 | 893 | | o 7:02de42196ebe H |
|
881 | 894 | | | |
|
882 | 895 | | | o 6:eea13746799a G |
|
883 | 896 | | |/| |
|
884 | 897 | | o | 5:24b6387c8c8c F |
|
885 | 898 | |/ / |
|
886 | 899 | | x 4:9520eea781bc E |
|
887 | 900 | |/ |
|
888 | 901 | | o 3:32af7686d403 D |
|
889 | 902 | | | |
|
890 | 903 | | o 2:5fddd98957c8 C |
|
891 | 904 | | | |
|
892 | 905 | | o 1:42ccdea3bb16 B |
|
893 | 906 | |/ |
|
894 | 907 | o 0:cd010b8cd998 A |
|
895 | 908 | |
|
896 | 909 | $ hg rebase -d . -s 9520eea781bc |
|
897 | 910 | note: not rebasing 4:9520eea781bc "E", already in destination as 9:69abe8906104 "E'" |
|
898 | 911 | rebasing 6:eea13746799a "G" |
|
899 | 912 | $ hg log -G |
|
900 | 913 | o 10:17be06e82e95 G |
|
901 | 914 | |\ |
|
902 | 915 | | @ 9:69abe8906104 E' |
|
903 | 916 | | | |
|
904 | 917 | +---o 7:02de42196ebe H |
|
905 | 918 | | | |
|
906 | 919 | o | 5:24b6387c8c8c F |
|
907 | 920 | |/ |
|
908 | 921 | | o 3:32af7686d403 D |
|
909 | 922 | | | |
|
910 | 923 | | o 2:5fddd98957c8 C |
|
911 | 924 | | | |
|
912 | 925 | | o 1:42ccdea3bb16 B |
|
913 | 926 | |/ |
|
914 | 927 | o 0:cd010b8cd998 A |
|
915 | 928 | |
|
916 | 929 | $ cd .. |
|
917 | 930 | |
|
918 | 931 | Test that bookmark is moved and working dir is updated when all changesets have |
|
919 | 932 | equivalents in destination |
|
920 | 933 | $ hg init rbsrepo && cd rbsrepo |
|
921 | 934 | $ echo "[experimental]" > .hg/hgrc |
|
922 | 935 | $ echo "evolution=all" >> .hg/hgrc |
|
923 | 936 | $ echo "rebaseskipobsolete=on" >> .hg/hgrc |
|
924 | 937 | $ echo root > root && hg ci -Am root |
|
925 | 938 | adding root |
|
926 | 939 | $ echo a > a && hg ci -Am a |
|
927 | 940 | adding a |
|
928 | 941 | $ hg up 0 |
|
929 | 942 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
930 | 943 | $ echo b > b && hg ci -Am b |
|
931 | 944 | adding b |
|
932 | 945 | created new head |
|
933 | 946 | $ hg rebase -r 2 -d 1 |
|
934 | 947 | rebasing 2:1e9a3c00cbe9 "b" (tip) |
|
935 | 948 | $ hg log -r . # working dir is at rev 3 (successor of 2) |
|
936 | 949 | 3:be1832deae9a b (no-eol) |
|
937 | 950 | $ hg book -r 2 mybook --hidden # rev 2 has a bookmark on it now |
|
938 | 951 | $ hg up 2 && hg log -r . # working dir is at rev 2 again |
|
939 | 952 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
940 | 953 | 2:1e9a3c00cbe9 b (no-eol) |
|
941 | 954 | $ hg rebase -r 2 -d 3 |
|
942 | 955 | note: not rebasing 2:1e9a3c00cbe9 "b" (mybook), already in destination as 3:be1832deae9a "b" |
|
943 | 956 | Check that working directory was updated to rev 3 although rev 2 was skipped |
|
944 | 957 | during the rebase operation |
|
945 | 958 | $ hg log -r . |
|
946 | 959 | 3:be1832deae9a b (no-eol) |
|
947 | 960 | |
|
948 | 961 | Check that bookmark was moved to rev 3 although rev 2 was skipped |
|
949 | 962 | during the rebase operation |
|
950 | 963 | $ hg bookmarks |
|
951 | 964 | mybook 3:be1832deae9a |
General Comments 0
You need to be logged in to leave comments.
Login now