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

Don't yield all tree objects, only those not found in parents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
                            shamap[ie.file_id] = pinvshamap.lookup_tree(
172
172
                                ie.file_id)
173
173
                        except NotImplementedError:
174
 
                            pass
 
174
                            shamap[ie.file_id] = None
175
175
                        else:
176
176
                            break
177
177
            else:
187
187
        yield path, obj
188
188
        shamap[fid] = obj.id
189
189
 
190
 
    assert all([ie.file_id in shamap for (path, ie) in new_blobs])
191
 
 
192
190
    for fid in unusual_modes:
193
191
        new_trees[inv.id2path(fid)] = inv[fid].parent_id
194
192
    
209
207
        obj = directory_to_tree(ie, 
210
208
                lambda ie: shamap[ie.file_id], unusual_modes)
211
209
        if obj is not None:
 
210
            if not ie.file_id in shamap:
 
211
                yield path, obj
212
212
            shamap[ie.file_id] = obj.id
213
 
            yield path, obj
214
213
 
215
214
 
216
215
class BazaarObjectStore(BaseObjectStore):