Show More
@@ -203,29 +203,17 b' def create_server(ui, repo):' | |||||
203 | return open(opt, 'w') |
|
203 | return open(opt, 'w') | |
204 | return default |
|
204 | return default | |
205 |
|
205 | |||
206 | def create_getconfig(section, *uis): # uis are least significant to most |
|
|||
207 | def getconfig(var, default=None): |
|
|||
208 | val = default |
|
|||
209 | for u in uis: |
|
|||
210 | val = u.config(section, var, val) |
|
|||
211 | return val |
|
|||
212 | def getconfigbool(var, default=None): |
|
|||
213 | val = default |
|
|||
214 | for u in uis: |
|
|||
215 | val = u.configbool(section, var, val) |
|
|||
216 | return (getconfig, getconfigbool) |
|
|||
217 |
|
||||
218 | if repo is None: |
|
206 | if repo is None: | |
219 | getconfig, getconfigbool = create_getconfig("web", ui) |
|
207 | myui = ui | |
220 | else: |
|
208 | else: | |
221 | getconfig, getconfigbool = create_getconfig("web", ui, repo.ui) |
|
209 | myui = repo.ui | |
222 |
address = |
|
210 | address = myui.config("web", "address", "") | |
223 |
port = int( |
|
211 | port = int(myui.config("web", "port", 8000)) | |
224 |
use_ipv6 = |
|
212 | use_ipv6 = myui.configbool("web", "ipv6") | |
225 |
webdir_conf = |
|
213 | webdir_conf = myui.config("web", "webdir_conf") | |
226 |
ssl_cert = |
|
214 | ssl_cert = myui.config("web", "certificate") | |
227 |
accesslog = openlog( |
|
215 | accesslog = openlog(myui.config("web", "accesslog", "-"), sys.stdout) | |
228 |
errorlog = openlog( |
|
216 | errorlog = openlog(myui.config("web", "errorlog", "-"), sys.stderr) | |
229 |
|
217 | |||
230 | if use_threads: |
|
218 | if use_threads: | |
231 | try: |
|
219 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now