/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

More work on roundtrip push support.

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