Show More
@@ -116,10 +116,15 b' def getbundlechangegrouppart_narrow(bund' | |||
|
116 | 116 | newvisit, newfull, newellipsis = exchange._computeellipsis( |
|
117 | 117 | repo, set(), common, known, newmatch) |
|
118 | 118 | if newvisit: |
|
119 |
|
|
|
120 | repo, common, newmatch, newfull, newellipsis, | |
|
121 | newvisit, depth, source, version) | |
|
122 | part = bundler.newpart('changegroup', data=cg) | |
|
119 | packer = changegroup.getbundler(version, repo, | |
|
120 | filematcher=newmatch, | |
|
121 | ellipses=True, | |
|
122 | shallow=depth is not None, | |
|
123 | ellipsisroots=newellipsis, | |
|
124 | fullnodes=newfull) | |
|
125 | cgdata = packer.generate(common, newvisit, False, source) | |
|
126 | ||
|
127 | part = bundler.newpart('changegroup', data=cgdata) | |
|
123 | 128 | part.addparam('version', version) |
|
124 | 129 | if 'treemanifest' in repo.requirements: |
|
125 | 130 | part.addparam('treemanifest', '1') |
@@ -129,10 +134,15 b' def getbundlechangegrouppart_narrow(bund' | |||
|
129 | 134 | |
|
130 | 135 | repo.ui.debug('Found %d relevant revs\n' % len(relevant_nodes)) |
|
131 | 136 | if visitnodes: |
|
132 | cg = changegroup._packellipsischangegroup( | |
|
133 | repo, common, newmatch, relevant_nodes, ellipsisroots, | |
|
134 | visitnodes, depth, source, version) | |
|
135 | part = bundler.newpart('changegroup', data=cg) | |
|
137 | packer = changegroup.getbundler(version, repo, | |
|
138 | filematcher=newmatch, | |
|
139 | ellipses=True, | |
|
140 | shallow=depth is not None, | |
|
141 | ellipsisroots=ellipsisroots, | |
|
142 | fullnodes=relevant_nodes) | |
|
143 | cgdata = packer.generate(common, visitnodes, False, source) | |
|
144 | ||
|
145 | part = bundler.newpart('changegroup', data=cgdata) | |
|
136 | 146 | part.addparam('version', version) |
|
137 | 147 | if 'treemanifest' in repo.requirements: |
|
138 | 148 | part.addparam('treemanifest', '1') |
@@ -1418,18 +1418,3 b' def _addchangegroupfiles(repo, source, r' | |||
|
1418 | 1418 | (f, hex(n))) |
|
1419 | 1419 | |
|
1420 | 1420 | return revisions, files |
|
1421 | ||
|
1422 | def _packellipsischangegroup(repo, common, match, relevant_nodes, | |
|
1423 | ellipsisroots, visitnodes, depth, source, version): | |
|
1424 | # We wrap cg1packer.revchunk, using a side channel to pass | |
|
1425 | # relevant_nodes into that area. Then if linknode isn't in the | |
|
1426 | # set, we know we have an ellipsis node and we should defer | |
|
1427 | # sending that node's data. We override close() to detect | |
|
1428 | # pending ellipsis nodes and flush them. | |
|
1429 | packer = getbundler(version, repo, filematcher=match, | |
|
1430 | ellipses=True, | |
|
1431 | shallow=depth is not None, | |
|
1432 | ellipsisroots=ellipsisroots, | |
|
1433 | fullnodes=relevant_nodes) | |
|
1434 | ||
|
1435 | return packer.generate(common, visitnodes, False, source) |
General Comments 0
You need to be logged in to leave comments.
Login now