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
--- a/README Thu May 26 23:39:42 2005 -0800
+++ b/README Fri May 27 12:26:14 2005 -0800
@@ -79,7 +79,7 @@
foo$ hg serve -n "My repo" -p 80
# merge changes from a remote machine
- bar$ hg merge hg://foo/
+ bar$ hg merge http://foo/
bar$ hg co # checkout the result
# Set up a CGI server on your webserver
--- 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)