~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-07 01:06:26 UTC
  • mto: (6437.3.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6441.
  • Revision ID: jelmer@samba.org-20120107010626-vytp4nsgs8c3hnc3
Fix some tests.

Show diffs side-by-side

added added

removed removed

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