Show More
@@ -316,6 +316,9 b' def rebase(ui, repo, **opts):' | |||||
316 | for k, v in state.iteritems(): |
|
316 | for k, v in state.iteritems(): | |
317 | if v > nullmerge: |
|
317 | if v > nullmerge: | |
318 | nstate[repo[k].node()] = repo[v].node() |
|
318 | nstate[repo[k].node()] = repo[v].node() | |
|
319 | # XXX this is the same as dest.node() for the non-continue path -- | |||
|
320 | # this should probably be cleaned up | |||
|
321 | targetnode = repo[target].node() | |||
319 |
|
322 | |||
320 | if not keepf: |
|
323 | if not keepf: | |
321 | collapsedas = None |
|
324 | collapsedas = None | |
@@ -324,7 +327,7 b' def rebase(ui, repo, **opts):' | |||||
324 | clearrebased(ui, repo, state, skipped, collapsedas) |
|
327 | clearrebased(ui, repo, state, skipped, collapsedas) | |
325 |
|
328 | |||
326 | if currentbookmarks: |
|
329 | if currentbookmarks: | |
327 |
updatebookmarks(repo, |
|
330 | updatebookmarks(repo, targetnode, nstate, currentbookmarks) | |
328 |
|
331 | |||
329 | clearstatus(repo) |
|
332 | clearstatus(repo) | |
330 | ui.note(_("rebase completed\n")) |
|
333 | ui.note(_("rebase completed\n")) | |
@@ -501,15 +504,14 b' def updatemq(repo, state, skipped, **opt' | |||||
501 | mq.seriesdirty = True |
|
504 | mq.seriesdirty = True | |
502 | mq.savedirty() |
|
505 | mq.savedirty() | |
503 |
|
506 | |||
504 |
def updatebookmarks(repo, |
|
507 | def updatebookmarks(repo, targetnode, nstate, originalbookmarks): | |
505 | 'Move bookmarks to their correct changesets, and delete divergent ones' |
|
508 | 'Move bookmarks to their correct changesets, and delete divergent ones' | |
506 | destnode = dest.node() |
|
|||
507 | marks = repo._bookmarks |
|
509 | marks = repo._bookmarks | |
508 | for k, v in originalbookmarks.iteritems(): |
|
510 | for k, v in originalbookmarks.iteritems(): | |
509 | if v in nstate: |
|
511 | if v in nstate: | |
510 | # update the bookmarks for revs that have moved |
|
512 | # update the bookmarks for revs that have moved | |
511 | marks[k] = nstate[v] |
|
513 | marks[k] = nstate[v] | |
512 |
bookmarks.deletedivergent(repo, [ |
|
514 | bookmarks.deletedivergent(repo, [targetnode], k) | |
513 |
|
515 | |||
514 | marks.write() |
|
516 | marks.write() | |
515 |
|
517 |
@@ -127,5 +127,36 b' Keep active bookmark on the correct chan' | |||||
127 | | |
|
127 | | | |
128 | o 0: 'A' bookmarks: |
|
128 | o 0: 'A' bookmarks: | |
129 |
|
129 | |||
|
130 | rebase --continue with bookmarks present (issue3802) | |||
|
131 | ||||
|
132 | $ hg up 2 | |||
|
133 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
134 | $ echo 'C' > c | |||
|
135 | $ hg add c | |||
|
136 | $ hg ci -m 'other C' | |||
|
137 | created new head | |||
|
138 | $ hg up 3 | |||
|
139 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
140 | $ hg rebase | |||
|
141 | merging c | |||
|
142 | warning: conflicts during merge. | |||
|
143 | merging c incomplete! (edit conflicts, then use 'hg resolve --mark') | |||
|
144 | abort: unresolved conflicts (see hg resolve, then hg rebase --continue) | |||
|
145 | [255] | |||
|
146 | $ echo 'c' > c | |||
|
147 | $ hg resolve --mark c | |||
|
148 | $ hg rebase --continue | |||
|
149 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-backup.hg (glob) | |||
|
150 | $ hg tglog | |||
|
151 | @ 4: 'C' bookmarks: Y Z | |||
|
152 | | | |||
|
153 | o 3: 'other C' bookmarks: | |||
|
154 | | | |||
|
155 | o 2: 'B' bookmarks: X | |||
|
156 | | | |||
|
157 | o 1: 'D' bookmarks: W | |||
|
158 | | | |||
|
159 | o 0: 'A' bookmarks: | |||
|
160 | ||||
130 |
|
161 | |||
131 | $ cd .. |
|
162 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now