mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
changegroup: add version argument to getlocalchangegroup
For some obscure reasons (probably upsetting a Greek goddess), getlocalchangegroup did not have a 'version' argument to control the changegroup version. We fix this to allow cg02 to be used with 'hg bundle' in the future.
This commit is contained in:
parent
28c5867b10
commit
905bd41a77
@ -615,14 +615,15 @@ def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None,
|
||||
bundler = packermap[version][0](repo, bundlecaps)
|
||||
return getsubsetraw(repo, outgoing, bundler, source)
|
||||
|
||||
def getlocalchangegroup(repo, source, outgoing, bundlecaps=None):
|
||||
def getlocalchangegroup(repo, source, outgoing, bundlecaps=None,
|
||||
version='01'):
|
||||
"""Like getbundle, but taking a discovery.outgoing as an argument.
|
||||
|
||||
This is only implemented for local repos and reuses potentially
|
||||
precomputed sets in outgoing."""
|
||||
if not outgoing.missing:
|
||||
return None
|
||||
bundler = cg1packer(repo, bundlecaps)
|
||||
bundler = packermap[version][0](repo, bundlecaps)
|
||||
return getsubset(repo, outgoing, bundler, source)
|
||||
|
||||
def computeoutgoing(repo, heads, common):
|
||||
|
Loading…
Reference in New Issue
Block a user