##// END OF EJS Templates
changegroup: move file chunk emission to generate()...
Gregory Szorc -
r39049:c4a2d19d default
parent child Browse files
Show More
@@ -901,10 +901,24 b' class cgpacker(object):'
901 mfs.clear()
901 mfs.clear()
902 clrevs = set(cl.rev(x) for x in clnodes)
902 clrevs = set(cl.rev(x) for x in clnodes)
903
903
904 for chunk in self.generatefiles(changedfiles, commonrevs,
904 it = self.generatefiles(changedfiles, commonrevs,
905 source, mfdicts, fastpathlinkrev,
905 source, mfdicts, fastpathlinkrev,
906 fnodes, clrevs):
906 fnodes, clrevs)
907 yield chunk
907
908 for path, chunks in it:
909 h = _fileheader(path)
910 size = len(h)
911 yield h
912
913 for chunk in chunks:
914 size += len(chunk)
915 yield chunk
916
917 close = closechunk()
918 size += len(close)
919 yield close
920
921 self._verbosenote(_('%8.i %s\n') % (size, path))
908
922
909 yield closechunk()
923 yield closechunk()
910
924
@@ -1157,9 +1171,6 b' class cgpacker(object):'
1157 self._reorder)
1171 self._reorder)
1158
1172
1159 progress.update(i + 1, item=fname)
1173 progress.update(i + 1, item=fname)
1160 h = _fileheader(fname)
1161 size = len(h)
1162 yield h
1163
1174
1164 it = deltagroup(
1175 it = deltagroup(
1165 self._repo, revs, filerevlog, False, lookupfilelog,
1176 self._repo, revs, filerevlog, False, lookupfilelog,
@@ -1169,15 +1180,8 b' class cgpacker(object):'
1169 fullclnodes=self._fullclnodes,
1180 fullclnodes=self._fullclnodes,
1170 precomputedellipsis=self._precomputedellipsis)
1181 precomputedellipsis=self._precomputedellipsis)
1171
1182
1172 for chunk in it:
1183 yield fname, it
1173 size += len(chunk)
1174 yield chunk
1175
1184
1176 close = closechunk()
1177 size += len(close)
1178 yield close
1179
1180 self._verbosenote(_('%8.i %s\n') % (size, fname))
1181 progress.complete()
1185 progress.complete()
1182
1186
1183 def _deltaparentprev(store, rev, p1, p2, prev):
1187 def _deltaparentprev(store, rev, p1, p2, prev):
General Comments 0
You need to be logged in to leave comments. Login now