# HG changeset patch # User Pierre-Yves David # Date 1415267577 0 # Node ID f606e07fa1482e932eb8a7c4d78ffd4daf838f80 # Parent ca38764e2f384320f6c01e8bfc273837303fbbd4 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. diff -r ca38764e2f38 -r f606e07fa148 mercurial/exchange.py --- 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)