# HG changeset patch # User Pierre-Yves David # Date 2016-08-03 14:42:10 # Node ID ff5d5751fc1bfb9a364c2b262e4304f42b708369 # Parent 6786c3f8684d263c9019be4f8df123562e6eb20f bundlerepo: also read the 'devel.legacy.exchange' config Bundlerepo does its own bundle2 related logic. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -480,7 +480,14 @@ def getremotechanges(ui, repo, other, on if bundlename or not localrepo: # create a bundle (uncompressed if other repo is not local) - canbundle2 = (ui.configbool('experimental', 'bundle2-exp', True) + # developer config: devel.legacy.exchange + legexc = ui.configlist('devel', 'legacy.exchange') + if not legexc: + forcebundle1 = not ui.configbool('experimental', 'bundle2-exp', + True) + else: + forcebundle1 = 'bundle2' not in legexc and 'bundle1' in legexc + canbundle2 = (not forcebundle1 and other.capable('getbundle') and other.capable('bundle2')) if canbundle2: