~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    Server,
47
47
    split_url,
48
48
    Transport,
49
 
    urlescape,
50
49
    )
51
50
import bzrlib.ui
 
51
import bzrlib.urlutils as urlutils
52
52
 
53
53
try:
54
54
    import paramiko
355
355
        """
356
356
        # FIXME: share the common code across transports
357
357
        assert isinstance(relpath, basestring)
358
 
        relpath = urllib.unquote(relpath).split('/')
 
358
        relpath = urlutils.unescape(relpath).split('/')
359
359
        basepath = self._path.split('/')
360
360
        if len(basepath) > 0 and basepath[-1] == '':
361
361
            basepath = basepath[:-1]
956
956
        global _ssh_vendor
957
957
        self._original_vendor = _ssh_vendor
958
958
        _ssh_vendor = self._vendor
959
 
        self._homedir = os.getcwdu()
 
959
        self._homedir = os.getcwd()
960
960
        if self._server_homedir is None:
961
961
            self._server_homedir = self._homedir
962
962
        self._root = '/'
977
977
 
978
978
    def get_url(self):
979
979
        """See bzrlib.transport.Server.get_url."""
980
 
        return self._get_sftp_url(urlescape(self._homedir[1:]))
 
980
        return self._get_sftp_url(urlutils.escape(self._homedir[1:]))
981
981
 
982
982
 
983
983
class SFTPServerWithoutSSH(SFTPServer):
1011
1011
 
1012
1012
    def get_url(self):
1013
1013
        """See bzrlib.transport.Server.get_url."""
1014
 
        return self._get_sftp_url(urlescape(self._homedir[1:]))
 
1014
        return self._get_sftp_url(urlutils.escape(self._homedir[1:]))
1015
1015
 
1016
1016
 
1017
1017
class SFTPHomeDirServer(SFTPServerWithoutSSH):