~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: John Arbash Meinel
  • Date: 2006-01-16 21:36:37 UTC
  • mto: (1685.1.1 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060116213637-2f4cc1c55769f464
Adding an InvalidURL so transports can report they expect utf-8 quoted paths. Updated tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import tempfile
25
25
import urllib
26
26
 
 
27
import bzrlib.errors as errors
27
28
from bzrlib.trace import mutter
28
 
from bzrlib.transport import Transport, Server
 
29
from bzrlib.transport import Transport, Server, urlescape, urlunescape
29
30
from bzrlib.osutils import abspath, realpath, normpath, pathjoin, rename
30
31
 
31
32
 
61
62
        This can be supplied with a string or a list
62
63
        """
63
64
        assert isinstance(relpath, basestring), (type(relpath), relpath)
64
 
        return pathjoin(self.base, urllib.unquote(relpath).decode('utf-8'))
 
65
        return pathjoin(self.base, urlunescape(relpath))
65
66
 
66
67
    def relpath(self, abspath):
67
68
        """Return the local path portion from a given absolute path.