~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-01-09 05:29:09 UTC
  • mfrom: (3928.3.4 stacking_tweaks)
  • Revision ID: pqm@pqm.ubuntu.com-20090109052909-3jh4taiu906vin4p
(jam) Some fixes to stacked branches to avoid opening multiple
        connections.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
            'Pre-0.8 format.  Slower and does not support checkouts or shared'
181
181
            ' repositories', deprecated=True, alias=True)
182
182
        self.assertEqual(frozenset(['weavealias']), a_registry.aliases())
183
 
    
 
183
 
184
184
 
185
185
class SampleBranch(bzrlib.branch.Branch):
186
186
    """A dummy branch for guess what, dummy use."""
189
189
        self.bzrdir = dir
190
190
 
191
191
 
 
192
class SampleRepository(bzrlib.repository.Repository):
 
193
    """A dummy repo."""
 
194
 
 
195
    def __init__(self, dir):
 
196
        self.bzrdir = dir
 
197
 
 
198
 
192
199
class SampleBzrDir(bzrdir.BzrDir):
193
200
    """A sample BzrDir implementation to allow testing static methods."""
194
201
 
198
205
 
199
206
    def open_repository(self):
200
207
        """See BzrDir.open_repository."""
201
 
        return "A repository"
 
208
        return SampleRepository(self)
202
209
 
203
210
    def create_branch(self):
204
211
        """See BzrDir.create_branch."""