Show More
@@ -310,15 +310,7 b' def rebase(ui, repo, **opts):' | |||
|
310 | 310 | nstate[repo[k].node()] = repo[v].node() |
|
311 | 311 | |
|
312 | 312 | if not keepf: |
|
313 | # Remove no more useful revisions | |
|
314 | rebased = [rev for rev in state if state[rev] != nullmerge] | |
|
315 | if rebased: | |
|
316 | if set(repo.changelog.descendants([min(rebased)])) - set(state): | |
|
317 | ui.warn(_("warning: new changesets detected " | |
|
318 | "on source branch, not stripping\n")) | |
|
319 | else: | |
|
320 | # backup the old csets by default | |
|
321 | repair.strip(ui, repo, repo[min(rebased)].node(), "all") | |
|
313 | clearrebased(ui, repo, state) | |
|
322 | 314 | |
|
323 | 315 | if currentbookmarks: |
|
324 | 316 | updatebookmarks(repo, nstate, currentbookmarks, **opts) |
@@ -664,6 +656,18 b' def buildstate(repo, dest, rebaseset, co' | |||
|
664 | 656 | state.update(dict.fromkeys(detachset, nullmerge)) |
|
665 | 657 | return repo['.'].rev(), dest.rev(), state |
|
666 | 658 | |
|
659 | def clearrebased(ui, repo, state): | |
|
660 | """dispose of rebased revision at the end of the rebase""" | |
|
661 | rebased = [rev for rev in state if state[rev] != nullmerge] | |
|
662 | if rebased: | |
|
663 | if set(repo.changelog.descendants([min(rebased)])) - set(state): | |
|
664 | ui.warn(_("warning: new changesets detected " | |
|
665 | "on source branch, not stripping\n")) | |
|
666 | else: | |
|
667 | # backup the old csets by default | |
|
668 | repair.strip(ui, repo, repo[min(rebased)].node(), "all") | |
|
669 | ||
|
670 | ||
|
667 | 671 | def pullrebase(orig, ui, repo, *args, **opts): |
|
668 | 672 | 'Call rebase after pull if the latter has been invoked with --rebase' |
|
669 | 673 | if opts.get('rebase'): |
General Comments 0
You need to be logged in to leave comments.
Login now