48
48
from bzrlib.bundle import serializer
49
from bzrlib.recordcounter import RecordCounter
49
50
from bzrlib.revisiontree import RevisionTree
50
51
from bzrlib.store.versioned import VersionedFileStore
51
52
from bzrlib.testament import Testament
68
from bzrlib.recordcounter import RecordCounter
69
69
from bzrlib.lock import _RelockDebugMixin, LogicalLockResult
70
70
from bzrlib.trace import (
71
71
log_exception_quietly, note, mutter, mutter_callsite, warning)
94
94
record_root_entry = True
95
95
# the default CommitBuilder does not manage trees whose root is versioned.
96
96
_versioned_root = False
97
# this commit builder supports the record_entry_contents interface
98
supports_record_entry_contents = True
98
100
def __init__(self, repository, parents, config, timestamp=None,
99
101
timezone=None, committer=None, revprops=None,
3218
3220
return self.get_format_string()
3221
# Pre-0.8 formats that don't have a disk format string (because they are
3222
# versioned by the matching control directory). We use the control directories
3223
# disk format string as a key for the network_name because they meet the
3224
# constraints (simple string, unique, immutable).
3225
network_format_registry.register_lazy(
3226
"Bazaar-NG branch, format 5\n",
3227
'bzrlib.repofmt.weaverepo',
3228
'RepositoryFormat5',
3230
network_format_registry.register_lazy(
3231
"Bazaar-NG branch, format 6\n",
3232
'bzrlib.repofmt.weaverepo',
3233
'RepositoryFormat6',
3236
format_registry.register_extra_lazy(
3237
'bzrlib.repofmt.weaverepo',
3238
'RepositoryFormat4')
3239
format_registry.register_extra_lazy(
3240
'bzrlib.repofmt.weaverepo',
3241
'RepositoryFormat5')
3242
format_registry.register_extra_lazy(
3243
'bzrlib.repofmt.weaverepo',
3244
'RepositoryFormat6')
3246
3223
# formats which have no format string are not discoverable or independently
3247
3224
# creatable on disk, so are not registered in format_registry. They're
3248
# all in bzrlib.repofmt.weaverepo now. When an instance of one of these is
3225
# all in bzrlib.repofmt.knitreponow. When an instance of one of these is
3249
3226
# needed, it's constructed directly by the BzrDir. Non-native formats where
3250
3227
# the repository is not separately opened are similar.
3252
3229
format_registry.register_lazy(
3253
'Bazaar-NG Repository format 7',
3254
'bzrlib.repofmt.weaverepo',
3258
format_registry.register_lazy(
3259
3230
'Bazaar-NG Knit Repository Format 1',
3260
3231
'bzrlib.repofmt.knitrepo',
3261
3232
'RepositoryFormatKnit1',
4024
3995
return wrong_parents, unused_keys
4027
def _old_get_graph(repository, revision_id):
4028
"""DO NOT USE. That is all. I'm serious."""
4029
graph = repository.get_graph()
4030
revision_graph = dict(((key, value) for key, value in
4031
graph.iter_ancestry([revision_id]) if value is not None))
4032
return _strip_NULL_ghosts(revision_graph)
4035
3998
def _strip_NULL_ghosts(revision_graph):
4036
3999
"""Also don't use this. more compatibility code for unmigrated clients."""
4037
4000
# Filter ghosts, and null: