/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

Various hopefully improvements, but wsgi is broken, handing over to spiv :).

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
from urlparse import urlparse
 
18
 
17
19
from bzrlib.smart import protocol
 
20
from bzrlib.urlutils import unescape
18
21
 
19
22
 
20
23
class SmartClient(object):
41
44
        smart_protocol = protocol.SmartClientRequestProtocolOne(request)
42
45
        smart_protocol.call_with_body_bytes((method, ) + args, body)
43
46
        return smart_protocol.read_response_tuple()
 
47
 
 
48
    def remote_path_from_transport(self, transport):
 
49
        """Convert transport into a path suitable for using in a request."""
 
50
        return unescape(urlparse(transport.base)[2]).encode('utf8')