equal
deleted
inserted
replaced
275 for f in entry.files(): |
275 for f in entry.files(): |
276 file_size = f.file_size(repo.store.vfs) |
276 file_size = f.file_size(repo.store.vfs) |
277 if file_size: |
277 if file_size: |
278 entries.append((f.unencoded_path, file_size)) |
278 entries.append((f.unencoded_path, file_size)) |
279 total_bytes += file_size |
279 total_bytes += file_size |
280 _test_sync_point_walk_1(repo) |
280 _test_sync_point_walk_3(repo) |
281 _test_sync_point_walk_2(repo) |
281 _test_sync_point_walk_4(repo) |
282 |
282 |
283 repo.ui.debug( |
283 repo.ui.debug( |
284 b'%d files, %d bytes to transfer\n' % (len(entries), total_bytes) |
284 b'%d files, %d bytes to transfer\n' % (len(entries), total_bytes) |
285 ) |
285 ) |
286 |
286 |
811 yield name |
811 yield name |
812 yield from stream |
812 yield from stream |
813 progress.increment() |
813 progress.increment() |
814 |
814 |
815 |
815 |
816 def _test_sync_point_walk_1(repo): |
816 def _test_sync_point_walk_3(repo): |
817 """a function for synchronisation during tests""" |
817 """a function for synchronisation during tests""" |
818 |
818 |
819 |
819 |
820 def _test_sync_point_walk_2(repo): |
820 def _test_sync_point_walk_4(repo): |
821 """a function for synchronisation during tests""" |
821 """a function for synchronisation during tests""" |
822 |
822 |
823 |
823 |
824 def _entries_walk(repo, includes, excludes, includeobsmarkers): |
824 def _entries_walk(repo, includes, excludes, includeobsmarkers): |
825 """emit a seris of files information useful to clone a repo |
825 """emit a seris of files information useful to clone a repo |
881 ) |
881 ) |
882 |
882 |
883 chunks = _emit2(repo, entries) |
883 chunks = _emit2(repo, entries) |
884 first = next(chunks) |
884 first = next(chunks) |
885 file_count, total_file_size = first |
885 file_count, total_file_size = first |
886 _test_sync_point_walk_1(repo) |
886 _test_sync_point_walk_3(repo) |
887 _test_sync_point_walk_2(repo) |
887 _test_sync_point_walk_4(repo) |
888 |
888 |
889 return file_count, total_file_size, chunks |
889 return file_count, total_file_size, chunks |
890 |
890 |
891 |
891 |
892 def generatev3(repo, includes, excludes, includeobsmarkers): |
892 def generatev3(repo, includes, excludes, includeobsmarkers): |
927 includeobsmarkers=includeobsmarkers, |
927 includeobsmarkers=includeobsmarkers, |
928 ) |
928 ) |
929 chunks = _emit3(repo, list(entries)) |
929 chunks = _emit3(repo, list(entries)) |
930 first = next(chunks) |
930 first = next(chunks) |
931 assert first is None |
931 assert first is None |
932 _test_sync_point_walk_1(repo) |
932 _test_sync_point_walk_3(repo) |
933 _test_sync_point_walk_2(repo) |
933 _test_sync_point_walk_4(repo) |
934 |
934 |
935 return chunks |
935 return chunks |
936 |
936 |
937 |
937 |
938 @contextlib.contextmanager |
938 @contextlib.contextmanager |