163
163
format.repository_format = repository.network_format_registry.get(
166
166
# XXX: we need possible_transports here to avoid reopening the
167
167
# connection to the referenced location
168
168
ref_bzrdir = BzrDir.open(branch_name)
169
169
branch_format = ref_bzrdir.cloning_metadir().get_branch_format()
170
170
format.set_branch_format(branch_format)
173
173
format.set_branch_format(
174
174
branch.network_format_registry.get(branch_name))