~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-19 16:09:34 UTC
  • mfrom: (2520.4.135 bzr.mpbundle)
  • Revision ID: pqm@pqm.ubuntu.com-20070719160934-d51fyijw69oto88p
Add new bundle and merge-directive formats

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    transactions,
41
41
    ui,
42
42
    )
 
43
from bzrlib.bundle import serializer
43
44
from bzrlib.revisiontree import RevisionTree
44
45
from bzrlib.store.versioned import VersionedFileStore
45
46
from bzrlib.store.text import TextStore
143
144
                self.add_inventory(revision_id, inv, rev.parent_ids)
144
145
        self._revision_store.add_revision(rev, self.get_transaction())
145
146
 
 
147
    def _add_revision_text(self, revision_id, text):
 
148
        revision = self._revision_store._serializer.read_revision_from_string(
 
149
            text)
 
150
        self._revision_store._add_revision(revision, StringIO(text),
 
151
                                           self.get_transaction())
 
152
 
146
153
    @needs_read_lock
147
154
    def _all_possible_ids(self):
148
155
        """Return all the possible revisions that we could find."""
365
372
        except NotImplementedError:
366
373
            raise errors.IncompatibleRepositories(source, self)
367
374
 
 
375
    def create_bundle(self, target, base, fileobj, format=None):
 
376
        return serializer.write_bundle(self, target, base, fileobj, format)
 
377
 
368
378
    def get_commit_builder(self, branch, parents, config, timestamp=None, 
369
379
                           timezone=None, committer=None, revprops=None, 
370
380
                           revision_id=None):
643
653
    def serialise_inventory(self, inv):
644
654
        return self._serializer.write_inventory_to_string(inv)
645
655
 
 
656
    def get_serializer_format(self):
 
657
        return self._serializer.format_num
 
658
 
646
659
    @needs_read_lock
647
660
    def get_inventory_xml(self, revision_id):
648
661
        """Get inventory XML as a file object."""