changeset 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 0eb6e2c9800d
children b3bf5a0edd69
files README mercurial/hg.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)