Show More
@@ -322,7 +322,7 b" ui_sections = ['alias', 'auth'," | |||
|
322 | 322 | 'ui', 'web', ] |
|
323 | 323 | |
|
324 | 324 | |
|
325 |
def make_ui(repo_path=None |
|
|
325 | def make_ui(repo_path=None): | |
|
326 | 326 | """ |
|
327 | 327 | Create an Mercurial 'ui' object based on database Ui settings, possibly |
|
328 | 328 | augmenting with content from a hgrc file. |
@@ -342,8 +342,6 b' def make_ui(repo_path=None, clear_sessio' | |||
|
342 | 342 | ui_.ui_key, ui_val) |
|
343 | 343 | baseui.setconfig(safe_str(ui_.ui_section), safe_str(ui_.ui_key), |
|
344 | 344 | ui_val) |
|
345 | if clear_session: | |
|
346 | meta.Session.remove() | |
|
347 | 345 | |
|
348 | 346 | # force set push_ssl requirement to False, Kallithea handles that |
|
349 | 347 | baseui.setconfig('web', 'push_ssl', False) |
@@ -1190,7 +1190,7 b' class Repository(Base, BaseDbModel):' | |||
|
1190 | 1190 | Creates an db based ui object for this repository |
|
1191 | 1191 | """ |
|
1192 | 1192 | from kallithea.lib.utils import make_ui |
|
1193 |
return make_ui( |
|
|
1193 | return make_ui() | |
|
1194 | 1194 | |
|
1195 | 1195 | @classmethod |
|
1196 | 1196 | def is_valid(cls, repo_name): |
@@ -290,7 +290,7 b' class RepoModel(object):' | |||
|
290 | 290 | # clone_uri is modified - if given a value, check it is valid |
|
291 | 291 | if clone_uri != '': |
|
292 | 292 | # will raise exception on error |
|
293 |
is_valid_repo_uri(cur_repo.repo_type, clone_uri, make_ui( |
|
|
293 | is_valid_repo_uri(cur_repo.repo_type, clone_uri, make_ui()) | |
|
294 | 294 | cur_repo.clone_uri = clone_uri |
|
295 | 295 | |
|
296 | 296 | if 'repo_name' in kwargs: |
@@ -360,7 +360,7 b' class RepoModel(object):' | |||
|
360 | 360 | new_repo.private = private |
|
361 | 361 | if clone_uri: |
|
362 | 362 | # will raise exception on error |
|
363 |
is_valid_repo_uri(repo_type, clone_uri, make_ui( |
|
|
363 | is_valid_repo_uri(repo_type, clone_uri, make_ui()) | |
|
364 | 364 | new_repo.clone_uri = clone_uri |
|
365 | 365 | new_repo.landing_rev = landing_rev |
|
366 | 366 | |
@@ -661,7 +661,7 b' class RepoModel(object):' | |||
|
661 | 661 | backend = get_backend(repo_type) |
|
662 | 662 | |
|
663 | 663 | if repo_type == 'hg': |
|
664 |
baseui = make_ui( |
|
|
664 | baseui = make_ui() | |
|
665 | 665 | # patch and reset hooks section of UI config to not run any |
|
666 | 666 | # hooks on creating remote repo |
|
667 | 667 | for k, v in baseui.configitems('hooks'): |
@@ -412,7 +412,7 b' def ValidCloneUri():' | |||
|
412 | 412 | |
|
413 | 413 | if url and url != value.get('clone_uri_hidden'): |
|
414 | 414 | try: |
|
415 |
is_valid_repo_uri(repo_type, url, make_ui( |
|
|
415 | is_valid_repo_uri(repo_type, url, make_ui()) | |
|
416 | 416 | except Exception: |
|
417 | 417 | log.exception('URL validation failed') |
|
418 | 418 | msg = self.message('clone_uri', state) |
General Comments 0
You need to be logged in to leave comments.
Login now