changeset 178:b3bf5a0edd69

Merge from Jake's hg docs
author mpm@selenic.com
date Fri, 27 May 2005 12:27:46 -0800
parents 1d8e9637a0a4 (diff) 91055f795d88 (current diff)
children ff5377a4b203
files README doc/README doc/hg.1 doc/hg.1.html doc/hg.1.txt mercurial/hg.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/README	Fri May 27 07:16:58 2005 -0700
+++ b/README	Fri May 27 12:27:46 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	Fri May 27 07:16:58 2005 -0700
+++ b/mercurial/hg.py	Fri May 27 12:27:46 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)