~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/controldir.py

(jelmer) Move get_{workingtree, branch,
 repository}_transport methods from ControlDir to BzrDir. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
            raise errors.NoColocatedBranchSupport(self)
216
216
        return None
217
217
 
218
 
    def get_branch_transport(self, branch_format, name=None):
219
 
        """Get the transport for use by branch format in this ControlDir.
220
 
 
221
 
        Note that bzr dirs that do not support format strings will raise
222
 
        IncompatibleFormat if the branch format they are given has
223
 
        a format string, and vice versa.
224
 
 
225
 
        If branch_format is None, the transport is returned with no
226
 
        checking. If it is not None, then the returned transport is
227
 
        guaranteed to point to an existing directory ready for use.
228
 
        """
229
 
        raise NotImplementedError(self.get_branch_transport)
230
 
 
231
 
    def get_repository_transport(self, repository_format):
232
 
        """Get the transport for use by repository format in this ControlDir.
233
 
 
234
 
        Note that bzr dirs that do not support format strings will raise
235
 
        IncompatibleFormat if the repository format they are given has
236
 
        a format string, and vice versa.
237
 
 
238
 
        If repository_format is None, the transport is returned with no
239
 
        checking. If it is not None, then the returned transport is
240
 
        guaranteed to point to an existing directory ready for use.
241
 
        """
242
 
        raise NotImplementedError(self.get_repository_transport)
243
 
 
244
 
    def get_workingtree_transport(self, tree_format):
245
 
        """Get the transport for use by workingtree format in this ControlDir.
246
 
 
247
 
        Note that bzr dirs that do not support format strings will raise
248
 
        IncompatibleFormat if the workingtree format they are given has a
249
 
        format string, and vice versa.
250
 
 
251
 
        If workingtree_format is None, the transport is returned with no
252
 
        checking. If it is not None, then the returned transport is
253
 
        guaranteed to point to an existing directory ready for use.
254
 
        """
255
 
        raise NotImplementedError(self.get_workingtree_transport)
256
 
 
257
218
    def open_branch(self, name=None, unsupported=False,
258
219
                    ignore_fallbacks=False):
259
220
        """Open the branch object at this ControlDir if one is present.