~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

Merge bzr.dev and tree-file-ids-as-tuples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
 
243
243
    def open(self, a_bzrdir, name=None, _found=False, ignore_fallbacks=False,
244
244
            found_repository=None):
 
245
        if name is None:
 
246
            name = a_bzrdir._get_selected_branch()
245
247
        if not _found:
246
248
            raise NotImplementedError
247
249
        try:
253
255
            return DummyForeignVcsBranch(_format=self,
254
256
                              _control_files=control_files,
255
257
                              a_bzrdir=a_bzrdir,
256
 
                              _repository=found_repository)
 
258
                              _repository=found_repository,
 
259
                              name=name)
257
260
        except errors.NoSuchFile:
258
261
            raise errors.NotBranchError(path=transport.base)
259
262
 
319
322
 
320
323
    def open_branch(self, name=None, unsupported=False, ignore_fallbacks=True,
321
324
            possible_transports=None):
322
 
        if name is not None:
 
325
        if name is None:
 
326
            name = self._get_selected_branch()
 
327
        if name != "":
323
328
            raise errors.NoColocatedBranchSupport(self)
324
329
        return self._format.get_branch_format().open(self, _found=True)
325
330