# HG changeset patch # User mpm@selenic.com # Date 1117228196 28800 # Node ID 089594a5bbde8512ef722147f39442d7bdbe397a # Parent f25944662097a4f1b9fdd1aa6e4d373e8cb0c9c8# Parent 038e4d8602bdfb31368bf0acddaae4be35c4e182 Pull from Jake's hg docs diff --git a/README b/README --- a/README +++ b/README @@ -79,10 +79,14 @@ 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 foo$ cp hgweb.cgi ~/public_html/hg-linux/index.cgi foo$ emacs ~/public_html/hg-linux/index.cgi # adjust the defaults + # Give symbolic names to repos + foo$ echo "main http://selenic.com/hg/" >> ~/.hgpaths # one pair per line + foo$ hg merge main + foo$ hg co 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) diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -195,7 +195,7 @@ class hgweb: def footer(self): yield self.t("footer", repo = self.reponame) - def changelog(self, pos=None): + def changelog(self, pos): def changenav(): def seq(factor = 1): yield 1 * factor @@ -255,7 +255,6 @@ class hgweb: cl = self.repo.changelog mf = cl.read(cl.tip())[0] count = cl.count() - pos = pos or count - 1 end = min(pos, count - 1) start = max(0, pos - self.maxchanges) end = min(count - 1, start + self.maxchanges)