Show More
@@ -26,7 +26,6 b' from .thirdparty import (' | |||
|
26 | 26 | from . import ( |
|
27 | 27 | dagutil, |
|
28 | 28 | error, |
|
29 | manifest, | |
|
30 | 29 | match as matchmod, |
|
31 | 30 | mdiff, |
|
32 | 31 | phases, |
@@ -824,16 +823,6 b' class cgpacker(object):' | |||
|
824 | 823 | |
|
825 | 824 | yield closechunk() |
|
826 | 825 | |
|
827 | # filter any nodes that claim to be part of the known set | |
|
828 | def _prune(self, store, missing, commonrevs): | |
|
829 | # TODO this violates storage abstraction for manifests. | |
|
830 | if isinstance(store, manifest.manifestrevlog): | |
|
831 | if not self._filematcher.visitdir(store._dir[:-1] or '.'): | |
|
832 | return [] | |
|
833 | ||
|
834 | rr, rl = store.rev, store.linkrev | |
|
835 | return [n for n in missing if rl(rr(n)) not in commonrevs] | |
|
836 | ||
|
837 | 826 | def generate(self, commonrevs, clnodes, fastpathlinkrev, source): |
|
838 | 827 | """Yield a sequence of changegroup byte chunks.""" |
|
839 | 828 | |
@@ -1031,7 +1020,13 b' class cgpacker(object):' | |||
|
1031 | 1020 | while tmfnodes: |
|
1032 | 1021 | dir, nodes = tmfnodes.popitem() |
|
1033 | 1022 | store = dirlog(dir) |
|
1034 | prunednodes = self._prune(store, nodes, commonrevs) | |
|
1023 | ||
|
1024 | if not self._filematcher.visitdir(store._dir[:-1] or '.'): | |
|
1025 | prunednodes = [] | |
|
1026 | else: | |
|
1027 | frev, flr = store.rev, store.linkrev | |
|
1028 | prunednodes = [n for n in nodes | |
|
1029 | if flr(frev(n)) not in commonrevs] | |
|
1035 | 1030 | |
|
1036 | 1031 | if dir and not prunednodes: |
|
1037 | 1032 | continue |
@@ -1127,7 +1122,10 b' class cgpacker(object):' | |||
|
1127 | 1122 | def lookupfilelog(x): |
|
1128 | 1123 | return linkrevnodes[x] |
|
1129 | 1124 | |
|
1130 | filenodes = self._prune(filerevlog, linkrevnodes, commonrevs) | |
|
1125 | frev, flr = filerevlog.rev, filerevlog.linkrev | |
|
1126 | filenodes = [n for n in linkrevnodes | |
|
1127 | if flr(frev(n)) not in commonrevs] | |
|
1128 | ||
|
1131 | 1129 | if filenodes: |
|
1132 | 1130 | if self._ellipses: |
|
1133 | 1131 | revs = _sortnodesellipsis(filerevlog, filenodes, |
General Comments 0
You need to be logged in to leave comments.
Login now