Show More
@@ -2021,6 +2021,9 b' class localrepository(object):' | |||||
2021 | handled_bytes = 0 |
|
2021 | handled_bytes = 0 | |
2022 | self.ui.progress(_('clone'), 0, total=total_bytes) |
|
2022 | self.ui.progress(_('clone'), 0, total=total_bytes) | |
2023 | start = time.time() |
|
2023 | start = time.time() | |
|
2024 | ||||
|
2025 | tr = self.transaction(_('clone')) | |||
|
2026 | try: | |||
2024 | for i in xrange(total_files): |
|
2027 | for i in xrange(total_files): | |
2025 | # XXX doesn't support '\n' or '\r' in filenames |
|
2028 | # XXX doesn't support '\n' or '\r' in filenames | |
2026 | l = fp.readline() |
|
2029 | l = fp.readline() | |
@@ -2041,6 +2044,13 b' class localrepository(object):' | |||||
2041 | total=total_bytes) |
|
2044 | total=total_bytes) | |
2042 | ofp.write(chunk) |
|
2045 | ofp.write(chunk) | |
2043 | ofp.close() |
|
2046 | ofp.close() | |
|
2047 | tr.close() | |||
|
2048 | finally: | |||
|
2049 | tr.release() | |||
|
2050 | ||||
|
2051 | # Writing straight to files circumvented the inmemory caches | |||
|
2052 | self.invalidate() | |||
|
2053 | ||||
2044 | elapsed = time.time() - start |
|
2054 | elapsed = time.time() - start | |
2045 | if elapsed <= 0: |
|
2055 | if elapsed <= 0: | |
2046 | elapsed = 0.001 |
|
2056 | elapsed = 0.001 |
General Comments 0
You need to be logged in to leave comments.
Login now