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