185
186
result.open_branch(name="").name == result_branch.name and
186
187
isinstance(target_transport, LocalTransport) and
187
188
(result_repo is None or result_repo.make_working_trees())):
188
result.create_workingtree(
189
wt = result.create_workingtree(
189
190
accelerator_tree=accelerator_tree,
190
191
hardlink=hardlink, from_branch=result_branch)
194
if recurse == 'down':
195
with cleanup.ExitStack() as stack:
198
basis = wt.basis_tree()
199
elif result_branch is not None:
200
basis = result_branch.basis_tree()
201
elif source_branch is not None:
202
basis = source_branch.basis_tree()
203
if basis is not None:
204
stack.enter_context(basis.lock_read())
205
subtrees = basis.iter_references()
208
for path in subtrees:
209
target = urlutils.join(url, urlutils.escape(path))
210
sublocation = source_branch.reference_parent(
211
path, possible_transports=possible_transports)
212
sublocation.controldir.sprout(
213
target, basis.get_reference_revision(path),
214
force_new_repo=force_new_repo, recurse=recurse,
193
218
def clone_on_transport(self, transport, revision_id=None,