D5382: remotefilelog: avoid temporarily using "count" variable as synonym for "total"

2018-12-06 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb34b1b865ef9: remotefilelog: avoid temporarily using 
count variable as synonym for total (authored by 
martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5382?vs=12721=12743

REVISION DETAIL
  https://phab.mercurial-scm.org/D5382

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
@@ -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 = []



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5382: remotefilelog: avoid temporarily using "count" variable as synonym for "total"

2018-12-05 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5382

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
@@ -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 = []



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel