~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

[merge] robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import re
22
22
import stat
23
23
import sys
 
24
import urllib
24
25
 
25
26
from bzrlib.errors import TransportNotPossible, NoSuchFile, NonRelativePath, TransportError
26
27
from bzrlib.config import config_dir
125
126
    def _abspath(self, relpath):
126
127
        """Return the absolute path segment without the SFTP URL."""
127
128
        # FIXME: share the common code across transports
128
 
        if isinstance(relpath, basestring):
129
 
            relpath = [relpath]
 
129
        assert isinstance(relpath, basestring)
 
130
        relpath = [urllib.unquote(relpath)]
130
131
        basepath = self._path.split('/')
131
132
        if len(basepath) > 0 and basepath[-1] == '':
132
133
            basepath = basepath[:-1]