~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-02-22 13:39:51 UTC
  • mfrom: (6470.1.1 less-inventory-use-2)
  • Revision ID: pqm@pqm.ubuntu.com-20120222133951-cqvnnx710wox7905
(jelmer) Use inventories directly in fewer places. (Jelmer Vernooij)

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: