##// END OF EJS Templates
changegroup: move size tracking and end of manifests to generate()...
Gregory Szorc -
r39047:2ebdd265 default
parent child Browse files
Show More
@@ -870,11 +870,16 b' class cgpacker(object):'
870 870
871 871 fnodes = {} # needed file nodes
872 872
873 size = 0
873 874 for chunk in self.generatemanifests(commonrevs, clrevorder,
874 875 fastpathlinkrev, mfs, fnodes, source,
875 876 clstate['clrevtomanifestrev']):
877 size += len(chunk)
876 878 yield chunk
877 879
880 self._verbosenote(_('%8.i (manifests)\n') % size)
881 yield self._manifestsend
882
878 883 mfdicts = None
879 884 if self._ellipses and self._isshallow:
880 885 mfdicts = [(self._repo.manifestlog[n].read(), lr)
@@ -1025,7 +1030,6 b' class cgpacker(object):'
1025 1030 return clnode
1026 1031 return lookupmflinknode
1027 1032
1028 size = 0
1029 1033 while tmfnodes:
1030 1034 dir, nodes = tmfnodes.popitem()
1031 1035 store = dirlog(dir)
@@ -1052,7 +1056,6 b' class cgpacker(object):'
1052 1056 if dir:
1053 1057 assert self.version == b'03'
1054 1058 chunk = _fileheader(dir)
1055 size += len(chunk)
1056 1059 yield chunk
1057 1060
1058 1061 it = deltagroup(
@@ -1065,16 +1068,11 b' class cgpacker(object):'
1065 1068 precomputedellipsis=self._precomputedellipsis)
1066 1069
1067 1070 for chunk in it:
1068 size += len(chunk)
1069 1071 yield chunk
1070 1072
1071 1073 close = closechunk()
1072 size += len(close)
1073 1074 yield close
1074 1075
1075 self._verbosenote(_('%8.i (manifests)\n') % size)
1076 yield self._manifestsend
1077
1078 1076 # The 'source' parameter is useful for extensions
1079 1077 def generatefiles(self, changedfiles, commonrevs, source,
1080 1078 mfdicts, fastpathlinkrev, fnodes, clrevs):
General Comments 0
You need to be logged in to leave comments. Login now