legacy: respect explicit config for server.bundle1 stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 02 Mar 2018 19:33:20 -0500
branchstable
changeset 3510 3bd642f11313
parent 3507 c0b6a95b94b9
child 3511 768f752b5364
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.
CHANGELOG
hgext3rd/evolve/__init__.py
hgext3rd/evolve/serveronly.py
--- 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)