/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 breezy/git/annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2020-01-30 18:07:32 UTC
  • mfrom: (7472 work)
  • mto: This revision was merged to the branch mainline in revision 7473.
  • Revision ID: jelmer@jelmer.uk-20200130180732-6xcdyr3bhipain1k
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        raise UnavailableRepresentation(self.key, storage_kind,
69
69
                                        self.storage_kind)
70
70
 
 
71
    def iter_bytes_as(self, storage_kind):
 
72
        if storage_kind == 'lines':
 
73
            return osutils.chunks_to_lines(self.store[self.blob_id].as_raw_chunks())
 
74
        elif storage_kind == 'chunked':
 
75
            return iter(self.store[self.blob_id].as_raw_chunks())
 
76
        raise UnavailableRepresentation(self.key, storage_kind,
 
77
                                        self.storage_kind)
 
78
 
71
79
 
72
80
class GitAbsentContentFactory(object):
73
81
    """Absent data content factory.
93
101
    def get_bytes_as(self, storage_kind):
94
102
        raise ValueError
95
103
 
 
104
    def iter_bytes_as(self, storage_kind):
 
105
        raise ValueError
 
106
 
96
107
 
97
108
class AnnotateProvider(object):
98
109