# HG changeset patch # User mpm@selenic.com # Date 1117225574 28800 # Node ID 1d8e9637a0a430129175915c03877bdc1332e147 # Parent 0eb6e2c9800dacff5a24ade97510ce6512b322fc 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 diff -r 0eb6e2c9800d -r 1d8e9637a0a4 README --- 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 diff -r 0eb6e2c9800d -r 1d8e9637a0a4 mercurial/hg.py --- 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)