config: clarify that config is only enabled on the repository is it setup for stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Nov 2017 19:08:36 +0100
branchstable
changeset 3185 0c64d0242ac2
parent 3184 37aebaa73248
child 3186 9d9ff55d1bb1
config: clarify that config is only enabled on the repository is it setup for This changeset change nothing but clarify a few thing. The ui passed to 'reposetup' is the same as 'repo.ui'. However we would like to clarify things a bit.
hgext3rd/evolve/__init__.py
hgext3rd/evolve/serveronly.py
--- a/hgext3rd/evolve/__init__.py	Tue Nov 14 23:04:04 2017 +0100
+++ b/hgext3rd/evolve/__init__.py	Thu Nov 02 19:08:36 2017 +0100
@@ -416,10 +416,10 @@
 def _configureoptions(ui, repo):
     # If no capabilities are specified, enable everything.
     # This is so existing evolve users don't need to change their config.
-    evolveopts = ui.configlist('experimental', 'evolution')
+    evolveopts = repo.ui.configlist('experimental', 'evolution')
     if not evolveopts:
         evolveopts = ['all']
-        ui.setconfig('experimental', 'evolution', evolveopts, 'evolve')
+        repo.ui.setconfig('experimental', 'evolution', evolveopts, 'evolve')
     if obsolete.isenabled(repo, 'exchange'):
         repo.ui.setconfig('server', 'bundle1', False)
 
--- a/hgext3rd/evolve/serveronly.py	Tue Nov 14 23:04:04 2017 +0100
+++ b/hgext3rd/evolve/serveronly.py	Thu Nov 02 19:08:36 2017 +0100
@@ -53,9 +53,9 @@
 
 @eh.reposetup
 def default2evolution(ui, repo):
-    evolveopts = ui.configlist('experimental', 'evolution')
+    evolveopts = repo.ui.configlist('experimental', 'evolution')
     if not evolveopts:
         evolveopts = 'all'
-        ui.setconfig('experimental', 'evolution', evolveopts)
+        repo.ui.setconfig('experimental', 'evolution', evolveopts)
     if obsolete.isenabled(repo, 'exchange'):
         repo.ui.setconfig('server', 'bundle1', False)