769
769
if recurse == 'down':
770
770
if wt is not None:
771
entries = wt.iter_reference_entries()
771
basis = wt.basis_tree()
773
subtrees = basis.iter_references()
772
774
recurse_branch = wt.branch
773
775
elif source_branch is not None:
774
entries = source_branch.basis_tree().iter_reference_entries()
776
basis = source_branch.basis_tree()
778
subtrees = basis.iter_references()
775
779
recurse_branch = source_branch
778
for path, entry in entries:
779
target = urlutils.join(url, urlutils.escape(path))
780
sublocation = source_branch.reference_parent(entry.file_id,
782
sublocation.bzrdir.sprout(target, entry.reference_revision,
783
force_new_repo=force_new_repo, recurse=recurse)
784
for path, file_id in subtrees:
785
target = urlutils.join(url, urlutils.escape(path))
786
sublocation = source_branch.reference_parent(file_id, path)
787
sublocation.bzrdir.sprout(target,
788
basis.get_reference_revision(file_id, path),
789
force_new_repo=force_new_repo, recurse=recurse)
791
if basis is not None: