/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-18 20:08:49 UTC
  • mfrom: (6240.5.9 pre_post_command_hooks)
  • Revision ID: pqm@pqm.ubuntu.com-20120118200849-i93mg9cvcwxpvth3
(jelmer) Add pre_command and post_command hooks. (Jelmer Vernooij)

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