Skip to content
Snippets Groups Projects
Commit 1d8e9637 authored by mpm's avatar mpm
Browse files

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
parent 0eb6e2c9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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,4 +847,6 @@
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://":
......@@ -850,5 +852,7 @@
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment