/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/smart/client.py

  • Committer: Andrew Bennetts
  • Date: 2007-12-13 06:24:49 UTC
  • mto: This revision was merged to the branch mainline in revision 3180.
  • Revision ID: andrew.bennetts@canonical.com-20071213062449-as036xyryeoz1rqv
All tests passing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from urlparse import urlparse
18
18
 
19
19
from bzrlib.smart import protocol
20
 
from bzrlib.urlutils import unescape, relative_url
 
20
from bzrlib import urlutils
21
21
 
22
22
 
23
23
class _SmartClient(object):
68
68
        anything but path, so it is only safe to use it in requests sent over
69
69
        the medium from the matching transport.
70
70
        """
71
 
        transport_path = unescape(urlparse(transport.base)[2]).encode('utf8')
72
 
        #import pdb; pdb.set_trace()
73
 
        return relative_url(self._shared_medium.base,
74
 
                transport.base).encode('utf8')
 
71
        if self._shared_medium.base.startswith('bzr+http://'):
 
72
            medium_base = self._shared_medium.base
 
73
        else:
 
74
            medium_base = urlutils.join(self._shared_medium.base, '/')
 
75
            
 
76
        return urlutils.relative_url(medium_base, transport.base).encode('utf8')