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

Bump minimum dulwich version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from dulwich.object_store import (
24
24
    tree_lookup_path,
25
25
    )
 
26
from itertools import (
 
27
    imap,
 
28
    )
26
29
import posixpath
27
30
import re
28
31
import stat
116
119
            ie.text_size = None
117
120
            ie.text_sha1 = None
118
121
        else:
119
 
            ie.text_size = len(blob.data)
120
 
            ie.text_sha1 = osutils.sha_string(blob.data)
 
122
            ie.text_size = sum(imap(len, blob.chunked))
 
123
            ie.text_sha1 = osutils.sha_strings(blob.chunked)
121
124
    # Check what revision we should store
122
125
    parent_keys = []
123
126
    for pinv in parent_invs[1:]:
137
140
        if ie.kind == 'symlink':
138
141
            chunks = []
139
142
        else: 
140
 
            try:
141
 
                chunks = blob.chunked
142
 
            except AttributeError: # older version of dulwich
143
 
                chunks = [blob.data]
 
143
            chunks = blob.chunked
144
144
        texts.insert_record_stream([ChunkedContentFactory((file_id, ie.revision), tuple(parent_keys), ie.text_sha1, chunks)])
145
145
    invdelta = []
146
146
    if base_hexsha is not None: