comparison mercurial/httprepo.py @ 3044:fcadf7a32425

Merge with mpm
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Sun, 03 Sep 2006 06:06:02 -0400
parents 345bac2bc4ec
children bc3fe3b5b785
comparison
equal deleted inserted replaced
3043:2a4d4aecb2b4 3044:fcadf7a32425
1 # httprepo.py - HTTP repository proxy classes for mercurial 1 # httprepo.py - HTTP repository proxy classes for mercurial
2 # 2 #
3 # Copyright 2005 Matt Mackall <mpm@selenic.com> 3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
4 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
4 # 5 #
5 # This software may be used and distributed according to the terms 6 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference. 7 # of the GNU General Public License, incorporated herein by reference.
7 8
8 from node import * 9 from node import *
337 def __init__(self, ui, path): 338 def __init__(self, ui, path):
338 if not has_https: 339 if not has_https:
339 raise util.Abort(_('Python support for SSL and HTTPS ' 340 raise util.Abort(_('Python support for SSL and HTTPS '
340 'is not installed')) 341 'is not installed'))
341 httprepository.__init__(self, ui, path) 342 httprepository.__init__(self, ui, path)
343
344 def instance(ui, path, create):
345 if create:
346 raise util.Abort(_('cannot create new http repository'))
347 if path.startswith('hg:'):
348 ui.warn(_("hg:// syntax is deprecated, please use http:// instead\n"))
349 path = 'http:' + path[3:]
350 if path.startswith('https:'):
351 return httpsrepository(ui, path)
352 return httprepository(ui, path)