/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 brzlib/bundle/serializer/v09.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from . import _get_bundle_header
18
 
from .v08 import BundleSerializerV08, BundleReader
19
 
from ..bundle_data import BundleInfo
 
17
from __future__ import absolute_import
20
18
 
21
 
from ...testament import StrictTestament3
 
19
from brzlib.bundle.serializer import _get_bundle_header
 
20
from brzlib.bundle.serializer.v08 import BundleSerializerV08, BundleReader
 
21
from brzlib.testament import StrictTestament3
 
22
from brzlib.bundle.bundle_data import BundleInfo
22
23
 
23
24
 
24
25
"""Serializer for bundle format 0.9"""
39
40
    def _write_main_header(self):
40
41
        """Write the header for the changes"""
41
42
        f = self.to_file
42
 
        f.write(_get_bundle_header('0.9') + b'#\n')
 
43
        f.write(_get_bundle_header('0.9') + '#\n')
43
44
 
44
45
    def _testament_sha1(self, revision_id):
45
46
        return StrictTestament3.from_revision(self.source,
64
65
        testament = StrictTestament3.from_revision(repository, revision_id)
65
66
        return testament.as_sha1()
66
67
 
67
 
    def _testament(self, revision, tree):
68
 
        return StrictTestament3(revision, tree)
 
68
    def _testament_sha1(self, revision, tree):
 
69
        return StrictTestament3(revision, tree).as_sha1()
69
70
 
70
71
 
71
72
class BundleReaderV09(BundleReader):