Mercurial > hg > mercurial-crew-with-dirclash
diff 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 |
line wrap: on
line diff
--- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -1,6 +1,7 @@ # httprepo.py - HTTP repository proxy classes for mercurial # -# Copyright 2005 Matt Mackall <mpm@selenic.com> +# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> +# Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. @@ -339,3 +340,13 @@ class httpsrepository(httprepository): raise util.Abort(_('Python support for SSL and HTTPS ' 'is not installed')) httprepository.__init__(self, ui, path) + +def instance(ui, path, create): + if create: + raise util.Abort(_('cannot create new http repository')) + if path.startswith('hg:'): + ui.warn(_("hg:// syntax is deprecated, please use http:// instead\n")) + path = 'http:' + path[3:] + if path.startswith('https:'): + return httpsrepository(ui, path) + return httprepository(ui, path)