~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_pycurl.py

  • Committer: Vincent Ladeuil
  • Date: 2007-06-01 20:26:46 UTC
  • mto: (2485.8.44 bzr.connection.sharing)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070601202646-wuriw6z7rfwks5ny
Separate abspath from _remote_path, the intents are different.

* bzrlib/transport/sftp.py:
(SFTPUrlHandling._combine_paths_respecting_home_dir): New method.
(SFTPUrlHandling.abspath): Take home dir into account explicitely.
(SFTPUrlHandling._remote_path): Simplified.
(SFTPTransport.__init__): Cleanup cloning.

* bzrlib/transport/http/_urllib.py: 
Revert the previous _remote_path -> _unqualified_abspath renaming.

* bzrlib/transport/http/_pycurl.py:
Revert the previous _remote_path -> _unqualified_abspath renaming.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase._remote_path): Re-introduce _remote_path
instead of _unqualified_abspath.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): Cleanup cloning.
(FtpTransport.clone): Deleted. The inherited one is enough.

* bzrlib/transport/__init__.py:
(ConnectedTransport.__init__): Copy password *after* splitting the
url if needed.
(ConnectedTransport.clone): Generic clone method.
(ConnectedTransport._split_url): Cleanup.
(ConnectedTransport._initial_split_url): New method that daughter
classes can override.
(ConnectedTransport.abspath): Do not call _remote_path, the intent
is different.

* bzrlib/tests/test_transport_implementations.py:
Cleanup imports.
(TransportTests.test_clone_preserve_info): New test.

* bzrlib/tests/test_sftp_transport.py:
(FakeSFTPTransport): Add a dummy get_connection method.
(SFTPNonServerTest.test_parse_url_with_home_dir): Temporarily
disable the password checking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
        # We set NO BODY=0 in _get_full, so it should be safe
113
113
        # to re-use the non-range curl object
114
114
        curl = self._curl
115
 
        abspath = self._unqualified_abspath(relpath)
 
115
        abspath = self._remote_path(relpath)
116
116
        curl.setopt(pycurl.URL, abspath)
117
117
        self._set_curl_options(curl)
118
118
        curl.setopt(pycurl.HTTPGET, 1)
161
161
                 data: file that will be filled with the body
162
162
                 header: file that will be filled with the headers
163
163
        """
164
 
        abspath = self._unqualified_abspath(relpath)
 
164
        abspath = self._remote_path(relpath)
165
165
        curl.setopt(pycurl.URL, abspath)
166
166
        self._set_curl_options(curl)
167
167