~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2011-01-11 04:33:12 UTC
  • mto: (5582.12.2 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5718.
  • Revision ID: jelmer@samba.org-20110111043312-g4wx6iuf9662f36d
Move weave formats into bzrlib.plugins.weave_fmt.

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