comparison mercurial/localrepo.py @ 19200:4cfdec944edf

bundle-ng: move group into the bundler No additional semantic changes made.
author Sune Foldager <cryo@cyanite.org>
date Fri, 10 May 2013 21:03:01 +0200
parents d6d0f1ed8ebb
children 309c439cdbaa
comparison
equal deleted inserted replaced
19199:d6d0f1ed8ebb 19200:4cfdec944edf
2090 2090
2091 def gengroup(): 2091 def gengroup():
2092 # Create a changenode group generator that will call our functions 2092 # Create a changenode group generator that will call our functions
2093 # back to lookup the owning changenode and collect information. 2093 # back to lookup the owning changenode and collect information.
2094 count[:] = [0, len(csets)] 2094 count[:] = [0, len(csets)]
2095 for chunk in cl.group(csets, bundler, reorder=reorder): 2095 for chunk in bundler.group(csets, cl, reorder=reorder):
2096 yield chunk 2096 yield chunk
2097 progress(_bundling, None) 2097 progress(_bundling, None)
2098 2098
2099 # Create a generator for the manifestnodes that calls our lookup 2099 # Create a generator for the manifestnodes that calls our lookup
2100 # and data collection functions back. 2100 # and data collection functions back.
2101 for f in changedfiles: 2101 for f in changedfiles:
2102 fnodes[f] = {} 2102 fnodes[f] = {}
2103 count[:] = [0, len(mfs)] 2103 count[:] = [0, len(mfs)]
2104 for chunk in mf.group(prune(mf, mfs), bundler, reorder=reorder): 2104 for chunk in bundler.group(prune(mf, mfs), mf, reorder=reorder):
2105 yield chunk 2105 yield chunk
2106 progress(_bundling, None) 2106 progress(_bundling, None)
2107 2107
2108 mfs.clear() 2108 mfs.clear()
2109 2109
2119 2119
2120 nodelist = prune(filerevlog, fstate[1]) 2120 nodelist = prune(filerevlog, fstate[1])
2121 if nodelist: 2121 if nodelist:
2122 count[0] += 1 2122 count[0] += 1
2123 yield bundler.fileheader(fname) 2123 yield bundler.fileheader(fname)
2124 for chunk in filerevlog.group(nodelist, bundler, reorder): 2124 for chunk in bundler.group(nodelist, filerevlog, reorder):
2125 yield chunk 2125 yield chunk
2126 2126
2127 # Signal that no more groups are left. 2127 # Signal that no more groups are left.
2128 yield bundler.close() 2128 yield bundler.close()
2129 progress(_bundling, None) 2129 progress(_bundling, None)
2199 def gengroup(): 2199 def gengroup():
2200 '''yield a sequence of changegroup chunks (strings)''' 2200 '''yield a sequence of changegroup chunks (strings)'''
2201 # construct a list of all changed files 2201 # construct a list of all changed files
2202 2202
2203 count[:] = [0, len(nodes)] 2203 count[:] = [0, len(nodes)]
2204 for chunk in cl.group(nodes, bundler, reorder=reorder): 2204 for chunk in bundler.group(nodes, cl, reorder=reorder):
2205 yield chunk 2205 yield chunk
2206 progress(_bundling, None) 2206 progress(_bundling, None)
2207 2207
2208 count[:] = [0, len(mfs)] 2208 count[:] = [0, len(mfs)]
2209 for chunk in mf.group(gennodelst(mf), bundler, reorder=reorder): 2209 for chunk in bundler.group(gennodelst(mf), mf, reorder=reorder):
2210 yield chunk 2210 yield chunk
2211 progress(_bundling, None) 2211 progress(_bundling, None)
2212 2212
2213 count[:] = [0, len(changedfiles)] 2213 count[:] = [0, len(changedfiles)]
2214 for fname in sorted(changedfiles): 2214 for fname in sorted(changedfiles):
2219 fstate[0] = fname 2219 fstate[0] = fname
2220 nodelist = gennodelst(filerevlog) 2220 nodelist = gennodelst(filerevlog)
2221 if nodelist: 2221 if nodelist:
2222 count[0] += 1 2222 count[0] += 1
2223 yield bundler.fileheader(fname) 2223 yield bundler.fileheader(fname)
2224 for chunk in filerevlog.group(nodelist, bundler, reorder): 2224 for chunk in bundler.group(nodelist, filerevlog, reorder):
2225 yield chunk 2225 yield chunk
2226 yield bundler.close() 2226 yield bundler.close()
2227 progress(_bundling, None) 2227 progress(_bundling, None)
2228 2228
2229 if nodes: 2229 if nodes: