-
Committer:
v.ladeuil+lp at free
-
Date:
2007-02-04 17:41:12 UTC
-
mto:
(2323.7.1 redirection)
-
mto:
This revision was merged to the branch mainline in
revision
2390.
-
Revision ID:
v.ladeuil+lp@free.fr-20070204174112-iv6gxzinnjddlaxj
Add tests for redirection. Preserve transport decorations.
* bzrlib/tests/test_http.py:
(TestRedirections): new tests.
* bzrlib/tests/HttpServer.py:
(HttpServer): Make server host and port public once the socket
have been established.
* bzrlib/tests/HTTPTestUtil.py:
(RedirectRequestHandler, HTTPServerRedirecting): New http test
server for redirections. Only a whole host can be redirected, so
far.
* bzrlib/errors.py:
(RedirectRequested.__init__): Add a 'qual_proto' oso that
transport decorations can be transmitted to redirected transport.
(RedirectRequested._requalify_url,
RedirectRequested.get_source_url,
RedirectRequested.get_target_url): New methods providing fully
decorated urls.
* bzrlib/bzrdir.py:
(BzrDir.open_from_transport): The redirection should preserve
transport decorations.
(BzrDirMetaFormat1): To be able to specialize bzr branches from
foreign branches, we need to register BzrDirMetaFormat1 as the
default control format (instead of BzrDirMetaFormat which is
abstract and can still be used by foreign branches).