~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

Do not alter InventoryDirectory objects provided to Inventory.apply_delta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
969
969
                # Pop the child which to allow detection of children whose
970
970
                # parents were deleted and which were not reattached to a new
971
971
                # parent.
972
 
                new_entry.children = children.pop(new_entry.file_id, {})
 
972
                replacement = InventoryDirectory(new_entry.file_id,
 
973
                    new_entry.name, new_entry.parent_id)
 
974
                replacement.revision = new_entry.revision
 
975
                replacement.children = children.pop(replacement.file_id, {})
 
976
                new_entry = replacement
973
977
            self.add(new_entry)
974
978
        if len(children):
975
979
            # Get the parent id that was deleted