comparison mercurial/httprepo.py @ 2740:386f04d6ecb3

clean up hg.py: move repo constructor code into each repo module
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 31 Jul 2006 07:11:12 -0700
parents 109a22f5434a
children 345bac2bc4ec
comparison
equal deleted inserted replaced
2739:3248aa10b388 2740:386f04d6ecb3
337 def __init__(self, ui, path): 337 def __init__(self, ui, path):
338 if not has_https: 338 if not has_https:
339 raise util.Abort(_('Python support for SSL and HTTPS ' 339 raise util.Abort(_('Python support for SSL and HTTPS '
340 'is not installed')) 340 'is not installed'))
341 httprepository.__init__(self, ui, path) 341 httprepository.__init__(self, ui, path)
342
343 def instance(ui, path, create):
344 if create:
345 raise util.Abort(_('cannot create new http repository'))
346 if path.startswith('hg:'):
347 ui.warn(_("hg:// syntax is deprecated, please use http:// instead\n"))
348 path = 'http:' + path[3:]
349 if path.startswith('https:'):
350 return httpsrepository(ui, path)
351 return httprepository(ui, path)