Show More
@@ -2246,6 +2246,8 class localrepository(repo.repository): | |||
|
2246 | 2246 | _('Unexpected response from remote server:'), l) |
|
2247 | 2247 | self.ui.status(_('%d files to transfer, %s of data\n') % |
|
2248 | 2248 | (total_files, util.bytecount(total_bytes))) |
|
2249 | handled_bytes = 0 | |
|
2250 | self.ui.progress(_('clone'), 0, total=total_bytes) | |
|
2249 | 2251 | start = time.time() |
|
2250 | 2252 | for i in xrange(total_files): |
|
2251 | 2253 | # XXX doesn't support '\n' or '\r' in filenames |
@@ -2262,11 +2264,15 class localrepository(repo.repository): | |||
|
2262 | 2264 | # for backwards compat, name was partially encoded |
|
2263 | 2265 | ofp = self.sopener(store.decodedir(name), 'w') |
|
2264 | 2266 | for chunk in util.filechunkiter(fp, limit=size): |
|
2267 | handled_bytes += len(chunk) | |
|
2268 | self.ui.progress(_('clone'), handled_bytes, | |
|
2269 | total=total_bytes) | |
|
2265 | 2270 | ofp.write(chunk) |
|
2266 | 2271 | ofp.close() |
|
2267 | 2272 | elapsed = time.time() - start |
|
2268 | 2273 | if elapsed <= 0: |
|
2269 | 2274 | elapsed = 0.001 |
|
2275 | self.ui.progress(_('clone'), None) | |
|
2270 | 2276 | self.ui.status(_('transferred %s in %.1f seconds (%s/sec)\n') % |
|
2271 | 2277 | (util.bytecount(total_bytes), elapsed, |
|
2272 | 2278 | util.bytecount(total_bytes / elapsed))) |
General Comments 0
You need to be logged in to leave comments.
Login now