151
155
format.get_format_description(),
154
def clone(self, url, revision_id=None, force_new_repo=False,
155
preserve_stacking=False):
158
def clone(self, url, revision_id=None, force_new_repo=False):
156
159
"""Clone this bzrdir and its contents to url verbatim.
158
:param url: The url create the clone at. If url's last component does
159
not exist, it will be created.
160
:param revision_id: The tip revision-id to use for any branch or
161
working tree. If not None, then the clone operation may tune
161
If url's last component does not exist, it will be created.
163
if revision_id is not None, then the clone operation may tune
162
164
itself to download less data.
163
:param force_new_repo: Do not use a shared repository for the target
165
:param force_new_repo: Do not use a shared repository for the target
164
166
even if one is available.
165
:param preserve_stacking: When cloning a stacked branch, stack the
166
new branch on top of the other branch's stacked-on branch.
168
168
return self.clone_on_transport(get_transport(url),
169
169
revision_id=revision_id,
170
force_new_repo=force_new_repo,
171
preserve_stacking=preserve_stacking)
170
force_new_repo=force_new_repo)
173
172
def clone_on_transport(self, transport, revision_id=None,
174
force_new_repo=False, preserve_stacking=False,
173
force_new_repo=False):
176
174
"""Clone this bzrdir and its contents to transport verbatim.
178
:param transport: The transport for the location to produce the clone
179
at. If the target directory does not exist, it will be created.
180
:param revision_id: The tip revision-id to use for any branch or
181
working tree. If not None, then the clone operation may tune
176
If the target directory does not exist, it will be created.
178
if revision_id is not None, then the clone operation may tune
182
179
itself to download less data.
183
:param force_new_repo: Do not use a shared repository for the target,
180
:param force_new_repo: Do not use a shared repository for the target
184
181
even if one is available.
185
:param preserve_stacking: When cloning a stacked branch, stack the
186
new branch on top of the other branch's stacked-on branch.
188
183
transport.ensure_base()
189
require_stacking = (stacked_on is not None)
190
metadir = self.cloning_metadir(require_stacking)
191
result = metadir.initialize_on_transport(transport)
184
result = self.cloning_metadir().initialize_on_transport(transport)
192
185
repository_policy = None
194
187
local_repo = self.find_repository()
195
188
except errors.NoRepositoryPresent:
196
189
local_repo = None
198
local_branch = self.open_branch()
199
except errors.NotBranchError:
202
# enable fallbacks when branch is not a branch reference
203
if local_branch.repository.has_same_location(local_repo):
204
local_repo = local_branch.repository
205
if preserve_stacking:
207
stacked_on = local_branch.get_stacked_on_url()
208
except (errors.UnstackableBranchFormat,
209
errors.UnstackableRepositoryFormat,
214
191
# may need to copy content in
215
192
repository_policy = result.determine_repository_policy(
216
force_new_repo, stacked_on, self.root_transport.base,
217
require_stacking=require_stacking)
218
194
make_working_trees = local_repo.make_working_trees()
219
195
result_repo = repository_policy.acquire_repository(
220
196
make_working_trees, local_repo.is_shared())
221
if not require_stacking and repository_policy._require_stacking:
222
require_stacking = True
223
result._format.require_stacking()
224
197
result_repo.fetch(local_repo, revision_id=revision_id)
227
198
# 1 if there is a branch present
228
199
# make sure its content is available in the target repository
230
if local_branch is not None:
202
local_branch = self.open_branch()
203
except errors.NotBranchError:
231
206
result_branch = local_branch.clone(result, revision_id=revision_id)
232
207
if repository_policy is not None:
233
208
repository_policy.configure_branch(result_branch)
210
result_repo = result.find_repository()
211
except errors.NoRepositoryPresent:
234
213
if result_repo is None or result_repo.make_working_trees():
236
215
self.open_workingtree().clone(result)
372
351
bzrdir._find_or_create_repository(force_new_repo)
373
352
return bzrdir.create_branch()
375
def determine_repository_policy(self, force_new_repo=False, stack_on=None,
376
stack_on_pwd=None, require_stacking=False):
354
def determine_repository_policy(self, force_new_repo=False):
377
355
"""Return an object representing a policy to use.
379
357
This controls whether a new repository is created, or a shared
380
358
repository used instead.
382
If stack_on is supplied, will not seek a containing shared repo.
384
:param force_new_repo: If True, require a new repository to be created.
385
:param stack_on: If supplied, the location to stack on. If not
386
supplied, a default_stack_on location may be used.
387
:param stack_on_pwd: If stack_on is relative, the location it is
390
360
def repository_policy(found_bzrdir):
393
config = found_bzrdir.get_config()
395
if config is not None:
396
stack_on = config.get_default_stack_on()
397
if stack_on is not None:
398
stack_on_pwd = found_bzrdir.root_transport.base
400
note('Using default stacking branch %s at %s', stack_on,
402
362
# does it have a repository ?
404
364
repository = found_bzrdir.open_repository()
414
374
return None, False
416
return UseExistingRepository(repository, stack_on,
417
stack_on_pwd, require_stacking=require_stacking), True
376
return UseExistingRepository(repository), True
419
return CreateRepository(self, stack_on, stack_on_pwd,
420
require_stacking=require_stacking), True
378
return CreateRepository(self), True
422
380
if not force_new_repo:
424
policy = self._find_containing(repository_policy)
425
if policy is not None:
429
return UseExistingRepository(self.open_repository(),
430
stack_on, stack_on_pwd,
431
require_stacking=require_stacking)
432
except errors.NoRepositoryPresent:
434
return CreateRepository(self, stack_on, stack_on_pwd,
435
require_stacking=require_stacking)
381
policy = self._find_containing(repository_policy)
382
if policy is not None:
384
return CreateRepository(self)
437
386
def _find_or_create_repository(self, force_new_repo):
438
387
"""Create a new repository if needed, returning the repository."""
798
715
:param transport: Transport containing the bzrdir.
799
716
:param _unsupported: private.
801
# Keep initial base since 'transport' may be modified while following
803
718
base = transport.base
804
720
def find_format(transport):
805
721
return transport, BzrDirFormat.find_format(
806
722
transport, _server_formats=_server_formats)
808
724
def redirected(transport, e, redirection_notice):
809
redirected_transport = transport._redirected_to(e.source, e.target)
810
if redirected_transport is None:
811
raise errors.NotBranchError(base)
725
qualified_source = e.get_source_url()
726
relpath = transport.relpath(qualified_source)
727
if not e.target.endswith(relpath):
728
# Not redirected to a branch-format, not a branch
729
raise errors.NotBranchError(path=e.target)
730
target = e.target[:-len(relpath)]
812
731
note('%s is%s redirected to %s',
813
transport.base, e.permanently, redirected_transport.base)
814
return redirected_transport
732
transport.base, e.permanently, target)
733
# Let's try with a new transport
734
# FIXME: If 'transport' has a qualifier, this should
735
# be applied again to the new transport *iff* the
736
# schemes used are the same. Uncomment this code
737
# once the function (and tests) exist.
739
#target = urlutils.copy_url_qualifiers(original, target)
740
return get_transport(target)
817
743
transport, format = do_catching_redirections(find_format,
918
844
tree, branch = bzrdir._get_tree_branch()
919
845
return tree, branch, relpath
922
def open_containing_tree_branch_or_repository(klass, location):
923
"""Return the working tree, branch and repo contained by a location.
925
Returns (tree, branch, repository, relpath).
926
If there is no tree containing the location, tree will be None.
927
If there is no branch containing the location, branch will be None.
928
If there is no repository containing the location, repository will be
930
relpath is the portion of the path that is contained by the innermost
933
If no tree, branch or repository is found, a NotBranchError is raised.
935
bzrdir, relpath = klass.open_containing(location)
937
tree, branch = bzrdir._get_tree_branch()
938
except errors.NotBranchError:
940
repo = bzrdir.find_repository()
941
return None, None, repo, relpath
942
except (errors.NoRepositoryPresent):
943
raise errors.NotBranchError(location)
944
return tree, branch, branch.repository, relpath
946
847
def open_repository(self, _unsupported=False):
947
848
"""Open the repository object at this BzrDir if one is present.
1080
966
content is different.
1081
967
:param hardlink: If true, hard-link files from accelerator_tree,
1083
:param stacked: If true, create a stacked branch referring to the
1084
location of this control directory.
1085
:param create_tree_if_local: If true, a working-tree will be created
1086
when working locally.
1088
970
target_transport = get_transport(url, possible_transports)
1089
971
target_transport.ensure_base()
1090
cloning_format = self.cloning_metadir(stacked)
1091
# Create/update the result branch
972
cloning_format = self.cloning_metadir()
1092
973
result = cloning_format.initialize_on_transport(target_transport)
1093
# if a stacked branch wasn't requested, we don't create one
1094
# even if the origin was stacked
1095
stacked_branch_url = None
1096
if source_branch is not None:
1098
stacked_branch_url = self.root_transport.base
975
source_branch = self.open_branch()
1099
976
source_repository = source_branch.repository
1102
source_branch = self.open_branch()
1103
source_repository = source_branch.repository
1105
stacked_branch_url = self.root_transport.base
1106
except errors.NotBranchError:
1107
source_branch = None
1109
source_repository = self.open_repository()
1110
except errors.NoRepositoryPresent:
1111
source_repository = None
1112
repository_policy = result.determine_repository_policy(
1113
force_new_repo, stacked_branch_url, require_stacking=stacked)
1114
result_repo = repository_policy.acquire_repository()
1115
if source_repository is not None:
1116
# Fetch while stacked to prevent unstacked fetch from
1118
result_repo.fetch(source_repository, revision_id=revision_id)
1120
if source_branch is None:
1121
# this is for sprouting a bzrdir without a branch; is that
1123
# Not especially, but it's part of the contract.
1124
result_branch = result.create_branch()
1126
# Force NULL revision to avoid using repository before stacking
1128
result_branch = source_branch.sprout(
1129
result, revision_id=_mod_revision.NULL_REVISION)
1130
parent_location = result_branch.get_parent()
1131
mutter("created new branch %r" % (result_branch,))
1132
repository_policy.configure_branch(result_branch)
977
except errors.NotBranchError:
980
source_repository = self.open_repository()
981
except errors.NoRepositoryPresent:
982
source_repository = None
987
result_repo = result.find_repository()
988
except errors.NoRepositoryPresent:
990
if source_repository is None and result_repo is not None:
992
elif source_repository is None and result_repo is None:
993
# no repo available, make a new one
994
result.create_repository()
995
elif source_repository is not None and result_repo is None:
996
# have source, and want to make a new target repo
997
result_repo = source_repository.sprout(result,
998
revision_id=revision_id)
1000
# fetch needed content into target.
1001
if source_repository is not None:
1003
# source_repository.copy_content_into(result_repo,
1004
# revision_id=revision_id)
1005
# so we can override the copy method
1006
result_repo.fetch(source_repository, revision_id=revision_id)
1133
1007
if source_branch is not None:
1134
source_branch.copy_content_into(result_branch, revision_id)
1135
# Override copy_content_into
1136
result_branch.set_parent(parent_location)
1138
# Create/update the result working tree
1139
if (create_tree_if_local and
1140
isinstance(target_transport, local.LocalTransport) and
1141
(result_repo is None or result_repo.make_working_trees())):
1008
source_branch.sprout(result, revision_id=revision_id)
1010
result.create_branch()
1011
if isinstance(target_transport, LocalTransport) and (
1012
result_repo is None or result_repo.make_working_trees()):
1142
1013
wt = result.create_workingtree(accelerator_tree=accelerator_tree,
1143
1014
hardlink=hardlink)
1144
1015
wt.lock_write()
1197
1065
"""Pre-splitout bzrdirs do not suffer from stale locks."""
1198
1066
raise NotImplementedError(self.break_lock)
1200
def cloning_metadir(self, require_stacking=False):
1068
def cloning_metadir(self):
1201
1069
"""Produce a metadir suitable for cloning with."""
1202
if require_stacking:
1203
return format_registry.make_bzrdir('1.6')
1204
1070
return self._format.__class__()
1206
def clone(self, url, revision_id=None, force_new_repo=False,
1207
preserve_stacking=False):
1208
"""See BzrDir.clone().
1210
force_new_repo has no effect, since this family of formats always
1211
require a new repository.
1212
preserve_stacking has no effect, since no source branch using this
1213
family of formats can be stacked, so there is no stacking to preserve.
1072
def clone(self, url, revision_id=None, force_new_repo=False):
1073
"""See BzrDir.clone()."""
1074
from bzrlib.workingtree import WorkingTreeFormat2
1215
1075
self._make_tail(url)
1216
1076
result = self._format._initialize_for_clone(url)
1217
1077
self.open_repository().clone(result, revision_id=revision_id)
1218
1078
from_branch = self.open_branch()
1219
1079
from_branch.clone(result, revision_id=revision_id)
1221
tree = self.open_workingtree()
1081
self.open_workingtree().clone(result)
1222
1082
except errors.NotLocalUrl:
1223
1083
# make a new one, this format always has to have one.
1224
result._init_workingtree()
1085
WorkingTreeFormat2().initialize(result)
1086
except errors.NotLocalUrl:
1087
# but we cannot do it for remote trees.
1088
to_branch = result.open_branch()
1089
WorkingTreeFormat2()._stub_initialize_remote(to_branch)
1229
1092
def create_branch(self):
1230
1093
"""See BzrDir.create_branch."""
1231
return self._format.get_branch_format().initialize(self)
1094
return self.open_branch()
1233
1096
def destroy_branch(self):
1234
1097
"""See BzrDir.destroy_branch."""
2040
1873
def set_branch_format(self, format):
2041
1874
self._branch_format = format
2043
def require_stacking(self):
2044
if not self.get_branch_format().supports_stacking():
2045
# We need to make a stacked branch, but the default format for the
2046
# target doesn't support stacking. So force a branch that *can*
2048
from bzrlib.branch import BzrBranchFormat7
2049
self._branch_format = BzrBranchFormat7()
2050
mutter("using %r for stacking" % (self._branch_format,))
2051
from bzrlib.repofmt import pack_repo
2052
if self.repository_format.rich_root_data:
2053
bzrdir_format_name = '1.6.1-rich-root'
2054
repo_format = pack_repo.RepositoryFormatKnitPack5RichRoot()
2056
bzrdir_format_name = '1.6'
2057
repo_format = pack_repo.RepositoryFormatKnitPack5()
2058
note('Source format does not support stacking, using format:'
2060
bzrdir_format_name, repo_format.get_format_description())
2061
self.repository_format = repo_format
2063
1876
def get_converter(self, format=None):
2064
1877
"""See BzrDirFormat.get_converter()."""
2065
1878
if format is None:
2596
2409
# TODO: conversions of Branch and Tree should be done by
2597
# InterXFormat lookups/some sort of registry.
2410
# InterXFormat lookups
2598
2411
# Avoid circular imports
2599
2412
from bzrlib import branch as _mod_branch
2600
old = branch._format.__class__
2601
new = self.target_format.get_branch_format().__class__
2603
if (old == _mod_branch.BzrBranchFormat5 and
2604
new in (_mod_branch.BzrBranchFormat6,
2605
_mod_branch.BzrBranchFormat7)):
2606
branch_converter = _mod_branch.Converter5to6()
2607
elif (old == _mod_branch.BzrBranchFormat6 and
2608
new == _mod_branch.BzrBranchFormat7):
2609
branch_converter = _mod_branch.Converter6to7()
2611
raise errors.BadConversionTarget("No converter", new)
2413
if (branch._format.__class__ is _mod_branch.BzrBranchFormat5 and
2414
self.target_format.get_branch_format().__class__ is
2415
_mod_branch.BzrBranchFormat6):
2416
branch_converter = _mod_branch.Converter5to6()
2612
2417
branch_converter.convert(branch)
2613
branch = self.bzrdir.open_branch()
2614
old = branch._format.__class__
2616
2419
tree = self.bzrdir.open_workingtree(recommend_upgrade=False)
2617
2420
except (errors.NoWorkingTree, errors.NotLocalUrl):
2853
2647
experimental_pairs.append((key, help))
2855
2649
output += wrapped(key, help, info)
2856
output += "\nSee ``bzr help formats`` for more about storage formats."
2858
2650
if len(experimental_pairs) > 0:
2859
other_output += "Experimental formats are shown below.\n\n"
2651
output += "Experimental formats are shown below.\n\n"
2860
2652
for key, help in experimental_pairs:
2861
2653
info = self.get_info(key)
2862
other_output += wrapped(key, help, info)
2865
"No experimental formats are available.\n\n"
2654
output += wrapped(key, help, info)
2866
2655
if len(deprecated_pairs) > 0:
2867
other_output += "\nDeprecated formats are shown below.\n\n"
2656
output += "Deprecated formats are shown below.\n\n"
2868
2657
for key, help in deprecated_pairs:
2869
2658
info = self.get_info(key)
2870
other_output += wrapped(key, help, info)
2873
"\nNo deprecated formats are available.\n\n"
2875
"\nSee ``bzr help formats`` for more about storage formats."
2659
output += wrapped(key, help, info)
2877
if topic == 'other-formats':
2883
2664
class RepositoryAcquisitionPolicy(object):
2887
2668
for a branch that is being created. The most basic policy decision is
2888
2669
whether to create a new repository or use an existing one.
2890
def __init__(self, stack_on, stack_on_pwd, require_stacking):
2893
:param stack_on: A location to stack on
2894
:param stack_on_pwd: If stack_on is relative, the location it is
2896
:param require_stacking: If True, it is a failure to not stack.
2898
self._stack_on = stack_on
2899
self._stack_on_pwd = stack_on_pwd
2900
self._require_stacking = require_stacking
2902
2672
def configure_branch(self, branch):
2903
2673
"""Apply any configuration data from this policy to the branch.
2905
Default implementation sets repository stacking.
2675
Default implementation does nothing.
2907
if self._stack_on is None:
2909
if self._stack_on_pwd is None:
2910
stack_on = self._stack_on
2913
stack_on = urlutils.rebase_url(self._stack_on,
2915
branch.bzrdir.root_transport.base)
2916
except errors.InvalidRebaseURLs:
2917
stack_on = self._get_full_stack_on()
2919
branch.set_stacked_on_url(stack_on)
2920
except errors.UnstackableBranchFormat:
2921
if self._require_stacking:
2924
def _get_full_stack_on(self):
2925
"""Get a fully-qualified URL for the stack_on location."""
2926
if self._stack_on is None:
2928
if self._stack_on_pwd is None:
2929
return self._stack_on
2931
return urlutils.join(self._stack_on_pwd, self._stack_on)
2933
def _add_fallback(self, repository, possible_transports=None):
2934
"""Add a fallback to the supplied repository, if stacking is set."""
2935
stack_on = self._get_full_stack_on()
2936
if stack_on is None:
2938
stacked_dir = BzrDir.open(stack_on,
2939
possible_transports=possible_transports)
2941
stacked_repo = stacked_dir.open_branch().repository
2942
except errors.NotBranchError:
2943
stacked_repo = stacked_dir.open_repository()
2945
repository.add_fallback_repository(stacked_repo)
2946
except errors.UnstackableRepositoryFormat:
2947
if self._require_stacking:
2950
self._require_stacking = True
2952
2679
def acquire_repository(self, make_working_trees=None, shared=False):
2953
2680
"""Acquire a repository for this bzrdir.
3013
2720
Returns an existing repository to use
3015
self._add_fallback(self._repository,
3016
possible_transports=[self._repository.bzrdir.transport])
3017
2722
return self._repository
3020
# Please register new formats after old formats so that formats
3021
# appear in chronological order and format descriptions can build
3023
2725
format_registry = BzrDirFormatRegistry()
3024
2726
format_registry.register('weave', BzrDirFormat6,
3025
2727
'Pre-0.8 format. Slower than knit and does not'
3026
2728
' support checkouts or shared repositories.',
3027
2729
deprecated=True)
2730
format_registry.register_metadir('knit',
2731
'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
2732
'Format using knits. Recommended for interoperation with bzr <= 0.14.',
2733
branch_format='bzrlib.branch.BzrBranchFormat5',
2734
tree_format='bzrlib.workingtree.WorkingTreeFormat3')
3028
2735
format_registry.register_metadir('metaweave',
3029
2736
'bzrlib.repofmt.weaverepo.RepositoryFormat7',
3030
2737
'Transitional format in 0.8. Slower than knit.',
3031
2738
branch_format='bzrlib.branch.BzrBranchFormat5',
3032
2739
tree_format='bzrlib.workingtree.WorkingTreeFormat3',
3033
2740
deprecated=True)
3034
format_registry.register_metadir('knit',
3035
'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
3036
'Format using knits. Recommended for interoperation with bzr <= 0.14.',
3037
branch_format='bzrlib.branch.BzrBranchFormat5',
3038
tree_format='bzrlib.workingtree.WorkingTreeFormat3',
3040
2741
format_registry.register_metadir('dirstate',
3041
2742
'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
3042
2743
help='New in 0.15: Fast local operations. Compatible with bzr 0.8 and '
3098
2799
format_registry.register_metadir('rich-root-pack',
3099
2800
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',
3100
help='New in 1.0: A variant of pack-0.92 that supports rich-root data '
3101
'(needed for bzr-svn).',
2801
help='New in 1.0: Pack-based format with data compatible with '
2802
'rich-root format repositories. Incompatible with'
3102
2804
branch_format='bzrlib.branch.BzrBranchFormat6',
3103
2805
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3105
format_registry.register_metadir('1.6',
3106
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack5',
3107
help='A format that allows a branch to indicate that there is another '
3108
'(stacked) repository that should be used to access data that is '
3109
'not present locally.',
3110
branch_format='bzrlib.branch.BzrBranchFormat7',
3111
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3113
format_registry.register_metadir('1.6.1-rich-root',
3114
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack5RichRoot',
3115
help='A variant of 1.6 that supports rich-root data '
3116
'(needed for bzr-svn).',
3117
branch_format='bzrlib.branch.BzrBranchFormat7',
3118
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3120
format_registry.register_metadir('1.9',
3121
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
3122
help='A repository format using B+tree indexes. These indexes '
3123
'are smaller in size, have smarter caching and provide faster '
3124
'performance for most operations.',
3125
branch_format='bzrlib.branch.BzrBranchFormat7',
3126
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3128
format_registry.register_metadir('1.9-rich-root',
3129
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
3130
help='A variant of 1.9 that supports rich-root data '
3131
'(needed for bzr-svn).',
3132
branch_format='bzrlib.branch.BzrBranchFormat7',
3133
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3135
format_registry.register_metadir('development-wt5',
3136
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
3137
help='A working-tree format that supports views and content filtering.',
3138
branch_format='bzrlib.branch.BzrBranchFormat7',
3139
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
3142
format_registry.register_metadir('development-wt5-rich-root',
3143
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
3144
help='A variant of development-wt5 that supports rich-root data '
3145
'(needed for bzr-svn).',
3146
branch_format='bzrlib.branch.BzrBranchFormat7',
3147
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
3150
2807
# The following two formats should always just be aliases.
3151
2808
format_registry.register_metadir('development',
3152
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2',
2809
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
3153
2810
help='Current development format. Can convert data to and from pack-0.92 '
3154
2811
'(and anything compatible with pack-0.92) format repositories. '
3155
'Repositories and branches in this format can only be read by bzr.dev. '
2812
'Repositories in this format can only be read by bzr.dev. '
3157
2814
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3159
branch_format='bzrlib.branch.BzrBranchFormat7',
2816
branch_format='bzrlib.branch.BzrBranchFormat6',
3160
2817
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3161
2818
experimental=True,
3164
2821
format_registry.register_metadir('development-subtree',
3165
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
2822
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0Subtree',
3166
2823
help='Current development format, subtree variant. Can convert data to and '
3167
'from pack-0.92-subtree (and anything compatible with '
3168
'pack-0.92-subtree) format repositories. Repositories and branches in '
3169
'this format can only be read by bzr.dev. Please read '
2824
'from pack-0.92 (and anything compatible with pack-0.92) format '
2825
'repositories. Repositories in this format can only be read by '
2826
'bzr.dev. Please read '
3170
2827
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3172
branch_format='bzrlib.branch.BzrBranchFormat7',
2829
branch_format='bzrlib.branch.BzrBranchFormat6',
3173
2830
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3174
2831
experimental=True,
3177
# And the development formats above will have aliased one of the following:
3178
format_registry.register_metadir('development2',
3179
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2',
3180
help='1.6.1 with B+Tree based index. '
3182
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3184
branch_format='bzrlib.branch.BzrBranchFormat7',
3185
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3189
format_registry.register_metadir('development2-subtree',
3190
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
3191
help='1.6.1-subtree with B+Tree based index. '
3193
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
3195
branch_format='bzrlib.branch.BzrBranchFormat7',
3196
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3200
# The current format that is made on 'bzr init'.
2834
# And the development formats which the will have aliased one of follow:
2835
format_registry.register_metadir('development0',
2836
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
2837
help='Trivial rename of pack-0.92 to provide a development format. '
2839
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
2841
branch_format='bzrlib.branch.BzrBranchFormat6',
2842
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2846
format_registry.register_metadir('development0-subtree',
2847
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0Subtree',
2848
help='Trivial rename of pack-0.92-subtree to provide a development format. '
2850
'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
2852
branch_format='bzrlib.branch.BzrBranchFormat6',
2853
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3201
2857
format_registry.set_default('pack-0.92')