##// END OF EJS Templates
changegroup: move manifest chunk emission to generate()...
Gregory Szorc -
r39048:c921ad9c default
parent child Browse files
Show More
@@ -871,11 +871,24 b' class cgpacker(object):'
871 871 fnodes = {} # needed file nodes
872 872
873 873 size = 0
874 for chunk in self.generatemanifests(commonrevs, clrevorder,
875 fastpathlinkrev, mfs, fnodes, source,
876 clstate['clrevtomanifestrev']):
877 size += len(chunk)
878 yield chunk
874 it = self.generatemanifests(
875 commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source,
876 clstate['clrevtomanifestrev'])
877
878 for dir, chunks in it:
879 if dir:
880 assert self.version == b'03'
881 chunk = _fileheader(dir)
882 size += len(chunk)
883 yield chunk
884
885 for chunk in chunks:
886 size += len(chunk)
887 yield chunk
888
889 close = closechunk()
890 size += len(close)
891 yield close
879 892
880 893 self._verbosenote(_('%8.i (manifests)\n') % size)
881 894 yield self._manifestsend
@@ -1053,11 +1066,6 b' class cgpacker(object):'
1053 1066 revs = _sortnodesnormal(store, prunednodes,
1054 1067 self._reorder)
1055 1068
1056 if dir:
1057 assert self.version == b'03'
1058 chunk = _fileheader(dir)
1059 yield chunk
1060
1061 1069 it = deltagroup(
1062 1070 self._repo, revs, store, False, lookupfn,
1063 1071 self._deltaparentfn, self._builddeltaheader,
@@ -1067,11 +1075,7 b' class cgpacker(object):'
1067 1075 fullclnodes=self._fullclnodes,
1068 1076 precomputedellipsis=self._precomputedellipsis)
1069 1077
1070 for chunk in it:
1071 yield chunk
1072
1073 close = closechunk()
1074 yield close
1078 yield dir, it
1075 1079
1076 1080 # The 'source' parameter is useful for extensions
1077 1081 def generatefiles(self, changedfiles, commonrevs, source,
General Comments 0
You need to be logged in to leave comments. Login now