/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

Change kind when turning symlink into dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        base_sha = None
109
109
    else:
110
110
        try:
111
 
            if base_sha is None:
112
 
                base_sha = shagitmap.lookup_blob(file_id, base_ie.revision)
 
111
            base_sha = shagitmap.lookup_blob(file_id, base_ie.revision)
113
112
        except KeyError:
114
113
            base_sha = None
115
114
        else:
214
213
    else:
215
214
        # See if this has changed at all
216
215
        try:
217
 
            if base_sha is None:
218
 
                base_sha = shagitmap.lookup_tree(file_id, base_inv.revision_id)
 
216
            base_sha = shagitmap.lookup_tree(file_id, base_inv.revision_id)
219
217
        except KeyError:
220
218
            pass
221
219
        else:
224
222
                return [], {}, []
225
223
        if base_ie.kind != "directory":
226
224
            ie.revision = revision_id
227
 
            texts.add_lines((file_id, ie.revision), (), [])
228
 
            invdelta.append((base_inv.id2path(file_id), path, file_id, ie))
 
225
            texts.add_lines((ie.file_id, ie.revision), (), [])
 
226
            invdelta.append((base_inv.id2path(ie.file_id), path, ie.file_id, ie))
229
227
    # Remember for next time
230
228
    existing_children = set()
231
229
    child_modes = {}
236
234
        existing_children.add(basename)
237
235
        child_path = osutils.pathjoin(path, name)
238
236
        if stat.S_ISDIR(mode):
239
 
            subinvdelta, grandchildmodes, subshamap = import_git_tree(texts, 
240
 
                    mapping, child_path, child_hexsha, base_inv, file_id, 
241
 
                    revision_id, parent_invs, shagitmap, lookup_object)
 
237
            subinvdelta, grandchildmodes, subshamap = import_git_tree(
 
238
                    texts, mapping, child_path, child_hexsha, base_inv, 
 
239
                    file_id, revision_id, parent_invs, shagitmap, lookup_object)
242
240
            invdelta.extend(subinvdelta)
243
241
            child_modes.update(grandchildmodes)
244
242
            shamap.extend(subshamap)