changeset 29684:ff5d5751fc1b

bundlerepo: also read the 'devel.legacy.exchange' config Bundlerepo does its own bundle2 related logic.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 03 Aug 2016 16:42:10 +0200
parents 6786c3f8684d
children 06e642d7f76c
files mercurial/bundlerepo.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Tue Aug 02 14:48:21 2016 +0200
+++ b/mercurial/bundlerepo.py	Wed Aug 03 16:42:10 2016 +0200
@@ -480,7 +480,14 @@
     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: