##// END OF EJS Templates
rebase: don't use rebased node as dirstate p2 (BC)...
Martin von Zweigbergk -
r45206:9c9cfecd default
parent child Browse files
Show More
@@ -618,6 +618,7 b' class rebaseruntime(object):'
618 618 repo,
619 619 rev,
620 620 p1,
621 p2,
621 622 base,
622 623 self.collapsef,
623 624 dest,
@@ -642,10 +643,6 b' class rebaseruntime(object):'
642 643 newnode = self._concludenode(rev, p1, p2, editor)
643 644 else:
644 645 # Skip commit if we are collapsing
645 if self.inmemory:
646 self.wctx.setbase(repo[p1])
647 else:
648 repo.setparents(repo[p1].node())
649 646 newnode = None
650 647 # Update the state
651 648 if newnode is not None:
@@ -1468,7 +1465,7 b' def commitnode(repo, p1, p2, editor, ext'
1468 1465 return newnode
1469 1466
1470 1467
1471 def rebasenode(repo, rev, p1, base, collapse, dest, wctx):
1468 def rebasenode(repo, rev, p1, p2, base, collapse, dest, wctx):
1472 1469 """Rebase a single revision rev on top of p1 using base as merge ancestor"""
1473 1470 # Merge phase
1474 1471 # Update to destination and merge it with local
@@ -1502,6 +1499,7 b' def rebasenode(repo, rev, p1, base, coll'
1502 1499 labels=[b'dest', b'source'],
1503 1500 wc=wctx,
1504 1501 )
1502 wctx.setparents(p1ctx.node(), repo[p2].node())
1505 1503 if collapse:
1506 1504 copies.graftcopies(wctx, ctx, repo[dest])
1507 1505 else:
@@ -21,6 +21,11 b''
21 21
22 22 == Backwards Compatibility Changes ==
23 23
24 * When `hg rebase` pauses for merge conflict resolution, the working
25 copy will no longer have the rebased node as a second parent. You
26 can use the new `conflictparents()` revset for finding the other
27 parent during a conflict.
28
24 29
25 30 == Internal API Changes ==
26 31
@@ -236,7 +236,7 b' Rebase and abort without generating new '
236 236 [1]
237 237
238 238 $ hg tglog
239 @ 4:draft 'C1'
239 % 4:draft 'C1'
240 240 |
241 241 o 3:draft 'B bis'
242 242 |
@@ -712,7 +712,7 b' Test aborted editor on final message'
712 712 |
713 713 | @ 2: 82b8abf9c185 'D'
714 714 | |
715 @ | 1: f899f3910ce7 'B'
715 % | 1: f899f3910ce7 'B'
716 716 |/
717 717 o 0: 4a2df7238c3b 'A'
718 718
@@ -736,7 +736,7 b' Test aborted editor on final message'
736 736 unresolved conflicts (see hg resolve, then hg rebase --continue)
737 737 [1]
738 738 $ hg tglog
739 @ 3: 63668d570d21 'C'
739 % 3: 63668d570d21 'C'
740 740 |
741 741 | @ 2: 82b8abf9c185 'D'
742 742 | |
@@ -456,15 +456,14 b' Test where the conflict happens when reb'
456 456 warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark')
457 457 unresolved conflicts (see hg resolve, then hg rebase --continue)
458 458 [1]
459 The current parents are not 7 and 8 even though that's what we're merging
460 459 $ hg tglog
461 460 @ 8:draft 'E'
462 461 |
463 | o 7:draft 'D'
462 | @ 7:draft 'D'
464 463 |/
465 464 o 6:draft 'C'
466 465 |
467 | @ 5:draft 'F'
466 | % 5:draft 'F'
468 467 | |\
469 468 | | o 4:draft 'E'
470 469 | | |
@@ -294,7 +294,7 b' Test rebase interrupted by hooks'
294 294 $ hg tglogp
295 295 @ 7: 401ccec5e39f secret 'C'
296 296 |
297 | @ 6: a0b2430ebfb8 secret 'F'
297 | o 6: a0b2430ebfb8 secret 'F'
298 298 | |
299 299 o | 5: 45396c49d53b public 'B'
300 300 | |
@@ -345,7 +345,7 b' Test rebase interrupted by hooks'
345 345 $ hg tglogp
346 346 @ 7: 401ccec5e39f secret 'C'
347 347 |
348 | @ 6: a0b2430ebfb8 secret 'F'
348 | o 6: a0b2430ebfb8 secret 'F'
349 349 | |
350 350 o | 5: 45396c49d53b public 'B'
351 351 | |
@@ -395,7 +395,7 b' Test rebase interrupted by hooks'
395 395 $ hg tglogp
396 396 @ 7: 401ccec5e39f secret 'C'
397 397 |
398 | @ 6: a0b2430ebfb8 secret 'F'
398 | o 6: a0b2430ebfb8 secret 'F'
399 399 | |
400 400 o | 5: 45396c49d53b public 'B'
401 401 | |
@@ -1795,19 +1795,15 b' rebasestate may contain hidden hashes. "'
1795 1795 $ hg log -G
1796 1796 @ 2:b18e25de2cf5 D
1797 1797 |
1798 | @ 1:2ec65233581b B (pruned using prune)
1799 |/
1800 1798 o 0:426bada5c675 A
1801 1799
1802 1800 $ hg summary
1803 1801 parent: 2:b18e25de2cf5 tip
1804 1802 D
1805 parent: 1:2ec65233581b (obsolete)
1806 B
1807 1803 branch: default
1808 commit: 2 modified, 1 unknown, 1 unresolved (merge)
1804 commit: 1 modified, 1 added, 1 unknown, 1 unresolved
1809 1805 update: (current)
1810 phases: 3 draft
1806 phases: 2 draft
1811 1807 rebase: 0 rebased, 2 remaining (rebase --continue)
1812 1808
1813 1809 $ hg rebase --abort
@@ -481,11 +481,9 b' Test --tool parameter:'
481 481 $ hg summary
482 482 parent: 1:56daeba07f4b
483 483 c2
484 parent: 2:e4e3f3546619 tip
485 c2b
486 484 branch: default
487 commit: 1 modified, 1 unresolved (merge)
488 update: (current)
485 commit: 1 unresolved (clean)
486 update: 1 new changesets, 2 branch heads (merge)
489 487 phases: 3 draft
490 488 rebase: 0 rebased, 1 remaining (rebase --continue)
491 489
@@ -114,7 +114,7 b' continued'
114 114 |
115 115 | @ 4: Z
116 116 | |
117 @ | 3: C
117 % | 3: C
118 118 | |
119 119 | o 2: Y
120 120 | |
@@ -123,9 +123,9 b' continued'
123 123 o 0: A
124 124
125 125 $ hg st
126 M C
127 126 M conflict
128 127 A B
128 A C
129 129 ? conflict.orig
130 130 $ echo resolved > conflict
131 131 $ hg resolve -m
General Comments 0
You need to be logged in to leave comments. Login now