Mercurial > hg-stable
changeset 23208:f606e07fa148
bundle2: handle empty 'b2x:changegroup' value in push and pull
Changeset e4dc2b0be056 added advertising of supported changegroup version
through the new 'b2x:changegroup' capability. However, this capability is not
new and has been around since 3.1 with an empty value. This makes new clients
unable to push to 3.2 servers through bundle2 as they cannot find a common
changegroup version to use from and empty list.
Treating empty 'b2x:changegroup' value as old client fixes it.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 06 Nov 2014 09:52:57 +0000 |
parents | ca38764e2f38 |
children | 49ed71f9a7c0 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Thu Nov 06 10:05:43 2014 +0000 +++ b/mercurial/exchange.py Thu Nov 06 09:52:57 2014 +0000 @@ -448,7 +448,7 @@ b2caps = bundle2.bundle2caps(pushop.remote) version = None cgversions = b2caps.get('b2x:changegroup') - if cgversions is None: + if not cgversions: # 3.1 and 3.2 ship with an empty value cg = changegroup.getlocalchangegroupraw(pushop.repo, 'push', pushop.outgoing) else: @@ -1200,7 +1200,7 @@ # build changegroup bundle here. version = None cgversions = b2caps.get('b2x:changegroup') - if cgversions is None: + if not cgversions: # 3.1 and 3.2 ship with an empty value cg = changegroup.getchangegroupraw(repo, source, heads=heads, common=common, bundlecaps=bundlecaps)