Show More
@@ -882,10 +882,10 b' class cgpacker(object):' | |||||
882 | commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source, |
|
882 | commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source, | |
883 | clstate['clrevtomanifestrev']) |
|
883 | clstate['clrevtomanifestrev']) | |
884 |
|
884 | |||
885 |
for |
|
885 | for tree, deltas in it: | |
886 |
if |
|
886 | if tree: | |
887 | assert self.version == b'03' |
|
887 | assert self.version == b'03' | |
888 |
chunk = _fileheader( |
|
888 | chunk = _fileheader(tree) | |
889 | size += len(chunk) |
|
889 | size += len(chunk) | |
890 | yield chunk |
|
890 | yield chunk | |
891 |
|
891 | |||
@@ -1026,9 +1026,9 b' class cgpacker(object):' | |||||
1026 | # Callback for the manifest, used to collect linkrevs for filelog |
|
1026 | # Callback for the manifest, used to collect linkrevs for filelog | |
1027 | # revisions. |
|
1027 | # revisions. | |
1028 | # Returns the linkrev node (collected in lookupcl). |
|
1028 | # Returns the linkrev node (collected in lookupcl). | |
1029 |
def makelookupmflinknode( |
|
1029 | def makelookupmflinknode(tree, nodes): | |
1030 | if fastpathlinkrev: |
|
1030 | if fastpathlinkrev: | |
1031 |
assert not |
|
1031 | assert not tree | |
1032 | return mfs.__getitem__ |
|
1032 | return mfs.__getitem__ | |
1033 |
|
1033 | |||
1034 | def lookupmflinknode(x): |
|
1034 | def lookupmflinknode(x): | |
@@ -1048,16 +1048,16 b' class cgpacker(object):' | |||||
1048 | treemanifests to send. |
|
1048 | treemanifests to send. | |
1049 | """ |
|
1049 | """ | |
1050 | clnode = nodes[x] |
|
1050 | clnode = nodes[x] | |
1051 |
mdata = mfl.get( |
|
1051 | mdata = mfl.get(tree, x).readfast(shallow=True) | |
1052 | for p, n, fl in mdata.iterentries(): |
|
1052 | for p, n, fl in mdata.iterentries(): | |
1053 | if fl == 't': # subdirectory manifest |
|
1053 | if fl == 't': # subdirectory manifest | |
1054 |
sub |
|
1054 | subtree = tree + p + '/' | |
1055 |
tmfclnodes = tmfnodes.setdefault(sub |
|
1055 | tmfclnodes = tmfnodes.setdefault(subtree, {}) | |
1056 | tmfclnode = tmfclnodes.setdefault(n, clnode) |
|
1056 | tmfclnode = tmfclnodes.setdefault(n, clnode) | |
1057 | if clrevorder[clnode] < clrevorder[tmfclnode]: |
|
1057 | if clrevorder[clnode] < clrevorder[tmfclnode]: | |
1058 | tmfclnodes[n] = clnode |
|
1058 | tmfclnodes[n] = clnode | |
1059 | else: |
|
1059 | else: | |
1060 |
f = |
|
1060 | f = tree + p | |
1061 | fclnodes = fnodes.setdefault(f, {}) |
|
1061 | fclnodes = fnodes.setdefault(f, {}) | |
1062 | fclnode = fclnodes.setdefault(n, clnode) |
|
1062 | fclnode = fclnodes.setdefault(n, clnode) | |
1063 | if clrevorder[clnode] < clrevorder[fclnode]: |
|
1063 | if clrevorder[clnode] < clrevorder[fclnode]: | |
@@ -1066,8 +1066,8 b' class cgpacker(object):' | |||||
1066 | return lookupmflinknode |
|
1066 | return lookupmflinknode | |
1067 |
|
1067 | |||
1068 | while tmfnodes: |
|
1068 | while tmfnodes: | |
1069 |
|
|
1069 | tree, nodes = tmfnodes.popitem() | |
1070 |
store = dirlog( |
|
1070 | store = dirlog(tree) | |
1071 |
|
1071 | |||
1072 | if not self._filematcher.visitdir(store._dir[:-1] or '.'): |
|
1072 | if not self._filematcher.visitdir(store._dir[:-1] or '.'): | |
1073 | prunednodes = [] |
|
1073 | prunednodes = [] | |
@@ -1076,10 +1076,10 b' class cgpacker(object):' | |||||
1076 | prunednodes = [n for n in nodes |
|
1076 | prunednodes = [n for n in nodes | |
1077 | if flr(frev(n)) not in commonrevs] |
|
1077 | if flr(frev(n)) not in commonrevs] | |
1078 |
|
1078 | |||
1079 |
if |
|
1079 | if tree and not prunednodes: | |
1080 | continue |
|
1080 | continue | |
1081 |
|
1081 | |||
1082 |
lookupfn = makelookupmflinknode( |
|
1082 | lookupfn = makelookupmflinknode(tree, nodes) | |
1083 |
|
1083 | |||
1084 | deltas = deltagroup( |
|
1084 | deltas = deltagroup( | |
1085 | self._repo, store, prunednodes, False, lookupfn, |
|
1085 | self._repo, store, prunednodes, False, lookupfn, | |
@@ -1090,7 +1090,7 b' class cgpacker(object):' | |||||
1090 | fullclnodes=self._fullclnodes, |
|
1090 | fullclnodes=self._fullclnodes, | |
1091 | precomputedellipsis=self._precomputedellipsis) |
|
1091 | precomputedellipsis=self._precomputedellipsis) | |
1092 |
|
1092 | |||
1093 |
yield |
|
1093 | yield tree, deltas | |
1094 |
|
1094 | |||
1095 | # The 'source' parameter is useful for extensions |
|
1095 | # The 'source' parameter is useful for extensions | |
1096 | def generatefiles(self, changedfiles, commonrevs, source, |
|
1096 | def generatefiles(self, changedfiles, commonrevs, source, |
General Comments 0
You need to be logged in to leave comments.
Login now