768 matcher = None |
768 matcher = None |
769 if includes or excludes: |
769 if includes or excludes: |
770 matcher = narrowspec.match(repo.root, includes, excludes) |
770 matcher = narrowspec.match(repo.root, includes, excludes) |
771 |
771 |
772 phase = not repo.publishing() |
772 phase = not repo.publishing() |
773 entries = _walkstreamfiles( |
773 # Python is getting crazy at all the small container we creates, disabling |
774 repo, |
774 # the gc while we do so helps performance a lot. |
775 matcher, |
775 with util.nogc(): |
776 phase=phase, |
776 entries = _walkstreamfiles( |
777 obsolescence=includeobsmarkers, |
777 repo, |
778 ) |
778 matcher, |
779 for entry in entries: |
779 phase=phase, |
780 yield (_srcstore, entry) |
780 obsolescence=includeobsmarkers, |
781 |
781 ) |
782 for name in cacheutil.cachetocopy(repo): |
782 for entry in entries: |
783 if repo.cachevfs.exists(name): |
783 yield (_srcstore, entry) |
784 # not really a StoreEntry, but close enough |
784 |
785 entry = store.SimpleStoreEntry( |
785 for name in cacheutil.cachetocopy(repo): |
786 entry_path=name, |
786 if repo.cachevfs.exists(name): |
787 is_volatile=True, |
787 # not really a StoreEntry, but close enough |
788 ) |
788 entry = store.SimpleStoreEntry( |
789 yield (_srccache, entry) |
789 entry_path=name, |
|
790 is_volatile=True, |
|
791 ) |
|
792 yield (_srccache, entry) |
790 |
793 |
791 |
794 |
792 def generatev2(repo, includes, excludes, includeobsmarkers): |
795 def generatev2(repo, includes, excludes, includeobsmarkers): |
793 """Emit content for version 2 of a streaming clone. |
796 """Emit content for version 2 of a streaming clone. |
794 |
797 |