/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/transport/smart.py

  • Committer: Aaron Bentley
  • Date: 2006-10-02 13:05:18 UTC
  • mfrom: (2058 +trunk)
  • mto: (1731.2.15 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 2078.
  • Revision ID: abentley@panoramicfeedback.com-20061002130518-5aa716794d33cfe3
Merge bzr.dev

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):