changeset 40847:b34b1b865ef9

remotefilelog: avoid temporarily using "count" variable as synonym for "total" The "count" variable is generally used for updating progress, but early in fileserverclient.request(), its used to mean the total count. We already have another "total" variable for that, so it seems much clearer to use that. Differential Revision: https://phab.mercurial-scm.org/D5382
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 04 Dec 2018 21:58:46 -0800
parents e58cd7ede1c3
children 70de33b9d328
files hgext/remotefilelog/fileserverclient.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/remotefilelog/fileserverclient.py	Wed Dec 05 09:30:01 2018 -0800
+++ b/hgext/remotefilelog/fileserverclient.py	Tue Dec 04 21:58:46 2018 -0800
@@ -317,8 +317,8 @@
         writedata = self.writedata
 
         repo = self.repo
-        count = len(fileids)
-        request = "get\n%d\n" % count
+        total = len(fileids)
+        request = "get\n%d\n" % total
         idmap = {}
         reponame = repo.name
         for file, id in fileids:
@@ -330,8 +330,7 @@
 
         cache.request(request)
 
-        total = count
-        progress = self.ui.makeprogress(_('downloading'), total=count)
+        progress = self.ui.makeprogress(_('downloading'), total=total)
         progress.update(0)
 
         missed = []