# HG changeset patch # User Pierre-Yves David # Date 2015-10-02 02:14:47 # Node ID 83d82fbefccb8d60afe84570f00a5cd409a0d9b2 # Parent 47a12de9ac3f657a752deadbf9cfa32dc250a07f changegroup: add version argument to getchangegroup For some obscure reasons (probably upsetting a Greek goddess), getchangegroup did not had a 'version' argument to control the changegroup version. We fixes this to allow cg02 to be used with 'hg bundle' in the future. diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -645,7 +645,8 @@ def computeoutgoing(repo, heads, common) heads = cl.heads() return discovery.outgoing(cl, common, heads) -def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None): +def getchangegroup(repo, source, heads=None, common=None, bundlecaps=None, + version='01'): """Like changegroupsubset, but returns the set difference between the ancestors of heads and the ancestors common. @@ -655,7 +656,8 @@ def getchangegroup(repo, source, heads=N current discovery protocol works. """ outgoing = computeoutgoing(repo, heads, common) - return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps) + return getlocalchangegroup(repo, source, outgoing, bundlecaps=bundlecaps, + version=version) def changegroup(repo, basenodes, source): # to avoid a race we use changegroupsubset() (issue1320)