remotefilelog: reduce use of "count" container
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 04 Dec 2018 22:15:42 -0800
changeset 53615 fcee112fb7c4b8f009815ec580b135dffbf568d7
parent 53614 fe0b65ff00e75e5aa913be4aadec22b0019de7dc
child 53616 74e3df7660521b6a180dca9c9c0d72b725e79d51
push id1079
push usergszorc@mozilla.com
push dateMon, 10 Dec 2018 19:44:59 +0000
remotefilelog: reduce use of "count" container We had already given the initial value of "count[0]" a name, so just use that when applicable. Differential Revision: https://phab.mercurial-scm.org/D5385
hgext/remotefilelog/fileserverclient.py
--- a/hgext/remotefilelog/fileserverclient.py
+++ b/hgext/remotefilelog/fileserverclient.py
@@ -356,19 +356,19 @@ class fileserverclient(object):
 
             missed.append(missingid)
 
         global fetchmisses
         fetchmisses += len(missed)
 
         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:
             # receive cache misses from master
             if missed:
                 def progresstick():
                     count[0] += 1
                     progress.update(count[0])