Show More
@@ -900,7 +900,7 b' def _copy_files(src_vfs_map, dst_vfs_map' | |||
|
900 | 900 | hardlink[0] = False |
|
901 | 901 | progress.topic = _(b'copying') |
|
902 | 902 | |
|
903 |
for k, path |
|
|
903 | for k, path in entries: | |
|
904 | 904 | src_vfs = src_vfs_map[k] |
|
905 | 905 | dst_vfs = dst_vfs_map[k] |
|
906 | 906 | src_path = src_vfs.join(path) |
@@ -951,17 +951,19 b' def local_copy(src_repo, dest_repo):' | |||
|
951 | 951 | if os.path.exists(srcbookmarks): |
|
952 | 952 | bm_count = 1 |
|
953 | 953 | |
|
954 |
entries |
|
|
954 | entries = _entries_walk( | |
|
955 | 955 | src_repo, |
|
956 | 956 | includes=None, |
|
957 | 957 | excludes=None, |
|
958 | 958 | includeobsmarkers=True, |
|
959 | 959 | ) |
|
960 | entries = list(entries) | |
|
960 | 961 | src_vfs_map = _makemap(src_repo) |
|
961 | 962 | dest_vfs_map = _makemap(dest_repo) |
|
963 | total_files = sum(len(e[1].files()) for e in entries) + bm_count | |
|
962 | 964 | progress = src_repo.ui.makeprogress( |
|
963 | 965 | topic=_(b'linking'), |
|
964 |
total= |
|
|
966 | total=total_files, | |
|
965 | 967 | unit=_(b'files'), |
|
966 | 968 | ) |
|
967 | 969 | # copy files |
@@ -971,7 +973,11 b' def local_copy(src_repo, dest_repo):' | |||
|
971 | 973 | # this would also requires checks that nobody is appending any data |
|
972 | 974 | # to the files while we do the clone, so this is not done yet. We |
|
973 | 975 | # could do this blindly when copying files. |
|
974 | files = ((k, path, size) for k, path, ftype, size in entries) | |
|
976 | files = [ | |
|
977 | (vfs_key, f.unencoded_path) | |
|
978 | for vfs_key, e in entries | |
|
979 | for f in e.files() | |
|
980 | ] | |
|
975 | 981 | hardlink = _copy_files(src_vfs_map, dest_vfs_map, files, progress) |
|
976 | 982 | |
|
977 | 983 | # copy bookmarks over |
@@ -984,7 +990,7 b' def local_copy(src_repo, dest_repo):' | |||
|
984 | 990 | msg = b'linked %d files\n' |
|
985 | 991 | else: |
|
986 | 992 | msg = b'copied %d files\n' |
|
987 |
src_repo.ui.debug(msg % |
|
|
993 | src_repo.ui.debug(msg % total_files) | |
|
988 | 994 | |
|
989 | 995 | with dest_repo.transaction(b"localclone") as tr: |
|
990 | 996 | dest_repo.store.write(tr) |
General Comments 0
You need to be logged in to leave comments.
Login now