/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/remote.py

Merge bzr.dev, update to use new hooks.

Show diffs side-by-side

added added

removed removed

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