Show More
@@ -963,14 +963,30 b' class localrepository:' | |||
|
963 | 963 | return msng_mnfst_set[mnfstnode] |
|
964 | 964 | |
|
965 | 965 | def filenode_collector(changedfiles): |
|
966 | next_rev = [0] | |
|
966 | 967 | def collect_msng_filenodes(mnfstnode): |
|
967 |
|
|
|
968 |
f |
|
|
969 | fnode = m.get(f, None) | |
|
970 | if fnode is not None: | |
|
971 |
|
|
|
972 | ndset = msng_filenode_set.setdefault(f, {}) | |
|
973 |
|
|
|
968 | r = mnfst.rev(mnfstnode) | |
|
969 | if r == next_rev[0]: | |
|
970 | # If the last rev we looked at was the one just previous, | |
|
971 | # we only need to see a diff. | |
|
972 | delta = mdiff.patchtext(mnfst.delta(mnfstnode)) | |
|
973 | for dline in delta.splitlines(): | |
|
974 | f, fnode = dline.split('\0') | |
|
975 | fnode = bin(fnode[:40]) | |
|
976 | f = changedfiles.get(f, None) | |
|
977 | if f is not None: | |
|
978 | clnode = msng_mnfst_set[mnfstnode] | |
|
979 | ndset = msng_filenode_set.setdefault(f, {}) | |
|
980 | ndset.setdefault(fnode, clnode) | |
|
981 | else: | |
|
982 | m = mnfst.read(mnfstnode) | |
|
983 | for f in changedfiles: | |
|
984 | fnode = m.get(f, None) | |
|
985 | if fnode is not None: | |
|
986 | clnode = msng_mnfst_set[mnfstnode] | |
|
987 | ndset = msng_filenode_set.setdefault(f, {}) | |
|
988 | ndset.setdefault(fnode, clnode) | |
|
989 | next_rev[0] = r + 1 | |
|
974 | 990 | return collect_msng_filenodes |
|
975 | 991 | |
|
976 | 992 | def prune_filenodes(f, filerevlog): |
@@ -997,14 +1013,14 b' class localrepository:' | |||
|
997 | 1013 | prune_manifests() |
|
998 | 1014 | msng_mnfst_lst = msng_mnfst_set.keys() |
|
999 | 1015 | msng_mnfst_lst.sort(cmp_by_rev_func(mnfst)) |
|
1000 | changedfiles = changedfiles.keys() | |
|
1001 | changedfiles.sort() | |
|
1002 | 1016 | group = mnfst.group(msng_mnfst_lst, lookup_manifest_link, |
|
1003 | 1017 | filenode_collector(changedfiles)) |
|
1004 | 1018 | for chnk in group: |
|
1005 | 1019 | yield chnk |
|
1006 | 1020 | msng_mnfst_lst = None |
|
1007 | 1021 | msng_mnfst_set.clear() |
|
1022 | changedfiles = changedfiles.keys() | |
|
1023 | changedfiles.sort() | |
|
1008 | 1024 | for fname in changedfiles: |
|
1009 | 1025 | filerevlog = self.file(fname) |
|
1010 | 1026 | prune_filenodes(fname, filerevlog) |
General Comments 0
You need to be logged in to leave comments.
Login now