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