Show More
@@ -488,14 +488,15 b' def changegroupsubset(repo, roots, heads' | |||||
488 | bundler = cg1packer(repo) |
|
488 | bundler = cg1packer(repo) | |
489 | return getsubset(repo, outgoing, bundler, source) |
|
489 | return getsubset(repo, outgoing, bundler, source) | |
490 |
|
490 | |||
491 |
def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None |
|
491 | def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None, | |
|
492 | version='01'): | |||
492 | """Like getbundle, but taking a discovery.outgoing as an argument. |
|
493 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
493 |
|
494 | |||
494 | This is only implemented for local repos and reuses potentially |
|
495 | This is only implemented for local repos and reuses potentially | |
495 | precomputed sets in outgoing. Returns a raw changegroup generator.""" |
|
496 | precomputed sets in outgoing. Returns a raw changegroup generator.""" | |
496 | if not outgoing.missing: |
|
497 | if not outgoing.missing: | |
497 | return None |
|
498 | return None | |
498 |
bundler = |
|
499 | bundler = packermap[version][0](repo, bundlecaps) | |
499 | return getsubsetraw(repo, outgoing, bundler, source) |
|
500 | return getsubsetraw(repo, outgoing, bundler, source) | |
500 |
|
501 | |||
501 | def getlocalchangegroup(repo, source, outgoing, bundlecaps=None): |
|
502 | def getlocalchangegroup(repo, source, outgoing, bundlecaps=None): | |
@@ -527,17 +528,21 b' def _computeoutgoing(repo, heads, common' | |||||
527 | heads = cl.heads() |
|
528 | heads = cl.heads() | |
528 | return discovery.outgoing(cl, common, heads) |
|
529 | return discovery.outgoing(cl, common, heads) | |
529 |
|
530 | |||
530 |
def getchangegroupraw(repo, source, heads=None, common=None, bundlecaps=None |
|
531 | def getchangegroupraw(repo, source, heads=None, common=None, bundlecaps=None, | |
|
532 | version='01'): | |||
531 | """Like changegroupsubset, but returns the set difference between the |
|
533 | """Like changegroupsubset, but returns the set difference between the | |
532 | ancestors of heads and the ancestors common. |
|
534 | ancestors of heads and the ancestors common. | |
533 |
|
535 | |||
534 | If heads is None, use the local heads. If common is None, use [nullid]. |
|
536 | If heads is None, use the local heads. If common is None, use [nullid]. | |
535 |
|
537 | |||
|
538 | If version is None, use a version '1' changegroup. | |||
|
539 | ||||
536 | The nodes in common might not all be known locally due to the way the |
|
540 | The nodes in common might not all be known locally due to the way the | |
537 | current discovery protocol works. Returns a raw changegroup generator. |
|
541 | current discovery protocol works. Returns a raw changegroup generator. | |
538 | """ |
|
542 | """ | |
539 | outgoing = _computeoutgoing(repo, heads, common) |
|
543 | outgoing = _computeoutgoing(repo, heads, common) | |
540 |
return getlocalchangegroupraw(repo, source, outgoing, bundlecaps=bundlecaps |
|
544 | return getlocalchangegroupraw(repo, source, outgoing, bundlecaps=bundlecaps, | |
|
545 | version=version) | |||
541 |
|
546 | |||
542 | def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): |
|
547 | def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): | |
543 | """Like changegroupsubset, but returns the set difference between the |
|
548 | """Like changegroupsubset, but returns the set difference between the |
General Comments 0
You need to be logged in to leave comments.
Login now