~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 02:23:31 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220022331-hbm91o1ps9gjrlns
Add testr magic for bzr selftest --list

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
        super(DummyForeignVcsBranchFormat, self).__init__()
174
174
        self._matchingbzrdir = DummyForeignVcsDirFormat()
175
175
 
176
 
    def open(self, a_bzrdir, name=None, _found=False):
 
176
    def open(self, a_bzrdir, name=None, _found=False, found_repository=None):
177
177
        if not _found:
178
178
            raise NotImplementedError
179
179
        try:
180
180
            transport = a_bzrdir.get_branch_transport(None, name=name)
181
181
            control_files = lockable_files.LockableFiles(transport, 'lock',
182
182
                                                         lockdir.LockDir)
 
183
            if found_repository is None:
 
184
                found_repository = a_bzrdir.find_repository()
183
185
            return DummyForeignVcsBranch(_format=self,
184
186
                              _control_files=control_files,
185
187
                              a_bzrdir=a_bzrdir,
186
 
                              _repository=a_bzrdir.find_repository())
 
188
                              _repository=found_repository)
187
189
        except errors.NoSuchFile:
188
190
            raise errors.NotBranchError(path=transport.base)
189
191