changeset 40849:fe0b65ff00e7

remotefilelog: replace a "a=[expr]; b=a[0]" by "b=expr; a = [b]" Simpler is better. Differential Revision: https://phab.mercurial-scm.org/D5384
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 04 Dec 2018 22:12:47 -0800
parents 70de33b9d328
children fcee112fb7c4
files hgext/remotefilelog/fileserverclient.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)