~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: 2011-08-09 12:34:00 UTC
  • mfrom: (6056.2.5 option-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20110809123400-x521f2j9jkxx8ze2
(vila) Introduce OptionRegistry (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib import (
27
27
    branch,
28
28
    bzrdir,
29
 
    config,
30
29
    controldir,
31
30
    errors,
32
31
    help_topics,
1209
1208
 
1210
1209
    def __init__(self, *args, **kwargs):
1211
1210
        super(_TestBzrDir, self).__init__(*args, **kwargs)
1212
 
        self.test_branch = _TestBranch(self.transport)
 
1211
        self.test_branch = _TestBranch()
1213
1212
        self.test_branch.repository = self.create_repository()
1214
1213
 
1215
1214
    def open_branch(self, unsupported=False):
1226
1225
class _TestBranch(bzrlib.branch.Branch):
1227
1226
    """Test Branch implementation for TestBzrDirSprout."""
1228
1227
 
1229
 
    def __init__(self, transport, *args, **kwargs):
 
1228
    def __init__(self, *args, **kwargs):
1230
1229
        self._format = _TestBranchFormat()
1231
 
        self._transport = transport
1232
 
        self.base = transport.base
1233
1230
        super(_TestBranch, self).__init__(*args, **kwargs)
1234
1231
        self.calls = []
1235
1232
        self._parent = None
1236
1233
 
1237
1234
    def sprout(self, *args, **kwargs):
1238
1235
        self.calls.append('sprout')
1239
 
        return _TestBranch(self._transport)
 
1236
        return _TestBranch()
1240
1237
 
1241
1238
    def copy_content_into(self, destination, revision_id=None):
1242
1239
        self.calls.append('copy_content_into')
1247
1244
    def get_parent(self):
1248
1245
        return self._parent
1249
1246
 
1250
 
    def _get_config(self):
1251
 
        return config.TransportConfig(self._transport, 'branch.conf')
1252
 
 
1253
1247
    def set_parent(self, parent):
1254
1248
        self._parent = parent
1255
1249