~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

Apply David Allouches list_dir quoting fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from stat import *
26
26
import sys
27
27
from unittest import TestSuite
 
28
import urllib
28
29
 
29
30
from bzrlib.trace import mutter
30
31
import bzrlib.errors as errors
598
599
def urlescape(relpath):
599
600
    """Escape relpath to be a valid url."""
600
601
    # TODO utf8 it first. utf8relpath = relpath.encode('utf8')
601
 
    import urllib
602
602
    return urllib.quote(relpath)
603
603
 
604
604
 
 
605
def urlunescape(relpath):
 
606
    """Unescape relpath from url format."""
 
607
    return urllib.unquote(relpath)
 
608
    # TODO de-utf8 it last. relpath = utf8relpath.decode('utf8')
 
609
 
 
610
 
605
611
class Server(object):
606
612
    """A Transport Server.
607
613