mercurial/httprepo.py
changeset 2740 386f04d6ecb3
parent 2673 109a22f5434a
child 2859 345bac2bc4ec
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)