Show More
@@ -172,28 +172,16 b' def create_server(ui, repo):' | |||||
172 | return open(opt, 'w') |
|
172 | return open(opt, 'w') | |
173 | return default |
|
173 | return default | |
174 |
|
174 | |||
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: |
|
175 | if repo is None: | |
188 | getconfig, getconfigbool = create_getconfig("web", ui) |
|
176 | myui = ui | |
189 | else: |
|
177 | else: | |
190 | getconfig, getconfigbool = create_getconfig("web", ui, repo.ui) |
|
178 | myui = repo.ui | |
191 |
address = |
|
179 | address = myui.config("web", "address", "") | |
192 |
port = int( |
|
180 | port = int(myui.config("web", "port", 8000)) | |
193 |
use_ipv6 = |
|
181 | use_ipv6 = myui.configbool("web", "ipv6") | |
194 |
webdir_conf = |
|
182 | webdir_conf = myui.config("web", "webdir_conf") | |
195 |
accesslog = openlog( |
|
183 | accesslog = openlog(myui.config("web", "accesslog", "-"), sys.stdout) | |
196 |
errorlog = openlog( |
|
184 | errorlog = openlog(myui.config("web", "errorlog", "-"), sys.stderr) | |
197 |
|
185 | |||
198 | if use_threads: |
|
186 | if use_threads: | |
199 | try: |
|
187 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now