D5385: remotefilelog: reduce use of "count" container
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Dec 5 17:40:04 UTC 2018
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
We had already given the initial value of "count[0]" a name, so just
use that when applicable.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5385
AFFECTED FILES
hgext/remotefilelog/fileserverclient.py
CHANGE DETAILS
diff --git a/hgext/remotefilelog/fileserverclient.py b/hgext/remotefilelog/fileserverclient.py
--- a/hgext/remotefilelog/fileserverclient.py
+++ b/hgext/remotefilelog/fileserverclient.py
@@ -361,9 +361,9 @@
fromcache = total - len(missed)
count = [fromcache]
- progress.update(count[0], total=total)
+ progress.update(fromcache, total=total)
self.ui.log("remotefilelog", "remote cache hit rate is %r of %r\n",
- count[0], total, hit=count[0], total=total)
+ fromcache, total, hit=fromcache, total=total)
oldumask = os.umask(0o002)
try:
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list