~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Robert Collins
  • Date: 2005-10-19 07:25:40 UTC
  • Revision ID: robertc@robertcollins.net-20051019072540-0ab4d3bd16ff8c94
Change Transport.* to work with URL's.

 * bzrlib.transport.Transport now accepts *ONLY* url escaped relative paths 
   to apis like 'put', 'get' and 'has'. This is to provide consistent
   behaviour - it operates on url's only. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
 
357
357
# Local transport should always be initialized
358
358
import bzrlib.transport.local
 
359
 
 
360
def urlescape(relpath):
 
361
    """Escape relpath to be a valid url."""
 
362
    # TODO utf8 it first. utf8relpath = relpath.encode('utf8')
 
363
    import urllib
 
364
    return urllib.quote(relpath)