Mercurial > hg
comparison tests/test-rebase-named-branches.t @ 28189:fac3a24be50e
rebase: choose default destination the same way as 'hg merge' (BC)
This changeset finally make 'hg rebase' choose its default destination using the
same logic as 'hg merge'. The previous default was "tipmost changeset on the
current branch", the new default is "the other head if there is only one". This
change has multiple consequences:
- Multiple tests which were not rebasing anything (rebasing from tipmost head)
are now rebasing on the other "lower" branch. This is the expected new
behavior.
- A test is now explicitly aborting when there is too many heads on the branch.
This is the expected behavior.
- We gained a better detection of the "nothing to rebase" case while performing
'hg pull --rebase' so the message have been updated. Making clearer than an
update was performed and why. This is beneficial side-effect.
- Rebasing from an active bookmark will behave the same as 'hg merge' from a
bookmark.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sun, 14 Feb 2016 13:25:59 +0000 |
parents | b2415e94b2f5 |
children | 65d93d712777 |
comparison
equal
deleted
inserted
replaced
28188:6411140aeda9 | 28189:fac3a24be50e |
---|---|
325 | 325 |
326 rebase 'b2' to another lower branch head | 326 rebase 'b2' to another lower branch head |
327 | 327 |
328 $ hg up -qr 2 | 328 $ hg up -qr 2 |
329 $ hg rebase | 329 $ hg rebase |
330 nothing to rebase - working directory parent is also destination | 330 rebasing 2:792845bb77ee "b2" |
331 [1] | 331 note: rebase of 2:792845bb77ee created no changes to commit |
332 $ hg tglog | 332 saved backup bundle to $TESTTMP/case1/.hg/strip-backup/792845bb77ee-627120ee-backup.hg (glob) |
333 o 3: 'c1' c | 333 $ hg tglog |
334 | | 334 o 2: 'c1' c |
335 | @ 2: 'b2' b | 335 | |
336 |/ | 336 | @ 1: 'b1' b |
337 | o 1: 'b1' b | |
338 |/ | 337 |/ |
339 o 0: '0' | 338 o 0: '0' |
340 | 339 |
341 | 340 |
342 rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') | 341 rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') |
371 o | 1: 'b2' b | 370 o | 1: 'b2' b |
372 |/ | 371 |/ |
373 o 0: '0' | 372 o 0: '0' |
374 | 373 |
375 $ hg rebase | 374 $ hg rebase |
376 nothing to rebase - working directory parent is also destination | 375 abort: branch 'c' has one head - please rebase to an explicit rev |
377 [1] | 376 (run 'hg heads' to see all heads) |
377 [255] | |
378 $ hg tglog | 378 $ hg tglog |
379 _ 4: 'c2 closed' c | 379 _ 4: 'c2 closed' c |
380 | | 380 | |
381 o 3: 'b1' b | 381 o 3: 'b1' b |
382 | | 382 | |