/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/store/revision/knit.py

[merge] bzr.dev 2240

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
 
# it under the terms of the GNU General Public License version 2 as published by
5
 
# the Free Software Foundation.
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; either version 2 of the License, or
 
6
# (at your option) any later version.
6
7
#
7
8
# This program is distributed in the hope that it will be useful,
8
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21
22
 
22
23
 
23
24
import bzrlib
24
 
import bzrlib.errors as errors
 
25
from bzrlib import errors, osutils
25
26
from bzrlib.knit import KnitVersionedFile, KnitPlainFactory
26
27
from bzrlib.store.revision import RevisionStore
27
28
from bzrlib.store.versioned import VersionedFileStore
65
66
        self.get_revision_file(transaction).add_lines_with_ghosts(
66
67
            revision.revision_id,
67
68
            revision.parent_ids,
68
 
            bzrlib.osutils.split_lines(revision_as_file.read()))
 
69
            osutils.split_lines(revision_as_file.read()))
69
70
 
70
71
    def add_revision_signature_text(self, revision_id, signature_text, transaction):
71
72
        """See RevisionStore.add_revision_signature_text()."""
72
73
        self.get_signature_file(transaction).add_lines(
73
 
            revision_id, [], bzrlib.osutils.split_lines(signature_text))
 
74
            revision_id, [], osutils.split_lines(signature_text))
74
75
 
75
76
    def all_revision_ids(self, transaction):
76
77
        """See RevisionStore.all_revision_ids()."""
87
88
                assert r.revision_id == revision_id
88
89
                revisions.append(r)
89
90
        except SyntaxError, e:
90
 
            raise errors.BzrError('failed to unpack revision_xml',
91
 
                                   [revision_id,
92
 
                                   str(e)])
 
91
            raise errors.BzrError('failed to unpack revision_xml for %s: %s' %
 
92
                                   (revision_id, str(e)))
93
93
        return revisions 
94
94
 
95
95
    def _get_serialized_revisions(self, revision_ids, transaction):