changeset 3185:0c64d0242ac2 stable

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 02 Nov 2017 19:08:36 +0100
parents 37aebaa73248
children 9d9ff55d1bb1
files hgext3rd/evolve/__init__.py hgext3rd/evolve/serveronly.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)