# HG changeset patch # User Martin von Zweigbergk # Date 1434131650 25200 # Node ID 3e89e67f17e8664deb6bef6509d2522eecaa1134 # Parent 3d8c044ed513e36cdeec009167b9fd3501b00b4d 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. diff -r 3d8c044ed513 -r 3e89e67f17e8 mercurial/changegroup.py --- 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