~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-16 19:18:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6391.
  • Revision ID: jelmer@samba.org-20111216191839-eg681lxqibi1qxu1
Fix remaining tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
 
171
171
    def _remote_path(self, relpath):
172
172
        """Returns the Unicode version of the absolute path for relpath."""
173
 
        return self._combine_paths(self._path, relpath)
 
173
        return urlutils.URL._combine_paths(self._parsed_url.path, relpath)
174
174
 
175
175
    def _call(self, method, *args):
176
176
        resp = self._call2(method, *args)
483
483
 
484
484
    def _build_medium(self):
485
485
        client_medium = medium.SmartTCPClientMedium(
486
 
            self._host, self._port, self.base)
 
486
            self._parsed_url.host, self._parsed_url.port, self.base)
487
487
        return client_medium, None
488
488
 
489
489
 
496
496
 
497
497
    def _build_medium(self):
498
498
        client_medium = medium.SmartTCPClientMedium(
499
 
            self._host, self._port, self.base)
 
499
            self._parsed_url.host, self._parsed_url.port, self.base)
500
500
        client_medium._protocol_version = 2
501
501
        client_medium._remember_remote_is_before((1, 6))
502
502
        return client_medium, None
512
512
    def _build_medium(self):
513
513
        location_config = config.LocationConfig(self.base)
514
514
        bzr_remote_path = location_config.get_bzr_remote_path()
515
 
        user = self._user
 
515
        user = self._parsed_url.user
516
516
        if user is None:
517
517
            auth = config.AuthenticationConfig()
518
 
            user = auth.get_user('ssh', self._host, self._port)
519
 
        ssh_params = medium.SSHParams(self._host, self._port, user,
520
 
            self._password, bzr_remote_path)
 
518
            user = auth.get_user('ssh', self._parsed_url.host,
 
519
                self._parsed_url.port)
 
520
        ssh_params = medium.SSHParams(self._parsed_url.host,
 
521
                self._parsed_url.port, user, self._parsed_url.password,
 
522
                bzr_remote_path)
521
523
        client_medium = medium.SmartSSHClientMedium(self.base, ssh_params)
522
 
        return client_medium, (user, self._password)
 
524
        return client_medium, (user, self._parsed_url.password)
523
525
 
524
526
 
525
527
class RemoteHTTPTransport(RemoteTransport):
539
541
            # url only for an intial construction (when the url came from the
540
542
            # command-line).
541
543
            http_url = base[len('bzr+'):]
542
 
            self._http_transport = transport.get_transport(http_url)
 
544
            self._http_transport = transport.get_transport_from_url(http_url)
543
545
        else:
544
546
            self._http_transport = http_transport
545
547
        super(RemoteHTTPTransport, self).__init__(