~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Ian Clatworthy
  • Date: 2007-07-03 07:37:11 UTC
  • mfrom: (2520.3.1 110448)
  • mto: This revision was merged to the branch mainline in revision 2576.
  • Revision ID: ian.clatworthy@internode.on.net-20070703073711-grb8q45os61y904x
(Vincent Ladeuil) Merge fix for #110448 

Show diffs side-by-side

added added

removed removed

Lines of Context:
540
540
        self._server.setUp()
541
541
        self.addCleanup(self._server.tearDown)
542
542
 
543
 
    def get_transport(self):
544
 
        """Return a connected transport to the local directory."""
 
543
    def get_transport(self, relpath=None):
 
544
        """Return a connected transport to the local directory.
 
545
 
 
546
        :param relpath: a path relative to the base url.
 
547
        """
545
548
        base_url = self._server.get_url()
 
549
        url = self._adjust_url(base_url, relpath)
546
550
        # try getting the transport via the regular interface:
547
 
        t = get_transport(base_url)
 
551
        t = get_transport(url)
548
552
        if not isinstance(t, self.transport_class):
549
553
            # we did not get the correct transport class type. Override the
550
554
            # regular connection behaviour by direct construction.
551
 
            t = self.transport_class(base_url)
 
555
            t = self.transport_class(url)
552
556
        return t
553
557
 
554
558