~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Martin Pool
  • Date: 2005-05-11 06:14:54 UTC
  • Revision ID: mbp@sourcefrog.net-20050511061454-aa52aad45335cb11
- actually avoid reporting unchanged files if not required

Show diffs side-by-side

added added

removed removed

Lines of Context:
329
329
            else:
330
330
                ## mutter("no text to check for %r %r" % (file_id, kind))
331
331
                text_modified = False
 
332
 
 
333
            # TODO: Can possibly avoid calculating path strings if the
 
334
            # two files are unchanged and their names and parents are
 
335
            # the same and the parents are unchanged all the way up.
 
336
            # May not be worthwhile.
332
337
            
333
338
            if old_path != new_path:
334
339
                delta.renamed.append((old_path, new_path, file_id, text_modified))
335
340
            elif text_modified:
336
341
                delta.modified.append((new_path, file_id))
337
 
            else:
 
342
            elif want_unchanged:
338
343
                delta.unchanged.append((new_path, file_id))
339
344
        else:
340
345
            delta.removed.append((old_inv.id2path(file_id), file_id))