643 common = [nullid] |
643 common = [nullid] |
644 if not heads: |
644 if not heads: |
645 heads = cl.heads() |
645 heads = cl.heads() |
646 return discovery.outgoing(cl, common, heads) |
646 return discovery.outgoing(cl, common, heads) |
647 |
647 |
648 def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): |
648 def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None, |
|
649 version='01'): |
649 """Like changegroupsubset, but returns the set difference between the |
650 """Like changegroupsubset, but returns the set difference between the |
650 ancestors of heads and the ancestors common. |
651 ancestors of heads and the ancestors common. |
651 |
652 |
652 If heads is None, use the local heads. If common is None, use [nullid]. |
653 If heads is None, use the local heads. If common is None, use [nullid]. |
653 |
654 |
654 The nodes in common might not all be known locally due to the way the |
655 The nodes in common might not all be known locally due to the way the |
655 current discovery protocol works. |
656 current discovery protocol works. |
656 """ |
657 """ |
657 outgoing = computeoutgoing(repo, heads, common) |
658 outgoing = computeoutgoing(repo, heads, common) |
658 return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps) |
659 return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps, |
|
660 version=version) |
659 |
661 |
660 def changegroup(repo, basenodes, source): |
662 def changegroup(repo, basenodes, source): |
661 # to avoid a race we use changegroupsubset() (issue1320) |
663 # to avoid a race we use changegroupsubset() (issue1320) |
662 return changegroupsubset(repo, basenodes, repo.heads(), source) |
664 return changegroupsubset(repo, basenodes, repo.heads(), source) |
663 |
665 |