Show More
@@ -280,7 +280,7 b" ui_sections = ['alias', 'auth'," | |||||
280 | 'ui', 'web', ] |
|
280 | 'ui', 'web', ] | |
281 |
|
281 | |||
282 |
|
282 | |||
283 | def make_ui(read_from='file', path=None, checkpaths=True): |
|
283 | def make_ui(read_from='file', path=None, checkpaths=True, clear_session=True): | |
284 | """ |
|
284 | """ | |
285 | A function that will read python rc files or database |
|
285 | A function that will read python rc files or database | |
286 | and make an mercurial ui object from read options |
|
286 | and make an mercurial ui object from read options | |
@@ -325,7 +325,7 b" def make_ui(read_from='file', path=None," | |||||
325 | # force set push_ssl requirement to False, rhodecode |
|
325 | # force set push_ssl requirement to False, rhodecode | |
326 | # handles that |
|
326 | # handles that | |
327 | baseui.setconfig(ui_.ui_section, ui_.ui_key, False) |
|
327 | baseui.setconfig(ui_.ui_section, ui_.ui_key, False) | |
328 |
|
328 | if clear_session: | ||
329 | meta.Session.remove() |
|
329 | meta.Session.remove() | |
330 | return baseui |
|
330 | return baseui | |
331 |
|
331 |
@@ -377,10 +377,10 b' def ValidCloneUri():' | |||||
377 | ## initially check if it's at least the proper URL |
|
377 | ## initially check if it's at least the proper URL | |
378 | ## or does it pass basic auth |
|
378 | ## or does it pass basic auth | |
379 | MercurialRepository._check_url(url) |
|
379 | MercurialRepository._check_url(url) | |
380 |
httppeer( |
|
380 | httppeer(ui, url)._capabilities() | |
381 | elif url.startswith('svn+http'): |
|
381 | elif url.startswith('svn+http'): | |
382 | from hgsubversion.svnrepo import svnremoterepo |
|
382 | from hgsubversion.svnrepo import svnremoterepo | |
383 |
svnremoterepo( |
|
383 | svnremoterepo(ui, url).capabilities | |
384 | elif url.startswith('git+http'): |
|
384 | elif url.startswith('git+http'): | |
385 | raise NotImplementedError() |
|
385 | raise NotImplementedError() | |
386 |
|
386 | |||
@@ -410,7 +410,7 b' def ValidCloneUri():' | |||||
410 | pass |
|
410 | pass | |
411 | else: |
|
411 | else: | |
412 | try: |
|
412 | try: | |
413 | url_handler(repo_type, url, make_ui('db')) |
|
413 | url_handler(repo_type, url, make_ui('db', clear_session=False)) | |
414 | except Exception: |
|
414 | except Exception: | |
415 | log.exception('Url validation failed') |
|
415 | log.exception('Url validation failed') | |
416 | msg = M(self, 'clone_uri') |
|
416 | msg = M(self, 'clone_uri') |
General Comments 0
You need to be logged in to leave comments.
Login now