Mercurial > hg-stable
changeset 26509:83d82fbefccb
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 01 Oct 2015 19:14:47 -0700 |
parents | 47a12de9ac3f |
children | 77c13f3c01ca |
files | mercurial/changegroup.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changegroup.py Thu Oct 01 19:14:33 2015 -0700 +++ b/mercurial/changegroup.py Thu Oct 01 19:14:47 2015 -0700 @@ -645,7 +645,8 @@ 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 @@ 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)