/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/smart.py

Implement ParamikoVendor.connect_ssh

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        :return: False if the server should terminate, otherwise None.
281
281
        """
282
282
        req_args = self._recv_tuple()
283
 
        mutter('server received %r' % (req_args,))
284
283
        if req_args == None:
285
284
            # client closed connection
286
285
            return False  # shutdown server
287
286
        try:
288
287
            response = self.smart_server.dispatch_command(req_args[0], req_args[1:])
289
 
            mutter('server sending %r' % (response.args,))
290
288
            self._send_tuple(response.args)
291
289
            if response.body is not None:
292
290
                self._send_bulk_data(response.body)
1038
1036
                raise errors.InvalidURL(path=url, extra="invalid port %s" % self._port)
1039
1037
 
1040
1038
        def _connect_to_server(self):
1041
 
            # XXX: don't hardcode vendor
1042
 
            # XXX: cannot pass password to SSHSubprocess yet
1043
 
            if self._password is not None:
1044
 
                raise errors.InvalidURL("SSH smart transport doesn't handle passwords")
1045
1039
            executable = os.environ.get('BZR_REMOTE_PATH', 'bzr')
1046
1040
            vendor = ssh._get_ssh_vendor()
1047
 
            self._ssh_connection = vendor.connect_ssh(self._username, None,
1048
 
                    self._host, self._port,
1049
 
                    command=[executable, 'serve', '--inet',
1050
 
                            '--directory=/'])
 
1041
            self._ssh_connection = vendor.connect_ssh(self._username,
 
1042
                    self._password, self._host, self._port,
 
1043
                    command=[executable, 'serve', '--inet', '--directory=/'])
1051
1044
            return self._ssh_connection.get_filelike_channels()
1052
1045
 
1053
1046
        def disconnect(self):