##// END OF EJS Templates
rebase: move constant expressions out of inner loop in _performrebase()...
Martin von Zweigbergk -
r36951:61600b02 default
parent child Browse files
Show More
@@ -423,26 +423,24 class rebaseruntime(object):
423 423
424 424 cands = [k for k, v in self.state.iteritems() if v == revtodo]
425 425 total = len(cands)
426 pos = 0
426 posholder = [0]
427 def progress(ctx):
428 posholder[0] += 1
429 self.repo.ui.progress(_("rebasing"), posholder[0],
430 ("%d:%s" % (ctx.rev(), ctx)),
431 _('changesets'), total)
432 allowdivergence = self.ui.configbool(
433 'experimental', 'evolution.allowdivergence')
427 434 for subset in sortsource(self.destmap):
428 435 sortedrevs = self.repo.revs('sort(%ld, -topo)', subset)
429 allowdivergence = self.ui.configbool(
430 'experimental', 'evolution.allowdivergence')
431 436 if not allowdivergence:
432 437 sortedrevs -= self.repo.revs(
433 438 'descendants(%ld) and not %ld',
434 439 self.obsoletewithoutsuccessorindestination,
435 440 self.obsoletewithoutsuccessorindestination,
436 441 )
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 442 for rev in sortedrevs:
444 443 self._rebasenode(tr, rev, allowdivergence, progress)
445 pos = posholder[0]
446 444 ui.progress(_('rebasing'), None)
447 445 ui.note(_('rebase merging completed\n'))
448 446
General Comments 0
You need to be logged in to leave comments. Login now