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