Mercurial > hg
changeset 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 | 3d8c044ed513 |
children | 88a17ccf0196 |
files | mercurial/changegroup.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changegroup.py Sun Jun 14 21:51:57 2015 -0400 +++ b/mercurial/changegroup.py Fri Jun 12 10:54:10 2015 -0700 @@ -743,12 +743,11 @@ class prog(object): step = _('changesets') count = 1 - ui = repo.ui total = expectedtotal - def __call__(repo): - repo.ui.progress(repo.step, repo.count, unit=_('chunks'), - total=repo.total) - repo.count += 1 + def __call__(self): + repo.ui.progress(self.step, self.count, unit=_('chunks'), + total=self.total) + self.count += 1 pr = prog() source.callback = pr