132
133
self.root_transport = _transport
133
134
self._mode_check_done = False
136
def cloning_metadir(self, stacked=False):
137
"""Produce a metadir suitable for cloning with."""
138
return format_registry.make_bzrdir("default")
140
def sprout(self, url, revision_id=None, force_new_repo=False,
141
recurse='down', possible_transports=None,
142
accelerator_tree=None, hardlink=False, stacked=False,
144
# dirstate doesn't cope with accelerator_trees well
145
# that have a different control dir
146
return super(DummyForeignVcsDir, self).sprout(url=url,
147
revision_id=revision_id, force_new_repo=force_new_repo,
148
recurse=recurse, possible_transports=possible_transports,
149
hardlink=hardlink, stacked=stacked, source_branch=source_branch)
136
152
class ForeignVcsRegistryTests(TestCase):
137
153
"""Tests for the ForeignVcsRegistry class."""
264
280
dir.open_workingtree()
266
282
def test_sprout(self):
267
"""Test we can clone dummies and that the format is preserved."""
283
"""Test we can clone dummies and that the format is not preserved."""
268
284
self.make_branch_and_tree("d", format=DummyForeignVcsDirFormat())
269
285
dir = BzrDir.open("d")
270
286
newdir = dir.sprout("e")
271
self.assertEquals("A Dummy VCS Dir", newdir._format.get_format_string())
287
self.assertNotEquals("A Dummy VCS Dir", newdir._format.get_format_string())