This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb6a6dc1a14bd: remotefilelog: use progress helper in
shallowrepo (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5380?vs=12719=12741
REVISION DETAIL
https://phab.mercurial-scm.org/D5380
AFFECTED FILES
hgext/remotefilelog/shallowrepo.py
CHANGE DETAILS
diff --git a/hgext/remotefilelog/shallowrepo.py
b/hgext/remotefilelog/shallowrepo.py
--- a/hgext/remotefilelog/shallowrepo.py
+++ b/hgext/remotefilelog/shallowrepo.py
@@ -40,8 +40,6 @@
from mercurial.utils import procutil
_hgexecutable = procutil.hgexecutable
-_prefetching = _('prefetching')
-
# These make*stores functions are global so that other extensions can replace
# them.
def makelocalstores(repo):
@@ -233,9 +231,9 @@
serverfiles = skip.copy()
visited = set()
visited.add(nullrev)
-revnum = 0
revcount = len(revs)
-self.ui.progress(_prefetching, revnum, total=revcount)
+progress = self.ui.makeprogress(_('prefetching'), total=revcount)
+progress.update(0)
for rev in sorted(revs):
ctx = repo[rev]
if pats:
@@ -264,12 +262,11 @@
files.update(diff)
visited.add(mfrev)
-revnum += 1
-self.ui.progress(_prefetching, revnum, total=revcount)
+progress.increment()
files.difference_update(skip)
serverfiles.difference_update(skip)
-self.ui.progress(_prefetching, None)
+progress.complete()
# Fetch files known to be on the server
if serverfiles:
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