# HG changeset patch # User mpm@selenic.com # Date 1117225666 28800 # Node ID b3bf5a0edd6930462c0cdb93ba337f02146f9482 # Parent 1d8e9637a0a430129175915c03877bdc1332e147# Parent 91055f795d88d82383cb29b0a93f6182b21d6e16 Merge from Jake's hg docs diff --git a/README b/README --- a/README +++ b/README @@ -79,7 +79,7 @@ Network support: 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 diff --git a/doc/README b/doc/README diff --git a/doc/hg.1 b/doc/hg.1 diff --git a/doc/hg.1.html b/doc/hg.1.html diff --git a/doc/hg.1.txt b/doc/hg.1.txt diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -812,7 +812,7 @@ class localrepository: 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 @@ class remoterepository: 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)