/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

  • Committer: William Grant
  • Date: 2015-05-09 00:38:40 UTC
  • mto: (0.200.1632 bzr-git)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: william.grant@canonical.com-20150509003840-yb6qo8bbb2z19dxt
Always dirty both parents, fixing weird directory rename cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
                        shamap[file_id] = blob.id
220
220
            if not file_id in shamap:
221
221
                new_blobs.append((path[1], file_id))
222
 
            dirty_dirs.add(parent[1])
223
222
        elif kind[1] == "symlink":
224
223
            if changed_content:
225
224
                target = tree.get_symlink_target(file_id)
229
228
                    find_unchanged_parent_ie(file_id, kind[1], target, other_parent_trees)
230
229
                except KeyError:
231
230
                    yield path[1], blob, (file_id, tree.get_file_revision(file_id, path[1]))
232
 
            dirty_dirs.add(parent[1])
233
231
        elif kind[1] not in (None, "directory"):
234
232
            raise AssertionError(kind[1])
235
 
        if (path[0] not in (None, "") and
236
 
            tree.has_id(parent[0]) and
237
 
            tree.kind(parent[0]) == "directory"):
238
 
            # Removal
239
 
            dirty_dirs.add(parent[0])
 
233
        for p in parent:
 
234
            if p and tree.has_id(p) and tree.kind(p) == "directory":
 
235
                dirty_dirs.add(p)
240
236
 
241
237
    # Fetch contents of the blobs that were changed
242
238
    for (path, file_id), chunks in tree.iter_files_bytes(