~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/repository.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
from bzrlib import (
31
 
    bzrdir_weave,
32
31
    xml5,
33
32
    graph as _mod_graph,
34
33
    ui,
146
145
 
147
146
    def get_commit_builder(self, branch, parents, config, timestamp=None,
148
147
                           timezone=None, committer=None, revprops=None,
149
 
                           revision_id=None):
 
148
                           revision_id=None, lossy=False):
150
149
        self._check_ascii_revisionid(revision_id, self.get_commit_builder)
151
150
        result = CommitBuilder(self, parents, config, timestamp, timezone,
152
 
                              committer, revprops, revision_id)
 
151
                              committer, revprops, revision_id, lossy=lossy)
153
152
        self.start_write_group()
154
153
        return result
155
154
 
189
188
        """Returns the policy for making working trees on new branches."""
190
189
        return True
191
190
 
192
 
    def revision_graph_can_have_wrong_parents(self):
193
 
        # XXX: This is an old format that we don't support full checking on, so
194
 
        # just claim that checking for this inconsistency is not required.
195
 
        return False
196
 
 
197
191
 
198
192
class WeaveMetaDirRepository(MetaDirVersionedFileRepository):
199
193
    """A subclass of MetaDirRepository to set weave specific policy."""
240
234
 
241
235
    def get_commit_builder(self, branch, parents, config, timestamp=None,
242
236
                           timezone=None, committer=None, revprops=None,
243
 
                           revision_id=None):
 
237
                           revision_id=None, lossy=False):
244
238
        self._check_ascii_revisionid(revision_id, self.get_commit_builder)
245
239
        result = CommitBuilder(self, parents, config, timestamp, timezone,
246
 
                              committer, revprops, revision_id)
 
240
                              committer, revprops, revision_id, lossy=lossy)
247
241
        self.start_write_group()
248
242
        return result
249
243
 
264
258
        return self.inventories.add_lines((revision_id,), final_parents, lines,
265
259
            check_content=check_content)[0]
266
260
 
267
 
    def revision_graph_can_have_wrong_parents(self):
268
 
        return False
269
 
 
270
261
 
271
262
class PreSplitOutRepositoryFormat(RepositoryFormat):
272
263
    """Base class for the pre split out repository formats."""
281
272
    fast_deltas = False
282
273
    supports_leaving_lock = False
283
274
    supports_full_versioned_files = True
 
275
    # XXX: This is an old format that we don't support full checking on, so
 
276
    # just claim that checking for this inconsistency is not required.
 
277
    revision_graph_can_have_wrong_parents = False
284
278
 
285
279
    def initialize(self, a_bzrdir, shared=False, _internal=False):
286
280
        """Create a weave repository."""
503
497
    supports_chks = False
504
498
    supports_funky_characters = False
505
499
    supports_full_versioned_files = True
 
500
    revision_graph_can_have_wrong_parents = False
506
501
 
507
502
    _fetch_order = 'topological'
508
503
    _fetch_reconcile = True