~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_core.py

  • Committer: Aaron Bentley
  • Date: 2005-09-30 04:08:58 UTC
  • mfrom: (1185.10.11)
  • mto: (1185.12.13)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20050930040858-a6d383d9c88bc2cf
Merged bzr.24 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
 
199
199
 
200
200
def get_contents(entry, tree):
 
201
    return get_id_contents(entry.id, tree)
 
202
 
 
203
def get_id_contents(file_id, tree):
201
204
    """Get a contents change element suitable for use with ReplaceContents
202
205
    """
203
 
    tree_entry = tree.tree.inventory[entry.id]
 
206
    tree_entry = tree.tree.inventory[file_id]
204
207
    if tree_entry.kind == "file":
205
 
        return changeset.FileCreate(tree.get_file(entry.id).read())
 
208
        return changeset.FileCreate(tree.get_file(file_id).read())
206
209
    else:
207
210
        assert tree_entry.kind in ("root_directory", "directory")
208
211
        return changeset.dir_create