Mercurial > hg
comparison tests/test-rebase-obsolete2.t @ 46863:d9601243b73c
rebase: when using --keep, don't care about pruned commits or divergence
`hg rebase --keep` creates duplicate commits (not successors), so I
was surprised that it still skips pruned commits and errors out if it
"would cause divergence" (it wouldn't). I guess this was just an
oversight. We didn't have any tests for it, so I also included that.
Differential Revision: https://phab.mercurial-scm.org/D10269
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 25 Mar 2021 11:35:16 -0700 |
parents | 13b200ffe8eb |
children | f8f2ecdde4b5 |
comparison
equal
deleted
inserted
replaced
46862:82b17bfc13eb | 46863:d9601243b73c |
---|---|
315 $ hg rebase --continue | 315 $ hg rebase --continue |
316 rebasing 19:b82fb57ea638 "willconflict second version" | 316 rebasing 19:b82fb57ea638 "willconflict second version" |
317 note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" | 317 note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" |
318 rebasing 21:7bdc8a87673d tip "dummy change" | 318 rebasing 21:7bdc8a87673d tip "dummy change" |
319 $ cd .. | 319 $ cd .. |
320 | |
321 Can rebase pruned and rewritten commits with --keep | |
322 | |
323 $ hg init keep | |
324 $ cd keep | |
325 $ hg debugdrawdag <<'EOS' | |
326 > D | |
327 > | | |
328 > C | |
329 > | | |
330 > F B E # prune: B | |
331 > \|/ # rebase: C -> E | |
332 > A | |
333 > EOS | |
334 1 new orphan changesets | |
335 | |
336 $ hg rebase -b D -d F --keep | |
337 rebasing 1:112478962961 B "B" | |
338 rebasing 4:26805aba1e60 C "C" | |
339 rebasing 5:f585351a92f8 D tip "D" | |
340 | |
341 $ cd .. |