##// END OF EJS Templates
moved out ui_sections out of make ui function
marcink -
r386:a9a607a5 default
parent child Browse files
Show More
@@ -111,7 +111,18 b' def get_hg_settings():'
111 111 settings['hg_app_' + each.app_settings_name] = each.app_settings_value
112 112
113 113 return settings
114
114
115 ui_sections = ['alias', 'auth',
116 'decode/encode', 'defaults',
117 'diff', 'email',
118 'extensions', 'format',
119 'merge-patterns', 'merge-tools',
120 'hooks', 'http_proxy',
121 'smtp', 'patch',
122 'paths', 'profiling',
123 'server', 'trusted',
124 'ui', 'web', ]
125
115 126 def make_ui(read_from='file', path=None, checkpaths=True):
116 127 """
117 128 A function that will read python rc files or database
@@ -122,16 +133,7 b" def make_ui(read_from='file', path=None,"
122 133 @param read_from: read from 'file' or 'db'
123 134 """
124 135 #propagated from mercurial documentation
125 sections = ['alias', 'auth',
126 'decode/encode', 'defaults',
127 'diff', 'email',
128 'extensions', 'format',
129 'merge-patterns', 'merge-tools',
130 'hooks', 'http_proxy',
131 'smtp', 'patch',
132 'paths', 'profiling',
133 'server', 'trusted',
134 'ui', 'web', ]
136
135 137 baseui = ui.ui()
136 138
137 139
@@ -142,7 +144,7 b" def make_ui(read_from='file', path=None,"
142 144
143 145 cfg = config.config()
144 146 cfg.read(path)
145 for section in sections:
147 for section in ui_sections:
146 148 for k, v in cfg.items(section):
147 149 baseui.setconfig(section, k, v)
148 150 if checkpaths:check_repo_dir(cfg.items('paths'))
General Comments 0
You need to be logged in to leave comments. Login now