Show More
@@ -2471,7 +2471,7 b' def serve(ui, repo, **opts):' | |||
|
2471 | 2471 | for o in optlist.split(): |
|
2472 | 2472 | if opts[o]: |
|
2473 | 2473 | parentui.setconfig("web", o, str(opts[o])) |
|
2474 | if repo.ui != parentui: | |
|
2474 | if (repo is not None) and (repo.ui != parentui): | |
|
2475 | 2475 | repo.ui.setconfig("web", o, str(opts[o])) |
|
2476 | 2476 | |
|
2477 | 2477 | if repo is None and not ui.config("web", "webdir_conf"): |
@@ -172,12 +172,28 b' def create_server(ui, repo):' | |||
|
172 | 172 | return open(opt, 'w') |
|
173 | 173 | return default |
|
174 | 174 | |
|
175 | address = repo.ui.config("web", "address", "") | |
|
176 | port = int(repo.ui.config("web", "port", 8000)) | |
|
177 | use_ipv6 = repo.ui.configbool("web", "ipv6") | |
|
178 | webdir_conf = repo.ui.config("web", "webdir_conf") | |
|
179 | accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout) | |
|
180 | errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr) | |
|
175 | def create_getconfig(section, *uis): # uis are least significant to most | |
|
176 | def getconfig(var, default=None): | |
|
177 | val = default | |
|
178 | for u in uis: | |
|
179 | val = u.config(section, var, val) | |
|
180 | return val | |
|
181 | def getconfigbool(var, default=None): | |
|
182 | val = default | |
|
183 | for u in uis: | |
|
184 | val = u.configbool(section, var, val) | |
|
185 | return (getconfig, getconfigbool) | |
|
186 | ||
|
187 | if repo is None: | |
|
188 | getconfig, getconfigbool = create_getconfig("web", ui) | |
|
189 | else: | |
|
190 | getconfig, getconfigbool = create_getconfig("web", ui, repo.ui) | |
|
191 | address = getconfig("address", "") | |
|
192 | port = int(getconfig("port", 8000)) | |
|
193 | use_ipv6 = getconfigbool("ipv6") | |
|
194 | webdir_conf = getconfig("webdir_conf") | |
|
195 | accesslog = openlog(getconfig("accesslog", "-"), sys.stdout) | |
|
196 | errorlog = openlog(getconfig("errorlog", "-"), sys.stderr) | |
|
181 | 197 | |
|
182 | 198 | if use_threads: |
|
183 | 199 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now