268 total_bytes = 0 |
268 total_bytes = 0 |
269 # Get consistent snapshot of repo, lock during scan. |
269 # Get consistent snapshot of repo, lock during scan. |
270 with repo.lock(): |
270 with repo.lock(): |
271 repo.ui.debug(b'scanning\n') |
271 repo.ui.debug(b'scanning\n') |
272 for entry in _walkstreamfiles(repo): |
272 for entry in _walkstreamfiles(repo): |
273 if entry.file_size: |
273 for f in entry.files(): |
274 entries.append((entry.unencoded_path, entry.file_size)) |
274 if f.file_size: |
275 total_bytes += entry.file_size |
275 entries.append((f.unencoded_path, f.file_size)) |
|
276 total_bytes += f.file_size |
276 _test_sync_point_walk_1(repo) |
277 _test_sync_point_walk_1(repo) |
277 _test_sync_point_walk_2(repo) |
278 _test_sync_point_walk_2(repo) |
278 |
279 |
279 repo.ui.debug( |
280 repo.ui.debug( |
280 b'%d files, %d bytes to transfer\n' % (len(entries), total_bytes) |
281 b'%d files, %d bytes to transfer\n' % (len(entries), total_bytes) |
676 matcher = None |
677 matcher = None |
677 if includes or excludes: |
678 if includes or excludes: |
678 matcher = narrowspec.match(repo.root, includes, excludes) |
679 matcher = narrowspec.match(repo.root, includes, excludes) |
679 |
680 |
680 for entry in _walkstreamfiles(repo, matcher): |
681 for entry in _walkstreamfiles(repo, matcher): |
681 if entry.file_size: |
682 for f in entry.files(): |
682 ft = _fileappend |
683 if f.file_size: |
683 if entry.is_volatile: |
684 ft = _fileappend |
684 ft = _filefull |
685 if f.is_volatile: |
685 entries.append( |
686 ft = _filefull |
686 (_srcstore, entry.unencoded_path, ft, entry.file_size) |
687 entries.append((_srcstore, f.unencoded_path, ft, f.file_size)) |
687 ) |
688 totalfilesize += f.file_size |
688 totalfilesize += entry.file_size |
|
689 for name in _walkstreamfullstorefiles(repo): |
689 for name in _walkstreamfullstorefiles(repo): |
690 if repo.svfs.exists(name): |
690 if repo.svfs.exists(name): |
691 totalfilesize += repo.svfs.lstat(name).st_size |
691 totalfilesize += repo.svfs.lstat(name).st_size |
692 entries.append((_srcstore, name, _filefull, None)) |
692 entries.append((_srcstore, name, _filefull, None)) |
693 if includeobsmarkers and repo.svfs.exists(b'obsstore'): |
693 if includeobsmarkers and repo.svfs.exists(b'obsstore'): |