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