##// END OF EJS Templates
merge with stable
Martin von Zweigbergk -
r37039:c83e2736 merge default
parent child Browse files
Show More
@@ -1533,9 +1533,10 b' def abort(repo, originalwd, destmap, sta'
1533 try:
1533 try:
1534 # If the first commits in the rebased set get skipped during the rebase,
1534 # If the first commits in the rebased set get skipped during the rebase,
1535 # their values within the state mapping will be the dest rev id. The
1535 # their values within the state mapping will be the dest rev id. The
1536 # dstates list must must not contain the dest rev (issue4896)
1536 # rebased list must must not contain the dest rev (issue4896)
1537 dstates = [s for r, s in state.items() if s >= 0 and s != destmap[r]]
1537 rebased = [s for r, s in state.items()
1538 immutable = [d for d in dstates if not repo[d].mutable()]
1538 if s >= 0 and s != r and s != destmap[r]]
1539 immutable = [d for d in rebased if not repo[d].mutable()]
1539 cleanup = True
1540 cleanup = True
1540 if immutable:
1541 if immutable:
1541 repo.ui.warn(_("warning: can't clean up public changesets %s\n")
1542 repo.ui.warn(_("warning: can't clean up public changesets %s\n")
@@ -1544,17 +1545,15 b' def abort(repo, originalwd, destmap, sta'
1544 cleanup = False
1545 cleanup = False
1545
1546
1546 descendants = set()
1547 descendants = set()
1547 if dstates:
1548 if rebased:
1548 descendants = set(repo.changelog.descendants(dstates))
1549 descendants = set(repo.changelog.descendants(rebased))
1549 if descendants - set(dstates):
1550 if descendants - set(rebased):
1550 repo.ui.warn(_("warning: new changesets detected on destination "
1551 repo.ui.warn(_("warning: new changesets detected on destination "
1551 "branch, can't strip\n"))
1552 "branch, can't strip\n"))
1552 cleanup = False
1553 cleanup = False
1553
1554
1554 if cleanup:
1555 if cleanup:
1555 shouldupdate = False
1556 shouldupdate = False
1556 rebased = [s for r, s in state.items()
1557 if s >= 0 and s != destmap[r]]
1558 if rebased:
1557 if rebased:
1559 strippoints = [
1558 strippoints = [
1560 c.node() for c in repo.set('roots(%ld)', rebased)]
1559 c.node() for c in repo.set('roots(%ld)', rebased)]
@@ -69,6 +69,36 b' Can collapse commits even if one is alre'
69 |/
69 |/
70 o 0: 426bada5c675 A
70 o 0: 426bada5c675 A
71
71
72 Abort doesn't lose the commits that were already in the right place
73
74 $ hg init abort
75 $ cd abort
76 $ hg debugdrawdag <<EOF
77 > C
78 > |
79 > B D # B/file = B
80 > |/ # D/file = D
81 > A
82 > EOF
83 $ hg rebase -r C+D -d B
84 rebasing 2:ef8c0fe0897b "D" (D)
85 merging file
86 warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
87 unresolved conflicts (see hg resolve, then hg rebase --continue)
88 [1]
89 $ hg rebase --abort
90 rebase aborted
91 $ hg tglog
92 o 3: 79f6d6ab7b14 C
93 |
94 | o 2: ef8c0fe0897b D
95 | |
96 o | 1: 594087dbaf71 B
97 |/
98 o 0: 426bada5c675 A
99
100 $ cd ..
101
72 Rebase with "holes". The commits after the hole should end up on the parent of
102 Rebase with "holes". The commits after the hole should end up on the parent of
73 the hole (B below), not on top of the destination (A).
103 the hole (B below), not on top of the destination (A).
74
104
General Comments 0
You need to be logged in to leave comments. Login now