changeset 3510:3bd642f11313 stable

legacy: respect explicit config for server.bundle1 Unconditionally disabling bundle1 is a problem for larger hosting website. We adopt a less aggressive approach and only disable it the default would be used.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 02 Mar 2018 19:33:20 -0500
parents c0b6a95b94b9
children 768f752b5364
files CHANGELOG hgext3rd/evolve/__init__.py hgext3rd/evolve/serveronly.py
diffstat 3 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Fri Mar 02 16:07:33 2018 -0500
+++ b/CHANGELOG	Fri Mar 02 19:33:20 2018 -0500
@@ -6,6 +6,7 @@
 
   * fold: fix issue related to bookmarks movement (issue5772)
   * amend: take lock before parsing the commit description (issue5266)
+  * legacy: respect 'server.bundle1' config if any is set
 
 7.2.1 --2018-01-20
 -------------------
--- a/hgext3rd/evolve/__init__.py	Fri Mar 02 16:07:33 2018 -0500
+++ b/hgext3rd/evolve/__init__.py	Fri Mar 02 19:33:20 2018 -0500
@@ -424,7 +424,9 @@
         evolveopts = ['all']
         repo.ui.setconfig('experimental', 'evolution', evolveopts, 'evolve')
     if obsolete.isenabled(repo, 'exchange'):
-        repo.ui.setconfig('server', 'bundle1', False)
+        # if no config explicitly set, disable bundle1
+        if not isinstance(repo.ui.config('server', 'bundle1'), str):
+            repo.ui.setconfig('server', 'bundle1', False)
 
     class trdescrepo(repo.__class__):
 
--- a/hgext3rd/evolve/serveronly.py	Fri Mar 02 16:07:33 2018 -0500
+++ b/hgext3rd/evolve/serveronly.py	Fri Mar 02 19:33:20 2018 -0500
@@ -58,4 +58,6 @@
         evolveopts = 'all'
         repo.ui.setconfig('experimental', 'evolution', evolveopts)
     if obsolete.isenabled(repo, 'exchange'):
-        repo.ui.setconfig('server', 'bundle1', False)
+        # if no config explicitly set, disable bundle1
+        if not isinstance(repo.ui.config('server', 'bundle1'), str):
+            repo.ui.setconfig('server', 'bundle1', False)