hgext/narrow/narrowbundle2.py
changeset 43245 c320887c8e1c
parent 43244 c5adf480de0f
child 43246 0fd47eb508c6
equal deleted inserted replaced
43244:c5adf480de0f 43245:c320887c8e1c
   184         part = bundler.newpart(b'changegroup', data=cgdata)
   184         part = bundler.newpart(b'changegroup', data=cgdata)
   185         part.addparam(b'version', version)
   185         part.addparam(b'version', version)
   186         if b'treemanifest' in repo.requirements:
   186         if b'treemanifest' in repo.requirements:
   187             part.addparam(b'treemanifest', b'1')
   187             part.addparam(b'treemanifest', b'1')
   188 
   188 
   189     visitnodes, relevant_nodes, ellipsisroots = exchange._computeellipsis(
       
   190         repo, common, heads, set(), newmatch, depth=depth
       
   191     )
       
   192 
       
   193     repo.ui.debug(b'Found %d relevant revs\n' % len(relevant_nodes))
       
   194     if visitnodes:
       
   195         packer = changegroup.getbundler(
       
   196             version,
       
   197             repo,
       
   198             matcher=newmatch,
       
   199             ellipses=True,
       
   200             shallow=depth is not None,
       
   201             ellipsisroots=ellipsisroots,
       
   202             fullnodes=relevant_nodes,
       
   203         )
       
   204         cgdata = packer.generate(common, visitnodes, False, b'narrow_widen')
       
   205 
       
   206         part = bundler.newpart(b'changegroup', data=cgdata)
       
   207         part.addparam(b'version', version)
       
   208         if b'treemanifest' in repo.requirements:
       
   209             part.addparam(b'treemanifest', b'1')
       
   210 
       
   211 
   189 
   212 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE))
   190 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE))
   213 def _handlechangespec_2(op, inpart):
   191 def _handlechangespec_2(op, inpart):
   214     # XXX: This bundle2 handling is buggy and should be removed after hg5.2 is
   192     # XXX: This bundle2 handling is buggy and should be removed after hg5.2 is
   215     # released. New servers will send a mandatory bundle2 part named
   193     # released. New servers will send a mandatory bundle2 part named