~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/weaverepo.py

  • Committer: Robert Collins
  • Date: 2009-02-20 05:05:25 UTC
  • mto: This revision was merged to the branch mainline in revision 4024.
  • Revision ID: robertc@robertcollins.net-20090220050525-o3i6wve7yigkx6i9
Refactoring of fetch to have a sender and sink component enabling splitting the logic over a network stream. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
class WeaveMetaDirRepository(MetaDirVersionedFileRepository):
193
193
    """A subclass of MetaDirRepository to set weave specific policy."""
194
194
 
195
 
    @property
196
 
    def _serializer(self):
197
 
        return xml5.serializer_v5
198
 
 
199
195
    def __init__(self, _format, a_bzrdir, control_files):
200
196
        super(WeaveMetaDirRepository, self).__init__(_format, a_bzrdir, control_files)
201
197
        self._fetch_order = 'topological'
202
198
        self._fetch_reconcile = True
 
199
        self._serializer = _format._serializer
203
200
 
204
201
    @needs_read_lock
205
202
    def _all_possible_ids(self):
390
387
 
391
388
    _versionedfile_class = weave.WeaveFile
392
389
    _matchingbzrdir = bzrdir.BzrDirFormat5()
 
390
    @property
 
391
    def _serializer(self):
 
392
        return xml5.serializer_v5
393
393
 
394
394
    def __init__(self):
395
395
        super(RepositoryFormat5, self).__init__()
410
410
            weave.WeaveFile, mapper, repo.is_locked)
411
411
 
412
412
    def _get_revisions(self, repo_transport, repo):
413
 
        from bzrlib.xml5 import serializer_v5
414
413
        return RevisionTextStore(repo_transport.clone('revision-store'),
415
 
            serializer_v5, False, versionedfile.PrefixMapper(),
 
414
            xml5.serializer_v5, False, versionedfile.PrefixMapper(),
416
415
            repo.is_locked, repo.is_write_locked)
417
416
 
418
417
    def _get_signatures(self, repo_transport, repo):
438
437
 
439
438
    _versionedfile_class = weave.WeaveFile
440
439
    _matchingbzrdir = bzrdir.BzrDirFormat6()
 
440
    @property
 
441
    def _serializer(self):
 
442
        return xml5.serializer_v5
441
443
 
442
444
    def __init__(self):
443
445
        super(RepositoryFormat6, self).__init__()
458
460
            weave.WeaveFile, mapper, repo.is_locked)
459
461
 
460
462
    def _get_revisions(self, repo_transport, repo):
461
 
        from bzrlib.xml5 import serializer_v5
462
463
        return RevisionTextStore(repo_transport.clone('revision-store'),
463
 
            serializer_v5, False, versionedfile.HashPrefixMapper(),
 
464
            xml5.serializer_v5, False, versionedfile.HashPrefixMapper(),
464
465
            repo.is_locked, repo.is_write_locked)
465
466
 
466
467
    def _get_signatures(self, repo_transport, repo):
489
490
 
490
491
    _versionedfile_class = weave.WeaveFile
491
492
    supports_ghosts = False
 
493
    @property
 
494
    def _serializer(self):
 
495
        return xml5.serializer_v5
492
496
 
493
497
    def get_format_string(self):
494
498
        """See RepositoryFormat.get_format_string()."""
507
511
            weave.WeaveFile, mapper, repo.is_locked)
508
512
 
509
513
    def _get_revisions(self, repo_transport, repo):
510
 
        from bzrlib.xml5 import serializer_v5
511
514
        return RevisionTextStore(repo_transport.clone('revision-store'),
512
 
            serializer_v5, True, versionedfile.HashPrefixMapper(),
 
515
            xml5.serializer_v5, True, versionedfile.HashPrefixMapper(),
513
516
            repo.is_locked, repo.is_write_locked)
514
517
 
515
518
    def _get_signatures(self, repo_transport, repo):