From 905bd41a77dc079e0afe51d86857842cf284f684 Mon Sep 17 00:00:00 2001 From: Pierre-Yves David Date: Thu, 1 Oct 2015 19:14:33 -0700 Subject: [PATCH] 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. --- mercurial/changegroup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py index e00d46c830..80c91be4a0 100644 --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -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):