# HG changeset patch # User Benoit Boissinot # Date 2006-06-14 19:53:42 # Node ID d90a9d7c7d4da081e2742f9d2269d61b9ea5cb3f # Parent 4ccd71b83d5e570587f5c9a075475badead596ae replace old-http:// syntax by static-http:// and deprecate the redundant hg:// diff --git a/doc/hg.1.txt b/doc/hg.1.txt --- a/doc/hg.1.txt +++ b/doc/hg.1.txt @@ -31,7 +31,7 @@ revision:: repository path:: either the pathname of a local repository or the URI of a remote repository. There are two available URI protocols, http:// which is - fast and the old-http:// protocol which is much slower but does not + fast and the static-http:// protocol which is much slower but does not require a special server on the web host. diff --git a/doc/ja/hg.1.ja.txt b/doc/ja/hg.1.ja.txt --- a/doc/ja/hg.1.ja.txt +++ b/doc/ja/hg.1.ja.txt @@ -70,7 +70,7 @@ revision:: repository path:: ローカルのリポジトリのパス名かリモートのリポジトリの URI を表 します。URI のプロトコルとしては現在 2 つが利用可能です。 - http:// は高速で、old-http:// は遅いですがウェブのホストに特別 + http:// は高速で、static-http:// は遅いですがウェブのホストに特別 なサーバを必要としません。 コマンド diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -8,6 +8,7 @@ from node import * from repo import * from demandload import * +from i18n import gettext as _ demandload(globals(), "localrepo bundlerepo httprepo sshrepo statichttprepo") def repository(ui, path=None, create=0): @@ -17,11 +18,18 @@ def repository(ui, path=None, create=0): if path.startswith("https://"): return httprepo.httpsrepository(ui, path) if path.startswith("hg://"): + ui.warn(_("hg:// syntax is deprecated, " + "please use http:// instead\n")) return httprepo.httprepository( ui, path.replace("hg://", "http://")) if path.startswith("old-http://"): + ui.warn(_("old-http:// syntax is deprecated, " + "please use static-http:// instead\n")) return statichttprepo.statichttprepository( ui, path.replace("old-http://", "http://")) + if path.startswith("static-http://"): + return statichttprepo.statichttprepository( + ui, path.replace("static-http://", "http://")) if path.startswith("ssh://"): return sshrepo.sshrepository(ui, path) if path.startswith("bundle://"): diff --git a/tests/test-static-http b/tests/test-static-http --- a/tests/test-static-http +++ b/tests/test-static-http @@ -1,6 +1,6 @@ #!/bin/sh -http_proxy= hg clone old-http://localhost:20059/ copy +http_proxy= hg clone static-http://localhost:20059/ copy echo $? ls copy 2>/dev/null || echo copy: No such file or directory @@ -31,7 +31,7 @@ hg tip cd .. -http_proxy= hg clone old-http://localhost:20059/remote local +http_proxy= hg clone static-http://localhost:20059/remote local cd local hg verify diff --git a/tests/test-static-http.out b/tests/test-static-http.out --- a/tests/test-static-http.out +++ b/tests/test-static-http.out @@ -19,6 +19,6 @@ crosschecking files in changesets and ma checking files 1 files, 1 changesets, 1 total revisions foo -pulling from old-http://localhost:20059/remote +pulling from static-http://localhost:20059/remote searching for changes no changes found