##// END OF EJS Templates
rebase: properly handle chains of markers with missing nodes...
Pierre-Yves David -
r26675:b73eb98c default
parent child Browse files
Show More
@@ -1167,7 +1167,10 b' def _computeobsoletenotrebased(repo, reb'
1167 if n.obsolete():
1167 if n.obsolete():
1168 node = cl.node(r)
1168 node = cl.node(r)
1169 for s in obsolete.allsuccessors(repo.obsstore, [node]):
1169 for s in obsolete.allsuccessors(repo.obsstore, [node]):
1170 allsuccessors[cl.rev(s)] = cl.rev(node)
1170 try:
1171 allsuccessors[cl.rev(s)] = cl.rev(node)
1172 except LookupError:
1173 pass
1171
1174
1172 if allsuccessors:
1175 if allsuccessors:
1173 # Look for successors of obsolete nodes to be rebased among
1176 # Look for successors of obsolete nodes to be rebased among
@@ -590,3 +590,51 b' Test hidden changesets in the rebase set'
590 note: not rebasing 14:9ad579b4a5de "I", already in destination as 17:fc37a630c901 "K"
590 note: not rebasing 14:9ad579b4a5de "I", already in destination as 17:fc37a630c901 "K"
591 rebasing 15:5ae8a643467b "J"
591 rebasing 15:5ae8a643467b "J"
592
592
593 $ cd ..
594
595 Skip obsolete changeset even with multiple hops
596 -----------------------------------------------
597
598 setup
599
600 $ hg init obsskip
601 $ cd obsskip
602 $ cat << EOF >> .hg/hgrc
603 > [experimental]
604 > rebaseskipobsolete = True
605 > [extensions]
606 > strip =
607 > EOF
608 $ echo A > A
609 $ hg add A
610 $ hg commit -m A
611 $ echo B > B
612 $ hg add B
613 $ hg commit -m B0
614 $ hg commit --amend -m B1
615 $ hg commit --amend -m B2
616 $ hg up --hidden 'desc(B0)'
617 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
618 $ echo C > C
619 $ hg add C
620 $ hg commit -m C
621
622 Rebase finds its way in a chain of marker
623
624 $ hg rebase -d 'desc(B2)'
625 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 3:261e70097290 "B2"
626 rebasing 4:212cb178bcbb "C" (tip)
627
628 Even when the chain include missing node
629
630 $ hg up --hidden 'desc(B0)'
631 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
632 $ echo D > D
633 $ hg add D
634 $ hg commit -m D
635 $ hg --hidden strip -r 'desc(B1)'
636 saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg (glob)
637
638 $ hg rebase -d 'desc(B2)'
639 note: not rebasing 1:a8b11f55fb19 "B0", already in destination as 2:261e70097290 "B2"
640 rebasing 5:1a79b7535141 "D" (tip)
General Comments 0
You need to be logged in to leave comments. Login now