~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/remote.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-28 19:39:57 UTC
  • mfrom: (3804 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3805.
  • Revision ID: john@arbash-meinel.com-20081028193957-zg2eygq5cgz2bnpu
Merge bzr.dev 3804

Show diffs side-by-side

added added

removed removed

Lines of Context:
512
512
    """
513
513
 
514
514
    def _build_medium(self):
515
 
        # ssh will prompt the user for a password if needed and if none is
516
 
        # provided but it will not give it back, so no credentials can be
517
 
        # stored.
518
515
        location_config = config.LocationConfig(self.base)
519
516
        bzr_remote_path = location_config.get_bzr_remote_path()
 
517
        user = self._user
 
518
        if user is None:
 
519
            auth = config.AuthenticationConfig()
 
520
            user = auth.get_user('ssh', self._host, self._port)
520
521
        client_medium = medium.SmartSSHClientMedium(self._host, self._port,
521
 
            self._user, self._password, self.base,
 
522
            user, self._password, self.base,
522
523
            bzr_remote_path=bzr_remote_path)
523
 
        return client_medium, None
 
524
        return client_medium, (user, self._password)
524
525
 
525
526
 
526
527
class RemoteHTTPTransport(RemoteTransport):