Mercurial > public > mercurial-scm > hg
diff mercurial/hg.py @ 176:1d8e9637a0a4
Change hg: protocol name to http: and http: to old-http:
hg: will continue to work for a bit
old-http: will be phased out soon
author | mpm@selenic.com |
---|---|
date | Fri, 27 May 2005 12:26:14 -0800 |
parents | 75dddd697ed4 |
children | b3bf5a0edd69 b3bf5a0edd69 |
line wrap: on
line diff
--- a/mercurial/hg.py Thu May 26 23:39:42 2005 -0800 +++ b/mercurial/hg.py Fri May 27 12:26:14 2005 -0800 @@ -812,7 +812,7 @@ class remoterepository: def __init__(self, ui, path): - self.url = path.replace("hg://", "http://", 1) + self.url = path self.ui = ui def do_cmd(self, cmd, **args): @@ -847,8 +847,12 @@ yield zd.decompress(d) def repository(ui, path=None, create=0): + if path and path[:7] == "http://": + return remoterepository(ui, path) if path and path[:5] == "hg://": - return remoterepository(ui, path) + return remoterepository(ui, path.replace("hg://", "http://")) + if path and path[:11] == "old-http://": + return localrepository(ui, path.replace("old-http://", "http://")) else: return localrepository(ui, path, create)