Show More
@@ -240,3 +240,97 b' Rebasing descendant onto ancestor across' | |||||
240 | @ 0: 'A' |
|
240 | @ 0: 'A' | |
241 |
|
241 | |||
242 | $ cd .. |
|
242 | $ cd .. | |
|
243 | ||||
|
244 | Rebase to other head on branch | |||
|
245 | ||||
|
246 | Set up a case: | |||
|
247 | ||||
|
248 | $ hg init case1 | |||
|
249 | $ cd case1 | |||
|
250 | $ touch f | |||
|
251 | $ hg ci -qAm0 | |||
|
252 | $ hg branch -q b | |||
|
253 | $ echo >> f | |||
|
254 | $ hg ci -qAm 'b1' | |||
|
255 | $ hg up -qr -2 | |||
|
256 | $ hg branch -qf b | |||
|
257 | $ hg ci -qm 'b2' | |||
|
258 | $ hg up -qr -3 | |||
|
259 | $ hg branch -q c | |||
|
260 | $ hg ci -m 'c1' | |||
|
261 | ||||
|
262 | $ hg tglog | |||
|
263 | @ 3: 'c1' c | |||
|
264 | | | |||
|
265 | | o 2: 'b2' b | |||
|
266 | |/ | |||
|
267 | | o 1: 'b1' b | |||
|
268 | |/ | |||
|
269 | o 0: '0' | |||
|
270 | ||||
|
271 | $ hg clone -q . ../case2 | |||
|
272 | ||||
|
273 | rebase 'b2' to another lower branch head | |||
|
274 | ||||
|
275 | $ hg up -qr 2 | |||
|
276 | $ hg rebase | |||
|
277 | nothing to rebase - working directory parent is also destination | |||
|
278 | [1] | |||
|
279 | $ hg tglog | |||
|
280 | o 3: 'c1' c | |||
|
281 | | | |||
|
282 | | @ 2: 'b2' b | |||
|
283 | |/ | |||
|
284 | | o 1: 'b1' b | |||
|
285 | |/ | |||
|
286 | o 0: '0' | |||
|
287 | ||||
|
288 | ||||
|
289 | rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') | |||
|
290 | ||||
|
291 | $ cd ../case2 | |||
|
292 | $ hg up -qr 1 | |||
|
293 | $ hg rebase | |||
|
294 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-backup.hg (glob) | |||
|
295 | $ hg tglog | |||
|
296 | @ 3: 'b1' b | |||
|
297 | | | |||
|
298 | | o 2: 'c1' c | |||
|
299 | | | | |||
|
300 | o | 1: 'b2' b | |||
|
301 | |/ | |||
|
302 | o 0: '0' | |||
|
303 | ||||
|
304 | ||||
|
305 | rebase 'c1' to the branch head 'c2' that is closed | |||
|
306 | ||||
|
307 | $ hg branch -qf c | |||
|
308 | $ hg ci -qm 'c2 closed' --close | |||
|
309 | $ hg up -qr 2 | |||
|
310 | $ hg tglog | |||
|
311 | o 4: 'c2 closed' c | |||
|
312 | | | |||
|
313 | o 3: 'b1' b | |||
|
314 | | | |||
|
315 | | @ 2: 'c1' c | |||
|
316 | | | | |||
|
317 | o | 1: 'b2' b | |||
|
318 | |/ | |||
|
319 | o 0: '0' | |||
|
320 | ||||
|
321 | $ hg rebase | |||
|
322 | nothing to rebase - working directory parent is also destination | |||
|
323 | [1] | |||
|
324 | $ hg tglog | |||
|
325 | o 4: 'c2 closed' c | |||
|
326 | | | |||
|
327 | o 3: 'b1' b | |||
|
328 | | | |||
|
329 | | @ 2: 'c1' c | |||
|
330 | | | | |||
|
331 | o | 1: 'b2' b | |||
|
332 | |/ | |||
|
333 | o 0: '0' | |||
|
334 | ||||
|
335 | ||||
|
336 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now