~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/smart.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-29 15:31:52 UTC
  • mfrom: (2052.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060929153152-9a32a9b020e0f74b
Lukáš Lalinský: Windows-speficic smart server transport selftest fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
552
552
    """
553
553
 
554
554
    def __init__(self):
555
 
        self._homedir = os.getcwd()
 
555
        self._homedir = urlutils.local_path_to_url(os.getcwd())[7:]
556
556
        # The server is set up by default like for ssh access: the client
557
557
        # passes filesystem-absolute paths; therefore the server must look
558
558
        # them up relative to the root directory.  it might be better to act
559
559
        # a public server and have the server rewrite paths into the test
560
560
        # directory.
561
 
        SmartTCPServer.__init__(self, transport.get_transport("file:///"))
 
561
        SmartTCPServer.__init__(self,
 
562
            transport.get_transport(urlutils.local_path_to_url('/')))
562
563
        
563
564
    def setUp(self):
564
565
        """Set up server for testing"""
570
571
    def get_url(self):
571
572
        """Return the url of the server"""
572
573
        host, port = self._server_socket.getsockname()
573
 
        # XXX: I think this is likely to break on windows -- self._homedir will
574
 
        # have backslashes (and maybe a drive letter?).
575
 
        #  -- Andrew Bennetts, 2006-08-29
576
574
        return "bzr://%s:%d%s" % (host, port, urlutils.escape(self._homedir))
577
575
 
578
576
    def get_bogus_url(self):