~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

Allow Repository tests to be backed onto a specific VFS as needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2252
2252
    to make it easy to identify.
2253
2253
    """
2254
2254
 
2255
 
    def __init__(self, transport_server, transport_readonly_server, formats):
 
2255
    def __init__(self, transport_server, transport_readonly_server, formats,
 
2256
        vfs_transport_factory=None):
2256
2257
        self._transport_server = transport_server
2257
2258
        self._transport_readonly_server = transport_readonly_server
 
2259
        self._vfs_transport_factory = vfs_transport_factory
2258
2260
        self._formats = formats
2259
2261
    
2260
2262
    def adapt(self, test):
2263
2265
            new_test = deepcopy(test)
2264
2266
            new_test.transport_server = self._transport_server
2265
2267
            new_test.transport_readonly_server = self._transport_readonly_server
 
2268
            if self._vfs_transport_factory:
 
2269
                new_test.vfs_transport_factory = self._vfs_transport_factory
2266
2270
            new_test.bzrdir_format = bzrdir_format
2267
2271
            new_test.repository_format = repository_format
2268
2272
            def make_new_test_id():