~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

[merge] jam-integration 1503

Show diffs side-by-side

added added

removed removed

Lines of Context:
1178
1178
    return changed_inventory
1179
1179
 
1180
1180
 
1181
 
def apply_changeset_tree(cset, tree):
1182
 
    r_inventory = {}
1183
 
    for entry in tree.source_inventory().itervalues():
1184
 
        inventory[entry.id] = entry.path
1185
 
    new_inventory = apply_changeset(cset, r_inventory, tree.basedir)
1186
 
    new_entries, remove_entries = \
1187
 
        get_inventory_change(inventory, new_inventory, cset)
1188
 
    tree.update_source_inventory(new_entries, remove_entries)
1189
 
 
1190
 
 
1191
 
def get_inventory_change(inventory, new_inventory, cset):
1192
 
    new_entries = {}
1193
 
    remove_entries = []
1194
 
    for entry in cset.entries.itervalues():
1195
 
        if entry.needs_rename():
1196
 
            new_path = entry.get_new_path(inventory, cset)
1197
 
            if new_path is None:
1198
 
                remove_entries.append(entry.id)
1199
 
            else:
1200
 
                new_entries[new_path] = entry.id
1201
 
    return new_entries, remove_entries
1202
 
 
1203
 
 
1204
1181
def print_changeset(cset):
1205
1182
    """Print all non-boring changeset entries
1206
1183