/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-03 23:18:11 UTC
  • mfrom: (4252 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4253.
  • Revision ID: jelmer@samba.org-20090403231811-8yh9yi6xl2lfce1v
Merge bzr.dev.

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
19
20
import re
20
21
import time
21
22
 
1635
1636
 
1636
1637
    @needs_read_lock
1637
1638
    def get_revision_xml(self, revision_id):
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))
 
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
        # TODO: this can't just be replaced by:
 
1643
        # return self._serializer.write_revision_to_string(
 
1644
        #     self.get_revision(revision_id))
 
1645
        # as cStringIO preservers the encoding unlike write_revision_to_string
 
1646
        # or some other call down the path.
 
1647
        rev = self.get_revision(revision_id)
 
1648
        rev_tmp = cStringIO.StringIO()
 
1649
        # the current serializer..
 
1650
        self._serializer.write_revision(rev, rev_tmp)
 
1651
        rev_tmp.seek(0)
 
1652
        return rev_tmp.getvalue()
1645
1653
 
1646
1654
    def get_deltas_for_revisions(self, revisions, specific_fileids=None):
1647
1655
        """Produce a generator of revision deltas.