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