~bzr/ubuntu/lucid/bzr/beta-ppa

« back to all changes in this revision

Viewing changes to bzrlib/transport/chroot.py

  • Committer: Martin Pool
  • Date: 2010-08-18 04:26:39 UTC
  • mfrom: (129.1.8 packaging-karmic)
  • Revision ID: mbp@sourcefrog.net-20100818042639-mjoxtngyjwiu05fo
* PPA rebuild for lucid.
* PPA rebuild for karmic.
* PPA rebuild onto jaunty.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""
20
20
 
21
21
from bzrlib.transport import (
22
 
    get_transport,
23
22
    pathfilter,
24
23
    register_transport,
25
 
    Server,
26
 
    Transport,
27
 
    unregister_transport,
28
24
    )
29
25
 
30
26
 
65
61
        return self._relpath_from_server_root(relpath)
66
62
 
67
63
 
68
 
class TestingChrootServer(ChrootServer):
69
 
 
70
 
    def __init__(self):
71
 
        """TestingChrootServer is not usable until start_server is called."""
72
 
        ChrootServer.__init__(self, None)
73
 
 
74
 
    def start_server(self, backing_server=None):
75
 
        """Setup the Chroot on backing_server."""
76
 
        if backing_server is not None:
77
 
            self.backing_transport = get_transport(backing_server.get_url())
78
 
        else:
79
 
            self.backing_transport = get_transport('.')
80
 
        ChrootServer.start_server(self)
81
 
 
82
 
 
83
64
def get_test_permutations():
84
65
    """Return the permutations to be used in testing."""
85
 
    return [(ChrootTransport, TestingChrootServer)]
 
66
    from bzrlib.tests import test_server
 
67
    return [(ChrootTransport, test_server.TestingChrootServer)]