~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v07.py

  • Committer: Aaron Bentley
  • Date: 2006-05-30 15:18:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: abentley@panoramicfeedback.com-20060530151812-0e3e9b78cc15a804
Rename changesets to revision bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
"""Serializer factory for reading and writing changesets.
 
17
"""Serializer factory for reading and writing bundles.
18
18
"""
19
19
 
20
20
import os
21
21
 
22
 
from bzrlib.changeset.serializer import (ChangesetSerializer, 
23
 
        CHANGESET_HEADER,
24
 
        format_highres_date, unpack_highres_date)
25
 
from bzrlib.changeset.serializer import binary_diff
 
22
from bzrlib.bundle.serializer import (BundleSerializer, 
 
23
                                      BUNDLE_HEADER, 
 
24
                                      format_highres_date,
 
25
                                      unpack_highres_date,
 
26
                                     )
 
27
from bzrlib.bundle.serializer import binary_diff
26
28
from bzrlib.delta import compare_trees
27
29
from bzrlib.diff import internal_diff
28
30
import bzrlib.errors as errors
82
84
        to_file.write(text_line+'\n')
83
85
 
84
86
 
85
 
class ChangesetSerializerV07(ChangesetSerializer):
 
87
class BundleSerializerV07(BundleSerializer):
86
88
    def read(self, f):
87
 
        """Read the rest of the changesets from the supplied file.
 
89
        """Read the rest of the bundles from the supplied file.
88
90
 
89
91
        :param f: The file to read from
90
 
        :return: A list of changesets
 
92
        :return: A list of bundles
91
93
        """
92
94
        assert self.version == '0.7'
93
95
        # The first line of the header should have been read
94
96
        raise NotImplementedError
95
97
 
96
98
    def write(self, source, revision_ids, forced_bases, f):
97
 
        """Write the changesets to the supplied files.
 
99
        """Write the bundless to the supplied files.
98
100
 
99
101
        :param source: A source for revision information
100
102
        :param revision_ids: The list of revision ids to serialize
120
122
    def _write_main_header(self):
121
123
        """Write the header for the changes"""
122
124
        f = self.to_file
123
 
        f.write(CHANGESET_HEADER)
 
125
        f.write(BUNDLE_HEADER)
124
126
        f.write('0.7\n')
125
127
        f.write('#\n')
126
128