Show More
@@ -659,6 +659,30 b' def _test_sync_point_walk_2(repo):' | |||
|
659 | 659 | """a function for synchronisation during tests""" |
|
660 | 660 | |
|
661 | 661 | |
|
662 | def _entries_walk(repo, includes, excludes, includeobsmarkers): | |
|
663 | """emit a seris of files information useful to clone a repo | |
|
664 | ||
|
665 | return (vfs-key, entry) iterator | |
|
666 | ||
|
667 | Where `entry` is StoreEntry. (used even for cache entries) | |
|
668 | """ | |
|
669 | assert repo._currentlock(repo._lockref) is not None | |
|
670 | ||
|
671 | matcher = None | |
|
672 | if includes or excludes: | |
|
673 | matcher = narrowspec.match(repo.root, includes, excludes) | |
|
674 | ||
|
675 | phase = not repo.publishing() | |
|
676 | entries = _walkstreamfiles( | |
|
677 | repo, | |
|
678 | matcher, | |
|
679 | phase=phase, | |
|
680 | obsolescence=includeobsmarkers, | |
|
681 | ) | |
|
682 | for entry in entries: | |
|
683 | yield (_srcstore, entry) | |
|
684 | ||
|
685 | ||
|
662 | 686 | def _v2_walk(repo, includes, excludes, includeobsmarkers): |
|
663 | 687 | """emit a seris of files information useful to clone a repo |
|
664 | 688 | |
@@ -675,22 +699,17 b' def _v2_walk(repo, includes, excludes, i' | |||
|
675 | 699 | files = [] |
|
676 | 700 | totalfilesize = 0 |
|
677 | 701 | |
|
678 | matcher = None | |
|
679 | if includes or excludes: | |
|
680 | matcher = narrowspec.match(repo.root, includes, excludes) | |
|
681 | ||
|
682 | phase = not repo.publishing() | |
|
683 | entries = _walkstreamfiles( | |
|
684 | repo, matcher, phase=phase, obsolescence=includeobsmarkers | |
|
685 | ) | |
|
686 | for entry in entries: | |
|
702 | vfsmap = _makemap(repo) | |
|
703 | entries = _entries_walk(repo, includes, excludes, includeobsmarkers) | |
|
704 | for vfs_key, entry in entries: | |
|
705 | vfs = vfsmap[vfs_key] | |
|
687 | 706 | for f in entry.files(): |
|
688 |
file_size = f.file_size( |
|
|
707 | file_size = f.file_size(vfs) | |
|
689 | 708 | if file_size: |
|
690 | 709 | ft = _fileappend |
|
691 | 710 | if f.is_volatile: |
|
692 | 711 | ft = _filefull |
|
693 |
files.append(( |
|
|
712 | files.append((vfs_key, f.unencoded_path, ft, file_size)) | |
|
694 | 713 | totalfilesize += file_size |
|
695 | 714 | for name in cacheutil.cachetocopy(repo): |
|
696 | 715 | if repo.cachevfs.exists(name): |
General Comments 0
You need to be logged in to leave comments.
Login now