~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: 2009-04-01 15:14:38 UTC
  • mfrom: (4202.3.2 bzr-send-tweak)
  • Revision ID: pqm@pqm.ubuntu.com-20090401151438-hqulqoazddtacbls
(andrew) Don't use get_revision_xml when writing a bundle,
        instead get all the revisions together.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from bzrlib.lazy_import import lazy_import
18
18
lazy_import(globals(), """
19
 
import cStringIO
20
19
import re
21
20
import time
22
21
 
1636
1635
 
1637
1636
    @needs_read_lock
1638
1637
    def get_revision_xml(self, revision_id):
1639
 
        # TODO: jam 20070210 This shouldn't be necessary since get_revision
1640
 
        #       would have already do it.
1641
 
        # TODO: jam 20070210 Just use _serializer.write_revision_to_string()
1642
 
        rev = self.get_revision(revision_id)
1643
 
        rev_tmp = cStringIO.StringIO()
1644
 
        # the current serializer..
1645
 
        self._serializer.write_revision(rev, rev_tmp)
1646
 
        rev_tmp.seek(0)
1647
 
        return rev_tmp.getvalue()
 
1638
        """Return the XML representation of a revision.
 
1639
 
 
1640
        :param revision_id: Revision for which to return the XML.
 
1641
        :return: XML string
 
1642
        """
 
1643
        return self._serializer.write_revision_to_string(
 
1644
            self.get_revision(revision_id))
1648
1645
 
1649
1646
    def get_deltas_for_revisions(self, revisions, specific_fileids=None):
1650
1647
        """Produce a generator of revision deltas.