~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-07 11:50:28 UTC
  • mfrom: (5147.4.7 more-colo)
  • Revision ID: pqm@pqm.ubuntu.com-20100507115028-tuuxmnormm8oetw6
(vila, for jelmer) Pass the colocated branch name along in more places,
        add extra tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
    def create_workingtree(self, revision_id=None, from_branch=None):
273
273
        raise errors.NotLocalUrl(self.transport.base)
274
274
 
275
 
    def find_branch_format(self):
 
275
    def find_branch_format(self, name=None):
276
276
        """Find the branch 'format' for this bzrdir.
277
277
 
278
278
        This might be a synthetic object for e.g. RemoteBranch and SVN.
279
279
        """
280
 
        b = self.open_branch()
 
280
        b = self.open_branch(name=name)
281
281
        return b._format
282
282
 
283
 
    def get_branch_reference(self):
 
283
    def get_branch_reference(self, name=None):
284
284
        """See BzrDir.get_branch_reference()."""
 
285
        if name is not None:
 
286
            # XXX JRV20100304: Support opening colocated branches
 
287
            raise errors.NoColocatedBranchSupport(self)
285
288
        response = self._get_branch_reference()
286
289
        if response[0] == 'ref':
287
290
            return response[1]
318
321
            raise errors.UnexpectedSmartServerResponse(response)
319
322
        return response
320
323
 
321
 
    def _get_tree_branch(self):
 
324
    def _get_tree_branch(self, name=None):
322
325
        """See BzrDir._get_tree_branch()."""
323
 
        return None, self.open_branch()
 
326
        return None, self.open_branch(name=name)
324
327
 
325
328
    def open_branch(self, name=None, unsupported=False,
326
329
                    ignore_fallbacks=False):