Show More
@@ -42,7 +42,6 b' fetched = 0' | |||
|
42 | 42 | fetchmisses = 0 |
|
43 | 43 | |
|
44 | 44 | _lfsmod = None |
|
45 | _downloading = _('downloading') | |
|
46 | 45 | |
|
47 | 46 | def getcachekey(reponame, file, id): |
|
48 | 47 | pathhash = node.hex(hashlib.sha1(file).digest()) |
@@ -332,7 +331,8 b' class fileserverclient(object):' | |||
|
332 | 331 | cache.request(request) |
|
333 | 332 | |
|
334 | 333 | total = count |
|
335 |
self.ui.progress(_downloading |
|
|
334 | progress = self.ui.makeprogress(_('downloading'), total=count) | |
|
335 | progress.update(0) | |
|
336 | 336 | |
|
337 | 337 | missed = [] |
|
338 | 338 | count = 0 |
@@ -352,7 +352,7 b' class fileserverclient(object):' | |||
|
352 | 352 | # receive progress reports |
|
353 | 353 | parts = missingid.split("_") |
|
354 | 354 | count += int(parts[2]) |
|
355 | self.ui.progress(_downloading, count, total=total) | |
|
355 | progress.update(count) | |
|
356 | 356 | continue |
|
357 | 357 | |
|
358 | 358 | missed.append(missingid) |
@@ -362,7 +362,7 b' class fileserverclient(object):' | |||
|
362 | 362 | |
|
363 | 363 | count = [total - len(missed)] |
|
364 | 364 | fromcache = count[0] |
|
365 |
|
|
|
365 | progress.update(count[0], total=total) | |
|
366 | 366 | self.ui.log("remotefilelog", "remote cache hit rate is %r of %r\n", |
|
367 | 367 | count[0], total, hit=count[0], total=total) |
|
368 | 368 | |
@@ -372,7 +372,7 b' class fileserverclient(object):' | |||
|
372 | 372 | if missed: |
|
373 | 373 | def progresstick(): |
|
374 | 374 | count[0] += 1 |
|
375 |
|
|
|
375 | progress.update(count[0]) | |
|
376 | 376 | # When verbose is true, sshpeer prints 'running ssh...' |
|
377 | 377 | # to stdout, which can interfere with some command |
|
378 | 378 | # outputs |
@@ -427,7 +427,7 b' class fileserverclient(object):' | |||
|
427 | 427 | request = "set\n%d\n%s\n" % (count[0], "\n".join(missed)) |
|
428 | 428 | cache.request(request) |
|
429 | 429 | |
|
430 | self.ui.progress(_downloading, None) | |
|
430 | progress.complete() | |
|
431 | 431 | |
|
432 | 432 | # mark ourselves as a user of this cache |
|
433 | 433 | writedata.markrepo(self.repo.path) |
General Comments 0
You need to be logged in to leave comments.
Login now