~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-18 08:02:43 UTC
  • mfrom: (4634.43.21 bzr-ssh-homedir-take-3)
  • Revision ID: pqm@pqm.ubuntu.com-20090918080243-b04lrnure68z8rzc
(andrew) Implement home directory relative URLs for bzr:// and
        bzr+ssh://. (#109143)

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    deprecated_passed,
92
92
    )
93
93
import bzrlib.trace
94
 
from bzrlib.transport import chroot, get_transport
 
94
from bzrlib.transport import get_transport, pathfilter
95
95
import bzrlib.transport
96
96
from bzrlib.transport.local import LocalURLServer
97
97
from bzrlib.transport.memory import MemoryServer
983
983
 
984
984
    def _preopen_isolate_transport(self, transport):
985
985
        """Check that all transport openings are done in the test work area."""
986
 
        if isinstance(transport, chroot.ChrootTransport):
987
 
            # Unwrap chrooted transports
988
 
            url = transport.server.backing_transport.clone(
989
 
                transport._safe_relpath('.')).base
990
 
        else:
991
 
            url = transport.base
 
986
        while isinstance(transport, pathfilter.PathFilteringTransport):
 
987
            # Unwrap pathfiltered transports
 
988
            transport = transport.server.backing_transport.clone(
 
989
                transport._filter('.'))
 
990
        url = transport.base
992
991
        # ReadonlySmartTCPServer_for_testing decorates the backing transport
993
992
        # urls it is given by prepending readonly+. This is appropriate as the
994
993
        # client shouldn't know that the server is readonly (or not readonly).