/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 versionedfiles.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-25 11:29:44 UTC
  • mto: (0.254.20 index-based)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100325112944-yx5r5hbvlzlswi1e
Mark as compatible with Bazaar 2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    Tree,
24
24
    )
25
25
 
26
 
from bzrlib import (
27
 
    annotate,
28
 
    )
29
 
 
30
26
from bzrlib.versionedfile import (
31
27
    AbsentContentFactory,
32
 
    ChunkedContentFactory,
 
28
    FulltextContentFactory,
33
29
    VersionedFiles,
34
30
    )
35
31
 
43
39
    def check(self, progressbar=None):
44
40
        return True
45
41
 
46
 
    def get_annotator(self):
47
 
        return annotate.Annotator(self)
48
 
 
49
42
    def iterkeys(self):
50
43
        for sha in self.object_store:
51
44
            if type(sha) == Commit:
66
59
            except KeyError:
67
60
                yield AbsentContentFactory(key)
68
61
            else:
69
 
                yield ChunkedContentFactory(key, 
 
62
                yield FulltextContentFactory(key, 
70
63
                    tuple([(self.repository.lookup_foreign_revision_id(p, mapping),) for p in commit.parents]), None, 
71
 
                    commit.as_raw_chunks())
 
64
                    commit.as_raw_string())
72
65
 
73
66
    def get_parent_map(self, keys):
74
67
        ret = {}
91
84
    def check(self, progressbar=None):
92
85
        return True
93
86
 
94
 
    def get_annotator(self):
95
 
        return annotate.Annotator(self)
96
 
 
97
87
    def add_mpdiffs(self, records):
98
88
        raise NotImplementedError(self.add_mpdiffs)
99
89
 
113
103
                yield AbsentContentFactory(key)
114
104
            else:
115
105
                if isinstance(obj, Tree):
116
 
                    yield ChunkedContentFactory(key, None, None, [])
 
106
                    yield FulltextContentFactory(key, None, None, "")
117
107
                elif isinstance(obj, Blob):
118
 
                    yield ChunkedContentFactory(key, None, None, obj.chunked)
 
108
                    yield FulltextContentFactory(key, None, None, obj.data)
119
109
                else:
120
110
                    raise AssertionError("file text resolved to %r" % obj)
121
111