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