##// END OF EJS Templates
remotefilelog: use progress helper in shallowrepo...
Martin von Zweigbergk -
r40880:b6a6dc1a default
parent child Browse files
Show More
@@ -40,8 +40,6 b' else:'
40 from mercurial.utils import procutil
40 from mercurial.utils import procutil
41 _hgexecutable = procutil.hgexecutable
41 _hgexecutable = procutil.hgexecutable
42
42
43 _prefetching = _('prefetching')
44
45 # These make*stores functions are global so that other extensions can replace
43 # These make*stores functions are global so that other extensions can replace
46 # them.
44 # them.
47 def makelocalstores(repo):
45 def makelocalstores(repo):
@@ -233,9 +231,9 b' def wraprepo(repo):'
233 serverfiles = skip.copy()
231 serverfiles = skip.copy()
234 visited = set()
232 visited = set()
235 visited.add(nullrev)
233 visited.add(nullrev)
236 revnum = 0
237 revcount = len(revs)
234 revcount = len(revs)
238 self.ui.progress(_prefetching, revnum, total=revcount)
235 progress = self.ui.makeprogress(_('prefetching'), total=revcount)
236 progress.update(0)
239 for rev in sorted(revs):
237 for rev in sorted(revs):
240 ctx = repo[rev]
238 ctx = repo[rev]
241 if pats:
239 if pats:
@@ -264,12 +262,11 b' def wraprepo(repo):'
264 files.update(diff)
262 files.update(diff)
265
263
266 visited.add(mfrev)
264 visited.add(mfrev)
267 revnum += 1
265 progress.increment()
268 self.ui.progress(_prefetching, revnum, total=revcount)
269
266
270 files.difference_update(skip)
267 files.difference_update(skip)
271 serverfiles.difference_update(skip)
268 serverfiles.difference_update(skip)
272 self.ui.progress(_prefetching, None)
269 progress.complete()
273
270
274 # Fetch files known to be on the server
271 # Fetch files known to be on the server
275 if serverfiles:
272 if serverfiles:
General Comments 0
You need to be logged in to leave comments. Login now