remotefilelog: replace a "a=[expr]; b=a[0]" by "b=expr; a = [b]"
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 04 Dec 2018 22:12:47 -0800
changeset 40849 fe0b65ff00e7
parent 40848 70de33b9d328
child 40850 fcee112fb7c4
remotefilelog: replace a "a=[expr]; b=a[0]" by "b=expr; a = [b]" Simpler is better. Differential Revision: https://phab.mercurial-scm.org/D5384
hgext/remotefilelog/fileserverclient.py
--- a/hgext/remotefilelog/fileserverclient.py	Tue Dec 04 22:09:33 2018 -0800
+++ b/hgext/remotefilelog/fileserverclient.py	Tue Dec 04 22:12:47 2018 -0800
@@ -359,8 +359,8 @@
         global fetchmisses
         fetchmisses += len(missed)
 
-        count = [total - len(missed)]
-        fromcache = count[0]
+        fromcache = total - len(missed)
+        count = [fromcache]
         progress.update(count[0], total=total)
         self.ui.log("remotefilelog", "remote cache hit rate is %r of %r\n",
                     count[0], total, hit=count[0], total=total)