Show More
@@ -153,6 +153,7 b' class rebaseruntime(object):' | |||||
153 | # keepopen is not meant for use on the command line, but by |
|
153 | # keepopen is not meant for use on the command line, but by | |
154 | # other extensions |
|
154 | # other extensions | |
155 | self.keepopen = opts.get('keepopen', False) |
|
155 | self.keepopen = opts.get('keepopen', False) | |
|
156 | self.obsoletenotrebased = {} | |||
156 |
|
157 | |||
157 | def restorestatus(self): |
|
158 | def restorestatus(self): | |
158 | """Restore a previously stored status""" |
|
159 | """Restore a previously stored status""" | |
@@ -399,15 +400,15 b' def rebase(ui, repo, **opts):' | |||||
399 | rbsrt.state, |
|
400 | rbsrt.state, | |
400 | activebookmark=rbsrt.activebookmark) |
|
401 | activebookmark=rbsrt.activebookmark) | |
401 |
|
402 | |||
402 | obsoletenotrebased = {} |
|
403 | rbsrt.obsoletenotrebased = {} | |
403 | if ui.configbool('experimental', 'rebaseskipobsolete', |
|
404 | if ui.configbool('experimental', 'rebaseskipobsolete', | |
404 | default=True): |
|
405 | default=True): | |
405 | rebaseobsrevs = set([r for r, st in rbsrt.state.items() |
|
406 | rebaseobsrevs = set([r for r, st in rbsrt.state.items() | |
406 | if st == revprecursor]) |
|
407 | if st == revprecursor]) | |
407 | rebasesetrevs = set(rbsrt.state.keys()) |
|
408 | rebasesetrevs = set(rbsrt.state.keys()) | |
408 | obsoletenotrebased = _computeobsoletenotrebased(repo, |
|
409 | rbsrt.obsoletenotrebased = _computeobsoletenotrebased(repo, | |
409 | rebaseobsrevs, rbsrt.target) |
|
410 | rebaseobsrevs, rbsrt.target) | |
410 | rebaseobsskipped = set(obsoletenotrebased) |
|
411 | rebaseobsskipped = set(rbsrt.obsoletenotrebased) | |
411 | _checkobsrebase(repo, ui, rebaseobsrevs, rebasesetrevs, |
|
412 | _checkobsrebase(repo, ui, rebaseobsrevs, rebasesetrevs, | |
412 | rebaseobsskipped) |
|
413 | rebaseobsskipped) | |
413 | else: |
|
414 | else: | |
@@ -425,21 +426,21 b' def rebase(ui, repo, **opts):' | |||||
425 | " unrebased descendants"), |
|
426 | " unrebased descendants"), | |
426 | hint=_('use --keep to keep original changesets')) |
|
427 | hint=_('use --keep to keep original changesets')) | |
427 |
|
428 | |||
428 | obsoletenotrebased = {} |
|
429 | rbsrt.obsoletenotrebased = {} | |
429 | if ui.configbool('experimental', 'rebaseskipobsolete', |
|
430 | if ui.configbool('experimental', 'rebaseskipobsolete', | |
430 | default=True): |
|
431 | default=True): | |
431 | rebasesetrevs = set(rebaseset) |
|
432 | rebasesetrevs = set(rebaseset) | |
432 | rebaseobsrevs = _filterobsoleterevs(repo, rebasesetrevs) |
|
433 | rebaseobsrevs = _filterobsoleterevs(repo, rebasesetrevs) | |
433 | obsoletenotrebased = _computeobsoletenotrebased(repo, |
|
434 | rbsrt.obsoletenotrebased = _computeobsoletenotrebased(repo, | |
434 | rebaseobsrevs, |
|
435 | rebaseobsrevs, | |
435 | dest) |
|
436 | dest) | |
436 | rebaseobsskipped = set(obsoletenotrebased) |
|
437 | rebaseobsskipped = set(rbsrt.obsoletenotrebased) | |
437 | _checkobsrebase(repo, ui, rebaseobsrevs, |
|
438 | _checkobsrebase(repo, ui, rebaseobsrevs, | |
438 | rebasesetrevs, |
|
439 | rebasesetrevs, | |
439 | rebaseobsskipped) |
|
440 | rebaseobsskipped) | |
440 |
|
441 | |||
441 | result = buildstate(repo, dest, rebaseset, rbsrt.collapsef, |
|
442 | result = buildstate(repo, dest, rebaseset, rbsrt.collapsef, | |
442 | obsoletenotrebased) |
|
443 | rbsrt.obsoletenotrebased) | |
443 |
|
444 | |||
444 | if not result: |
|
445 | if not result: | |
445 | # Empty state built, nothing to rebase |
|
446 | # Empty state built, nothing to rebase | |
@@ -506,7 +507,7 b' def rebase(ui, repo, **opts):' | |||||
506 | p1, p2, base = defineparents(repo, rev, rbsrt.target, |
|
507 | p1, p2, base = defineparents(repo, rev, rbsrt.target, | |
507 | rbsrt.state, |
|
508 | rbsrt.state, | |
508 | rbsrt.targetancestors, |
|
509 | rbsrt.targetancestors, | |
509 | obsoletenotrebased) |
|
510 | rbsrt.obsoletenotrebased) | |
510 | storestatus(repo, rbsrt.originalwd, rbsrt.target, |
|
511 | storestatus(repo, rbsrt.originalwd, rbsrt.target, | |
511 | rbsrt.state, rbsrt.collapsef, rbsrt.keepf, |
|
512 | rbsrt.state, rbsrt.collapsef, rbsrt.keepf, | |
512 | rbsrt.keepbranchesf, rbsrt.external, |
|
513 | rbsrt.keepbranchesf, rbsrt.external, | |
@@ -556,7 +557,7 b' def rebase(ui, repo, **opts):' | |||||
556 | elif rbsrt.state[rev] == revignored: |
|
557 | elif rbsrt.state[rev] == revignored: | |
557 | ui.status(_('not rebasing ignored %s\n') % desc) |
|
558 | ui.status(_('not rebasing ignored %s\n') % desc) | |
558 | elif rbsrt.state[rev] == revprecursor: |
|
559 | elif rbsrt.state[rev] == revprecursor: | |
559 | targetctx = repo[obsoletenotrebased[rev]] |
|
560 | targetctx = repo[rbsrt.obsoletenotrebased[rev]] | |
560 | desctarget = '%d:%s "%s"' % (targetctx.rev(), targetctx, |
|
561 | desctarget = '%d:%s "%s"' % (targetctx.rev(), targetctx, | |
561 | targetctx.description().split('\n', 1)[0]) |
|
562 | targetctx.description().split('\n', 1)[0]) | |
562 | msg = _('note: not rebasing %s, already in destination as %s\n') |
|
563 | msg = _('note: not rebasing %s, already in destination as %s\n') | |
@@ -575,7 +576,7 b' def rebase(ui, repo, **opts):' | |||||
575 | p1, p2, _base = defineparents(repo, min(rbsrt.state), |
|
576 | p1, p2, _base = defineparents(repo, min(rbsrt.state), | |
576 | rbsrt.target, rbsrt.state, |
|
577 | rbsrt.target, rbsrt.state, | |
577 | rbsrt.targetancestors, |
|
578 | rbsrt.targetancestors, | |
578 | obsoletenotrebased) |
|
579 | rbsrt.obsoletenotrebased) | |
579 | editopt = opts.get('edit') |
|
580 | editopt = opts.get('edit') | |
580 | editform = 'rebase.collapse' |
|
581 | editform = 'rebase.collapse' | |
581 | if rbsrt.collapsemsg: |
|
582 | if rbsrt.collapsemsg: | |
@@ -611,7 +612,7 b' def rebase(ui, repo, **opts):' | |||||
611 | if v > nullmerge: |
|
612 | if v > nullmerge: | |
612 | nstate[repo[k].node()] = repo[v].node() |
|
613 | nstate[repo[k].node()] = repo[v].node() | |
613 | elif v == revprecursor: |
|
614 | elif v == revprecursor: | |
614 | succ = obsoletenotrebased[k] |
|
615 | succ = rbsrt.obsoletenotrebased[k] | |
615 | nstate[repo[k].node()] = repo[succ].node() |
|
616 | nstate[repo[k].node()] = repo[succ].node() | |
616 | # XXX this is the same as dest.node() for the non-continue path -- |
|
617 | # XXX this is the same as dest.node() for the non-continue path -- | |
617 | # this should probably be cleaned up |
|
618 | # this should probably be cleaned up | |
@@ -621,7 +622,7 b' def rebase(ui, repo, **opts):' | |||||
621 | # (we do this before stripping) |
|
622 | # (we do this before stripping) | |
622 | newwd = rbsrt.state.get(rbsrt.originalwd, rbsrt.originalwd) |
|
623 | newwd = rbsrt.state.get(rbsrt.originalwd, rbsrt.originalwd) | |
623 | if newwd == revprecursor: |
|
624 | if newwd == revprecursor: | |
624 | newwd = obsoletenotrebased[rbsrt.originalwd] |
|
625 | newwd = rbsrt.obsoletenotrebased[rbsrt.originalwd] | |
625 | elif newwd < 0: |
|
626 | elif newwd < 0: | |
626 | # original directory is a parent of rebase set root or ignored |
|
627 | # original directory is a parent of rebase set root or ignored | |
627 | newwd = rbsrt.originalwd |
|
628 | newwd = rbsrt.originalwd |
General Comments 0
You need to be logged in to leave comments.
Login now