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