~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Martin Pool
  • Date: 2006-01-13 05:52:00 UTC
  • mto: (1185.50.49 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1549.
  • Revision ID: mbp@sourcefrog.net-20060113055200-7e197ac9ec1326f1
[patch] stat-cache fixes from Denys

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