Show More
@@ -425,30 +425,27 b' class rebaseruntime(object):' | |||
|
425 | 425 | total = len(cands) |
|
426 | 426 | pos = 0 |
|
427 | 427 | for subset in sortsource(self.destmap): |
|
428 | pos = self._performrebasesubset(tr, subset, pos, total) | |
|
428 | sortedrevs = self.repo.revs('sort(%ld, -topo)', subset) | |
|
429 | allowdivergence = self.ui.configbool( | |
|
430 | 'experimental', 'evolution.allowdivergence') | |
|
431 | if not allowdivergence: | |
|
432 | sortedrevs -= self.repo.revs( | |
|
433 | 'descendants(%ld) and not %ld', | |
|
434 | self.obsoletewithoutsuccessorindestination, | |
|
435 | self.obsoletewithoutsuccessorindestination, | |
|
436 | ) | |
|
437 | posholder = [pos] | |
|
438 | def progress(ctx): | |
|
439 | posholder[0] += 1 | |
|
440 | self.repo.ui.progress(_("rebasing"), posholder[0], | |
|
441 | ("%d:%s" % (ctx.rev(), ctx)), | |
|
442 | _('changesets'), total) | |
|
443 | for rev in sortedrevs: | |
|
444 | self._rebasenode(tr, rev, allowdivergence, progress) | |
|
445 | pos = posholder[0] | |
|
429 | 446 | ui.progress(_('rebasing'), None) |
|
430 | 447 | ui.note(_('rebase merging completed\n')) |
|
431 | 448 | |
|
432 | def _performrebasesubset(self, tr, subset, pos, total): | |
|
433 | sortedrevs = self.repo.revs('sort(%ld, -topo)', subset) | |
|
434 | allowdivergence = self.ui.configbool( | |
|
435 | 'experimental', 'evolution.allowdivergence') | |
|
436 | if not allowdivergence: | |
|
437 | sortedrevs -= self.repo.revs( | |
|
438 | 'descendants(%ld) and not %ld', | |
|
439 | self.obsoletewithoutsuccessorindestination, | |
|
440 | self.obsoletewithoutsuccessorindestination, | |
|
441 | ) | |
|
442 | posholder = [pos] | |
|
443 | def progress(ctx): | |
|
444 | posholder[0] += 1 | |
|
445 | self.repo.ui.progress(_("rebasing"), posholder[0], | |
|
446 | ("%d:%s" % (ctx.rev(), ctx)), _('changesets'), | |
|
447 | total) | |
|
448 | for rev in sortedrevs: | |
|
449 | self._rebasenode(tr, rev, allowdivergence, progress) | |
|
450 | return posholder[0] | |
|
451 | ||
|
452 | 449 | def _rebasenode(self, tr, rev, allowdivergence, progressfn): |
|
453 | 450 | repo, ui, opts = self.repo, self.ui, self.opts |
|
454 | 451 | dest = self.destmap[rev] |
General Comments 0
You need to be logged in to leave comments.
Login now