234
210
errors.UnstackableRepositoryFormat,
235
211
errors.NotStacked):
237
# Bug: We create a metadir without knowing if it can support stacking,
238
# we should look up the policy needs first, or just use it as a hint,
215
# may need to copy content in
216
repository_policy = result.determine_repository_policy(
217
force_new_repo, stacked_on, self.root_transport.base,
218
require_stacking=require_stacking)
241
219
make_working_trees = local_repo.make_working_trees()
242
want_shared = local_repo.is_shared()
243
repo_format_name = format.repository_format.network_name()
245
make_working_trees = False
247
repo_format_name = None
249
result_repo, result, require_stacking, repository_policy = \
250
format.initialize_on_transport_ex(transport,
251
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
252
force_new_repo=force_new_repo, stacked_on=stacked_on,
253
stack_on_pwd=self.root_transport.base,
254
repo_format_name=repo_format_name,
255
make_working_trees=make_working_trees, shared_repo=want_shared)
258
# If the result repository is in the same place as the
259
# resulting bzr dir, it will have no content, further if the
260
# result is not stacked then we know all content should be
261
# copied, and finally if we are copying up to a specific
262
# revision_id then we can use the pending-ancestry-result which
263
# does not require traversing all of history to describe it.
264
if (result_repo.bzrdir.root_transport.base ==
265
result.root_transport.base and not require_stacking and
266
revision_id is not None):
267
fetch_spec = graph.PendingAncestryResult(
268
[revision_id], local_repo)
269
result_repo.fetch(local_repo, fetch_spec=fetch_spec)
271
result_repo.fetch(local_repo, revision_id=revision_id)
275
if result_repo is not None:
276
raise AssertionError('result_repo not None(%r)' % result_repo)
220
result_repo = repository_policy.acquire_repository(
221
make_working_trees, local_repo.is_shared())
222
if not require_stacking and repository_policy._require_stacking:
223
require_stacking = True
224
result._format.require_stacking()
225
result_repo.fetch(local_repo, revision_id=revision_id)
277
228
# 1 if there is a branch present
278
229
# make sure its content is available in the target repository
1243
def push_branch(self, source, revision_id=None, overwrite=False,
1244
remember=False, create_prefix=False):
1245
"""Push the source branch into this BzrDir."""
1247
# If we can open a branch, use its direct repository, otherwise see
1248
# if there is a repository without a branch.
1250
br_to = self.open_branch()
1251
except errors.NotBranchError:
1252
# Didn't find a branch, can we find a repository?
1253
repository_to = self.find_repository()
1255
# Found a branch, so we must have found a repository
1256
repository_to = br_to.repository
1258
push_result = PushResult()
1259
push_result.source_branch = source
1261
# We have a repository but no branch, copy the revisions, and then
1263
repository_to.fetch(source.repository, revision_id=revision_id)
1264
br_to = source.clone(self, revision_id=revision_id)
1265
if source.get_push_location() is None or remember:
1266
source.set_push_location(br_to.base)
1267
push_result.stacked_on = None
1268
push_result.branch_push_result = None
1269
push_result.old_revno = None
1270
push_result.old_revid = _mod_revision.NULL_REVISION
1271
push_result.target_branch = br_to
1272
push_result.master_branch = None
1273
push_result.workingtree_updated = False
1275
# We have successfully opened the branch, remember if necessary:
1276
if source.get_push_location() is None or remember:
1277
source.set_push_location(br_to.base)
1279
tree_to = self.open_workingtree()
1280
except errors.NotLocalUrl:
1281
push_result.branch_push_result = source.push(br_to,
1282
overwrite, stop_revision=revision_id)
1283
push_result.workingtree_updated = False
1284
except errors.NoWorkingTree:
1285
push_result.branch_push_result = source.push(br_to,
1286
overwrite, stop_revision=revision_id)
1287
push_result.workingtree_updated = None # Not applicable
1289
tree_to.lock_write()
1291
push_result.branch_push_result = source.push(
1292
tree_to.branch, overwrite, stop_revision=revision_id)
1296
push_result.workingtree_updated = True
1297
push_result.old_revno = push_result.branch_push_result.old_revno
1298
push_result.old_revid = push_result.branch_push_result.old_revid
1299
push_result.target_branch = \
1300
push_result.branch_push_result.target_branch
1304
class BzrDirHooks(hooks.Hooks):
1305
"""Hooks for BzrDir operations."""
1308
"""Create the default hooks."""
1309
hooks.Hooks.__init__(self)
1310
self.create_hook(hooks.HookPoint('pre_open',
1311
"Invoked before attempting to open a BzrDir with the transport "
1312
"that the open will use.", (1, 14), None))
1314
# install the default hooks
1315
BzrDir.hooks = BzrDirHooks()
1318
1180
class BzrDirPreSplitOut(BzrDir):
1319
1181
"""A common class for the all-in-one formats."""
1895
1724
self._supply_sub_formats_to(remote_format)
1896
1725
return remote_format.initialize_on_transport(transport)
1898
def initialize_on_transport_ex(self, transport, use_existing_dir=False,
1899
create_prefix=False, force_new_repo=False, stacked_on=None,
1900
stack_on_pwd=None, repo_format_name=None, make_working_trees=None,
1901
shared_repo=False, vfs_only=False):
1902
"""Create this format on transport.
1904
The directory to initialize will be created.
1906
:param force_new_repo: Do not use a shared repository for the target,
1907
even if one is available.
1908
:param create_prefix: Create any missing directories leading up to
1910
:param use_existing_dir: Use an existing directory if one exists.
1911
:param stacked_on: A url to stack any created branch on, None to follow
1912
any target stacking policy.
1913
:param stack_on_pwd: If stack_on is relative, the location it is
1915
:param repo_format_name: If non-None, a repository will be
1916
made-or-found. Should none be found, or if force_new_repo is True
1917
the repo_format_name is used to select the format of repository to
1919
:param make_working_trees: Control the setting of make_working_trees
1920
for a new shared repository when one is made. None to use whatever
1921
default the format has.
1922
:param shared_repo: Control whether made repositories are shared or
1924
:param vfs_only: If True do not attempt to use a smart server
1925
:return: repo, bzrdir, require_stacking, repository_policy. repo is
1926
None if none was created or found, bzrdir is always valid.
1927
require_stacking is the result of examining the stacked_on
1928
parameter and any stacking policy found for the target.
1931
# Try to hand off to a smart server
1933
client_medium = transport.get_smart_medium()
1934
except errors.NoSmartMedium:
1937
# TODO: lookup the local format from a server hint.
1938
remote_dir_format = RemoteBzrDirFormat()
1939
remote_dir_format._network_name = self.network_name()
1940
self._supply_sub_formats_to(remote_dir_format)
1941
return remote_dir_format.initialize_on_transport_ex(transport,
1942
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
1943
force_new_repo=force_new_repo, stacked_on=stacked_on,
1944
stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
1945
make_working_trees=make_working_trees, shared_repo=shared_repo)
1946
# XXX: Refactor the create_prefix/no_create_prefix code into a
1947
# common helper function
1948
# The destination may not exist - if so make it according to policy.
1949
def make_directory(transport):
1950
transport.mkdir('.')
1952
def redirected(transport, e, redirection_notice):
1953
note(redirection_notice)
1954
return transport._redirected_to(e.source, e.target)
1956
transport = do_catching_redirections(make_directory, transport,
1958
except errors.FileExists:
1959
if not use_existing_dir:
1961
except errors.NoSuchFile:
1962
if not create_prefix:
1964
transport.create_prefix()
1966
require_stacking = (stacked_on is not None)
1967
# Now the target directory exists, but doesn't have a .bzr
1968
# directory. So we need to create it, along with any work to create
1969
# all of the dependent branches, etc.
1971
result = self.initialize_on_transport(transport)
1972
if repo_format_name:
1974
# use a custom format
1975
result._format.repository_format = \
1976
repository.network_format_registry.get(repo_format_name)
1977
except AttributeError:
1978
# The format didn't permit it to be set.
1980
# A repository is desired, either in-place or shared.
1981
repository_policy = result.determine_repository_policy(
1982
force_new_repo, stacked_on, stack_on_pwd,
1983
require_stacking=require_stacking)
1984
result_repo, is_new_repo = repository_policy.acquire_repository(
1985
make_working_trees, shared_repo)
1986
if not require_stacking and repository_policy._require_stacking:
1987
require_stacking = True
1988
result._format.require_stacking()
1989
result_repo.lock_write()
1992
repository_policy = None
1993
return result_repo, result, require_stacking, repository_policy
1995
1727
def _initialize_on_transport_vfs(self, transport):
1996
1728
"""Initialize a new bzrdir using VFS calls.
2209
1941
repository_format = property(__return_repository_format)
2212
class BzrDirFormatAllInOne(BzrDirFormat):
2213
"""Common class for formats before meta-dirs."""
2215
def initialize_on_transport_ex(self, transport, use_existing_dir=False,
2216
create_prefix=False, force_new_repo=False, stacked_on=None,
2217
stack_on_pwd=None, repo_format_name=None, make_working_trees=None,
2219
"""See BzrDirFormat.initialize_on_transport_ex."""
2220
require_stacking = (stacked_on is not None)
2221
# Format 5 cannot stack, but we've been asked to - actually init
2223
if require_stacking:
2224
format = BzrDirMetaFormat1()
2225
return format.initialize_on_transport_ex(transport,
2226
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
2227
force_new_repo=force_new_repo, stacked_on=stacked_on,
2228
stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
2229
make_working_trees=make_working_trees, shared_repo=shared_repo)
2230
return BzrDirFormat.initialize_on_transport_ex(self, transport,
2231
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
2232
force_new_repo=force_new_repo, stacked_on=stacked_on,
2233
stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
2234
make_working_trees=make_working_trees, shared_repo=shared_repo)
2237
class BzrDirFormat5(BzrDirFormatAllInOne):
1944
class BzrDirFormat5(BzrDirFormat):
2238
1945
"""Bzr control format 5.
2240
1947
This format is a combined format for working tree, branch and repository.
2394
2101
def set_branch_format(self, format):
2395
2102
self._branch_format = format
2397
def require_stacking(self, stack_on=None, possible_transports=None,
2399
"""We have a request to stack, try to ensure the formats support it.
2401
:param stack_on: If supplied, it is the URL to a branch that we want to
2402
stack on. Check to see if that format supports stacking before
2405
# Stacking is desired. requested by the target, but does the place it
2406
# points at support stacking? If it doesn't then we should
2407
# not implicitly upgrade. We check this here.
2408
new_repo_format = None
2409
new_branch_format = None
2411
# a bit of state for get_target_branch so that we don't try to open it
2412
# 2 times, for both repo *and* branch
2413
target = [None, False, None] # target_branch, checked, upgrade anyway
2414
def get_target_branch():
2416
# We've checked, don't check again
2418
if stack_on is None:
2419
# No target format, that means we want to force upgrading
2420
target[:] = [None, True, True]
2423
target_dir = BzrDir.open(stack_on,
2424
possible_transports=possible_transports)
2425
except errors.NotBranchError:
2426
# Nothing there, don't change formats
2427
target[:] = [None, True, False]
2429
except errors.JailBreak:
2430
# JailBreak, JFDI and upgrade anyway
2431
target[:] = [None, True, True]
2434
target_branch = target_dir.open_branch()
2435
except errors.NotBranchError:
2436
# No branch, don't upgrade formats
2437
target[:] = [None, True, False]
2439
target[:] = [target_branch, True, False]
2442
if (not _skip_repo and
2443
not self.repository_format.supports_external_lookups):
2444
# We need to upgrade the Repository.
2445
target_branch, _, do_upgrade = get_target_branch()
2446
if target_branch is None:
2447
# We don't have a target branch, should we upgrade anyway?
2449
# stack_on is inaccessible, JFDI.
2450
# TODO: bad monkey, hard-coded formats...
2451
if self.repository_format.rich_root_data:
2452
new_repo_format = pack_repo.RepositoryFormatKnitPack5RichRoot()
2454
new_repo_format = pack_repo.RepositoryFormatKnitPack5()
2456
# If the target already supports stacking, then we know the
2457
# project is already able to use stacking, so auto-upgrade
2459
new_repo_format = target_branch.repository._format
2460
if not new_repo_format.supports_external_lookups:
2461
# target doesn't, source doesn't, so don't auto upgrade
2463
new_repo_format = None
2464
if new_repo_format is not None:
2465
self.repository_format = new_repo_format
2466
note('Source repository format does not support stacking,'
2467
' using format:\n %s',
2468
new_repo_format.get_format_description())
2104
def require_stacking(self):
2470
2105
if not self.get_branch_format().supports_stacking():
2471
# We just checked the repo, now lets check if we need to
2472
# upgrade the branch format
2473
target_branch, _, do_upgrade = get_target_branch()
2474
if target_branch is None:
2476
# TODO: bad monkey, hard-coded formats...
2477
new_branch_format = branch.BzrBranchFormat7()
2106
# We need to make a stacked branch, but the default format for the
2107
# target doesn't support stacking. So force a branch that *can*
2109
from bzrlib.branch import BzrBranchFormat7
2110
branch_format = BzrBranchFormat7()
2111
self.set_branch_format(branch_format)
2112
mutter("using %r for stacking" % (branch_format,))
2113
from bzrlib.repofmt import pack_repo
2114
if self.repository_format.rich_root_data:
2115
bzrdir_format_name = '1.6.1-rich-root'
2116
repo_format = pack_repo.RepositoryFormatKnitPack5RichRoot()
2479
new_branch_format = target_branch._format
2480
if not new_branch_format.supports_stacking():
2481
new_branch_format = None
2482
if new_branch_format is not None:
2483
# Does support stacking, use its format.
2484
self.set_branch_format(new_branch_format)
2485
note('Source branch format does not support stacking,'
2486
' using format:\n %s',
2487
new_branch_format.get_format_description())
2118
bzrdir_format_name = '1.6'
2119
repo_format = pack_repo.RepositoryFormatKnitPack5()
2120
note('Source format does not support stacking, using format:'
2122
bzrdir_format_name, repo_format.get_format_description())
2123
self.repository_format = repo_format
2489
2125
def get_converter(self, format=None):
2490
2126
"""See BzrDirFormat.get_converter()."""
3178
2782
return local_dir_format.initialize_on_transport(transport)
3179
2783
client = _SmartClient(client_medium)
3180
2784
path = client.remote_path_from_transport(transport)
3182
response = client.call('BzrDirFormat.initialize', path)
3183
except errors.ErrorFromSmartServer, err:
3184
remote._translate_error(err, path=path)
2785
response = client.call('BzrDirFormat.initialize', path)
3185
2786
if response[0] != 'ok':
3186
2787
raise errors.SmartProtocolError('unexpected response code %s' % (response,))
3187
2788
format = RemoteBzrDirFormat()
3188
2789
self._supply_sub_formats_to(format)
3189
2790
return remote.RemoteBzrDir(transport, format)
3191
def parse_NoneTrueFalse(self, arg):
3198
raise AssertionError("invalid arg %r" % arg)
3200
def _serialize_NoneTrueFalse(self, arg):
3207
def _serialize_NoneString(self, arg):
3210
def initialize_on_transport_ex(self, transport, use_existing_dir=False,
3211
create_prefix=False, force_new_repo=False, stacked_on=None,
3212
stack_on_pwd=None, repo_format_name=None, make_working_trees=None,
3215
# hand off the request to the smart server
3216
client_medium = transport.get_smart_medium()
3217
except errors.NoSmartMedium:
3220
# Decline to open it if the server doesn't support our required
3221
# version (3) so that the VFS-based transport will do it.
3222
if client_medium.should_probe():
3224
server_version = client_medium.protocol_version()
3225
if server_version != '2':
3229
except errors.SmartProtocolError:
3230
# Apparently there's no usable smart server there, even though
3231
# the medium supports the smart protocol.
3236
client = _SmartClient(client_medium)
3237
path = client.remote_path_from_transport(transport)
3238
if client_medium._is_remote_before((1, 16)):
3241
# TODO: lookup the local format from a server hint.
3242
local_dir_format = BzrDirMetaFormat1()
3243
self._supply_sub_formats_to(local_dir_format)
3244
return local_dir_format.initialize_on_transport_ex(transport,
3245
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
3246
force_new_repo=force_new_repo, stacked_on=stacked_on,
3247
stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
3248
make_working_trees=make_working_trees, shared_repo=shared_repo,
3250
return self._initialize_on_transport_ex_rpc(client, path, transport,
3251
use_existing_dir, create_prefix, force_new_repo, stacked_on,
3252
stack_on_pwd, repo_format_name, make_working_trees, shared_repo)
3254
def _initialize_on_transport_ex_rpc(self, client, path, transport,
3255
use_existing_dir, create_prefix, force_new_repo, stacked_on,
3256
stack_on_pwd, repo_format_name, make_working_trees, shared_repo):
3258
args.append(self._serialize_NoneTrueFalse(use_existing_dir))
3259
args.append(self._serialize_NoneTrueFalse(create_prefix))
3260
args.append(self._serialize_NoneTrueFalse(force_new_repo))
3261
args.append(self._serialize_NoneString(stacked_on))
3262
# stack_on_pwd is often/usually our transport
3265
stack_on_pwd = transport.relpath(stack_on_pwd)
3266
if not stack_on_pwd:
3268
except errors.PathNotChild:
3270
args.append(self._serialize_NoneString(stack_on_pwd))
3271
args.append(self._serialize_NoneString(repo_format_name))
3272
args.append(self._serialize_NoneTrueFalse(make_working_trees))
3273
args.append(self._serialize_NoneTrueFalse(shared_repo))
3274
request_network_name = self._network_name or \
3275
BzrDirFormat.get_default_format().network_name()
3277
response = client.call('BzrDirFormat.initialize_ex_1.16',
3278
request_network_name, path, *args)
3279
except errors.UnknownSmartMethod:
3280
client._medium._remember_remote_is_before((1,16))
3281
local_dir_format = BzrDirMetaFormat1()
3282
self._supply_sub_formats_to(local_dir_format)
3283
return local_dir_format.initialize_on_transport_ex(transport,
3284
use_existing_dir=use_existing_dir, create_prefix=create_prefix,
3285
force_new_repo=force_new_repo, stacked_on=stacked_on,
3286
stack_on_pwd=stack_on_pwd, repo_format_name=repo_format_name,
3287
make_working_trees=make_working_trees, shared_repo=shared_repo,
3289
except errors.ErrorFromSmartServer, err:
3290
remote._translate_error(err, path=path)
3291
repo_path = response[0]
3292
bzrdir_name = response[6]
3293
require_stacking = response[7]
3294
require_stacking = self.parse_NoneTrueFalse(require_stacking)
3295
format = RemoteBzrDirFormat()
3296
format._network_name = bzrdir_name
3297
self._supply_sub_formats_to(format)
3298
bzrdir = remote.RemoteBzrDir(transport, format, _client=client)
3300
repo_format = remote.response_tuple_to_repo_format(response[1:])
3301
if repo_path == '.':
3304
repo_bzrdir_format = RemoteBzrDirFormat()
3305
repo_bzrdir_format._network_name = response[5]
3306
repo_bzr = remote.RemoteBzrDir(transport.clone(repo_path),
3310
final_stack = response[8] or None
3311
final_stack_pwd = response[9] or None
3313
final_stack_pwd = urlutils.join(
3314
transport.base, final_stack_pwd)
3315
remote_repo = remote.RemoteRepository(repo_bzr, repo_format)
3316
if len(response) > 10:
3317
# Updated server verb that locks remotely.
3318
repo_lock_token = response[10] or None
3319
remote_repo.lock_write(repo_lock_token, _skip_rpc=True)
3321
remote_repo.dont_leave_lock_in_place()
3323
remote_repo.lock_write()
3324
policy = UseExistingRepository(remote_repo, final_stack,
3325
final_stack_pwd, require_stacking)
3326
policy.acquire_repository()
3330
bzrdir._format.set_branch_format(self.get_branch_format())
3331
if require_stacking:
3332
# The repo has already been created, but we need to make sure that
3333
# we'll make a stackable branch.
3334
bzrdir._format.require_stacking(_skip_repo=True)
3335
return remote_repo, bzrdir, require_stacking, policy
3337
2792
def _open(self, transport):
3338
2793
return remote.RemoteBzrDir(transport, self)
3830
3259
'performance for most operations.',
3831
3260
branch_format='bzrlib.branch.BzrBranchFormat7',
3832
3261
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3835
3263
format_registry.register_metadir('1.9-rich-root',
3836
3264
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
3837
3265
help='A variant of 1.9 that supports rich-root data '
3838
'(needed for bzr-svn and bzr-git).',
3266
'(needed for bzr-svn).',
3839
3267
branch_format='bzrlib.branch.BzrBranchFormat7',
3840
3268
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3843
format_registry.register_metadir('1.14',
3270
format_registry.register_metadir('development-wt5',
3844
3271
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
3845
help='A working-tree format that supports content filtering.',
3272
help='A working-tree format that supports views and content filtering.',
3846
3273
branch_format='bzrlib.branch.BzrBranchFormat7',
3847
3274
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
3849
format_registry.register_metadir('1.14-rich-root',
3277
format_registry.register_metadir('development-wt5-rich-root',
3850
3278
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
3851
help='A variant of 1.14 that supports rich-root data '
3852
'(needed for bzr-svn and bzr-git).',
3279
help='A variant of development-wt5 that supports rich-root data '
3280
'(needed for bzr-svn).',
3853
3281
branch_format='bzrlib.branch.BzrBranchFormat7',
3854
3282
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
3856
# The following un-numbered 'development' formats should always just be aliases.
3857
format_registry.register_metadir('development-rich-root',
3858
'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK1',
3859
help='Current development format. Supports rich roots. Can convert data '
3860
'to and from rich-root-pack (and anything compatible with '
3861
'rich-root-pack) format repositories. Repositories and branches in '
3862
'this format can only be read by bzr.dev. Please read '
3863
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
3285
# The following two formats should always just be aliases.
3286
format_registry.register_metadir('development',
3287
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2',
3288
help='Current development format. Can convert data to and from pack-0.92 '
3289
'(and anything compatible with pack-0.92) format repositories. '
3290
'Repositories and branches in this format can only be read by bzr.dev. '
3292
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3865
3294
branch_format='bzrlib.branch.BzrBranchFormat7',
3866
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3295
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3867
3296
experimental=True,
3871
3299
format_registry.register_metadir('development-subtree',
3872
3300
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
3874
3302
'from pack-0.92-subtree (and anything compatible with '
3875
3303
'pack-0.92-subtree) format repositories. Repositories and branches in '
3876
3304
'this format can only be read by bzr.dev. Please read '
3877
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
3305
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3879
3307
branch_format='bzrlib.branch.BzrBranchFormat7',
3880
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3308
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3881
3309
experimental=True,
3883
alias=False, # Restore to being an alias when an actual development subtree format is added
3884
# This current non-alias status is simply because we did not introduce a
3885
# chk based subtree format.
3888
3312
# And the development formats above will have aliased one of the following:
3889
format_registry.register_metadir('development6-rich-root',
3890
'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK1',
3891
help='pack-1.9 with 255-way hashed CHK inv, group compress, rich roots '
3893
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
3895
branch_format='bzrlib.branch.BzrBranchFormat7',
3896
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3901
format_registry.register_metadir('development7-rich-root',
3902
'bzrlib.repofmt.groupcompress_repo.RepositoryFormatCHK2',
3903
help='pack-1.9 with 255-way hashed CHK inv, bencode revision, group compress, '
3904
'rich roots. Please read '
3905
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
3907
branch_format='bzrlib.branch.BzrBranchFormat7',
3908
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3913
format_registry.register_metadir('2a',
3914
'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
3915
help='First format for bzr 2.0 series.\n'
3916
'Uses group-compress storage.\n'
3917
'Provides rich roots which are a one-way transition.\n',
3918
# 'storage in packs, 255-way hashed CHK inventory, bencode revision, group compress, '
3919
# 'rich roots. Supported by bzr 1.16 and later.',
3920
branch_format='bzrlib.branch.BzrBranchFormat7',
3921
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3925
# The following format should be an alias for the rich root equivalent
3926
# of the default format
3927
format_registry.register_metadir('default-rich-root',
3928
'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
3929
branch_format='bzrlib.branch.BzrBranchFormat7',
3930
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3313
format_registry.register_metadir('development2',
3314
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2',
3315
help='1.6.1 with B+Tree based index. '
3317
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3319
branch_format='bzrlib.branch.BzrBranchFormat7',
3320
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3324
format_registry.register_metadir('development2-subtree',
3325
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
3326
help='1.6.1-subtree with B+Tree based index. '
3328
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3330
branch_format='bzrlib.branch.BzrBranchFormat7',
3331
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3935
3335
# The current format that is made on 'bzr init'.
3936
format_registry.set_default('2a')
3336
format_registry.set_default('pack-0.92')