Mercurial > hg
comparison mercurial/changegroup.py @ 38910:245c58952298
changegroup: inline _packellipsischangegroup
It now does nothing special. The logic is simple enough to inline
in the 2 callers in narrow that need it.
The changegroup generation APIs could probably be a bit simpler.
But that's for another time.
Differential Revision: https://phab.mercurial-scm.org/D4092
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 03 Aug 2018 14:03:31 -0700 |
parents | 1af339c22aeb |
children | 8a13855c8dbe |
comparison
equal
deleted
inserted
replaced
38909:1af339c22aeb | 38910:245c58952298 |
---|---|
1416 raise error.Abort( | 1416 raise error.Abort( |
1417 _('missing file data for %s:%s - run hg verify') % | 1417 _('missing file data for %s:%s - run hg verify') % |
1418 (f, hex(n))) | 1418 (f, hex(n))) |
1419 | 1419 |
1420 return revisions, files | 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) |