##// END OF EJS Templates
rebase: avoid RevlogError when computing obsoletenotrebased (issue5907)...
Matt Harbison -
r38241:69d1cafe stable
parent child Browse files
Show More
@@ -1815,7 +1815,8 def _computeobsoletenotrebased(repo, reb
1815 # If 'srcrev' has a successor in rebase set but none in
1815 # If 'srcrev' has a successor in rebase set but none in
1816 # destination (which would be catched above), we shall skip it
1816 # destination (which would be catched above), we shall skip it
1817 # and its descendants to avoid divergence.
1817 # and its descendants to avoid divergence.
1818 if any(nodemap[s] in destmap for s in successors):
1818 if any(nodemap[s] in destmap for s in successors
1819 if s in nodemap):
1819 obsoletewithoutsuccessorindestination.add(srcrev)
1820 obsoletewithoutsuccessorindestination.add(srcrev)
1820
1821
1821 return (
1822 return (
@@ -1493,6 +1493,38 Rebase merge where successor of other pa
1493
1493
1494 $ cd ..
1494 $ cd ..
1495
1495
1496 $ hg init p2-succ-in-dest-c
1497 $ cd p2-succ-in-dest-c
1498
1499 The scenario here was that B::D were developed on default. B was queued on
1500 stable, but amended before being push to hg-committed. C was queued on default,
1501 along with unrelated J.
1502
1503 $ hg debugdrawdag <<EOF
1504 > J
1505 > |
1506 > F
1507 > |
1508 > E
1509 > | D
1510 > | |
1511 > | C # replace: C -> F
1512 > | | H I # replace: B -> H -> I
1513 > | B |/
1514 > |/ G
1515 > A
1516 > EOF
1517 1 new orphan changesets
1518
1519 This strip seems to be the key to avoid an early divergence warning.
1520 $ hg --config extensions.strip= --hidden strip -qr H
1521 1 new orphan changesets
1522
1523 $ hg rebase -b 'desc("D")' -d 'desc("J")'
1524 abort: this rebase will cause divergences from: 112478962961
1525 (to force the rebase please set experimental.evolution.allowdivergence=True)
1526 [255]
1527
1496 Rebase merge where both parents have successors in destination
1528 Rebase merge where both parents have successors in destination
1497
1529
1498 $ hg init p12-succ-in-dest
1530 $ hg init p12-succ-in-dest
General Comments 0
You need to be logged in to leave comments. Login now