~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v08.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 14:15:25 UTC
  • mto: (6471.1.4 iter-child-entries)
  • mto: This revision was merged to the branch mainline in revision 6472.
  • Revision ID: jelmer@samba.org-20120220141525-9azkfei62st8yc7w
Use inventories directly in fewer places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
 
288
288
        def finish_action(action, file_id, kind, meta_modified, text_modified,
289
289
                          old_path, new_path):
290
 
            entry = new_tree.root_inventory[file_id]
291
 
            if entry.revision != default_revision_id:
292
 
                action.add_utf8_property('last-changed', entry.revision)
 
290
            revision = new_tree.get_file_revision(file_id)
 
291
            if revision != default_revision_id:
 
292
                action.add_utf8_property('last-changed', revision)
293
293
            if meta_modified:
294
 
                action.add_bool_property('executable', entry.executable)
 
294
                action.add_bool_property('executable',
 
295
                    new_tree.is_executable(file_id))
295
296
            if text_modified and kind == "symlink":
296
 
                action.add_property('target', entry.symlink_target)
 
297
                action.add_property('target',
 
298
                    new_tree.get_symlink_target(file_id))
297
299
            if text_modified and kind == "file":
298
300
                do_diff(file_id, old_path, new_path, action, force_binary)
299
301
            else: