comparison mercurial/changegroup.py @ 25573:3e89e67f17e8

changegroup: don't use 'repo' for non-repo 'self' 'repo' is a very confusing name to use for 'self', especially when it's not a repo. Also drop repo.ui member (a.k.a. self.ui) now that 'self' doesn't shadow outer 'repo' variable.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 12 Jun 2015 10:54:10 -0700
parents 513c31d8652f
children 88a17ccf0196
comparison
equal deleted inserted replaced
25572:3d8c044ed513 25573:3e89e67f17e8
741 repo.ui.status(_("adding changesets\n")) 741 repo.ui.status(_("adding changesets\n"))
742 clstart = len(cl) 742 clstart = len(cl)
743 class prog(object): 743 class prog(object):
744 step = _('changesets') 744 step = _('changesets')
745 count = 1 745 count = 1
746 ui = repo.ui
747 total = expectedtotal 746 total = expectedtotal
748 def __call__(repo): 747 def __call__(self):
749 repo.ui.progress(repo.step, repo.count, unit=_('chunks'), 748 repo.ui.progress(self.step, self.count, unit=_('chunks'),
750 total=repo.total) 749 total=self.total)
751 repo.count += 1 750 self.count += 1
752 pr = prog() 751 pr = prog()
753 source.callback = pr 752 source.callback = pr
754 753
755 source.changelogheader() 754 source.changelogheader()
756 srccontent = cl.addgroup(source, csmap, trp) 755 srccontent = cl.addgroup(source, csmap, trp)