~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset/serializer/v07.py

  • Committer: Aaron Bentley
  • Date: 2006-05-22 18:25:58 UTC
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: aaron.bentley@utoronto.ca-20060522182558-a5d0bd4953b5e075
Handle last-modified changes on their own

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
            else:
265
265
                action.write(self.to_file)
266
266
 
267
 
        delta = compare_trees(old_tree, new_tree, want_unchanged=False)
268
 
 
 
267
        delta = compare_trees(old_tree, new_tree, want_unchanged=True)
269
268
        for path, file_id, kind in delta.removed:
270
269
            action = Action('removed', [kind, path]).write(self.to_file)
271
270
 
285
284
            action = Action('modified', [kind, path])
286
285
            finish_action(action, file_id, kind, meta_modified, text_modified,
287
286
                          path, path)
 
287
 
 
288
        for path, file_id, kind in delta.unchanged:
 
289
            ie = new_tree.inventory[file_id]
 
290
            new_rev = getattr(ie, 'revision', None)
 
291
            if new_rev is None:
 
292
                continue
 
293
            old_rev = getattr(old_tree.inventory[ie.file_id], 'revision', None)
 
294
            if new_rev != old_rev:
 
295
                action = Action('modified', [ie.kind, 
 
296
                                             new_tree.id2path(ie.file_id)])
 
297
                action.add_property('last-changed', ie.revision)
 
298
                action.write(self.to_file)