~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Robert Collins
  • Date: 2005-10-03 01:42:16 UTC
  • Revision ID: robertc@robertcollins.net-20051003014215-ee2990904cc4c7ad
integrate in Gustavos x-bit patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
                      new_label + path,
224
224
                      new_tree.get_file(file_id).readlines(),
225
225
                      to_file)
226
 
    for old_path, new_path, file_id, kind, text_modified in delta.renamed:
227
 
        print >>to_file, '=== renamed %s %r => %r' % (kind, old_path, new_path)
 
226
    for (old_path, new_path, file_id, kind,
 
227
         text_modified, meta_modified) in delta.renamed:
 
228
        prop_str = get_prop_change(meta_modified)
 
229
        print >>to_file, '=== renamed %s %r => %r%s' % (
 
230
                          kind, old_path, new_path, prop_str)
228
231
        _maybe_diff_file_or_symlink(old_label, old_path, old_tree, file_id,
229
232
                                    new_label, new_path, new_tree,
230
233
                                    text_modified, kind, to_file, diff_file)
231
 
    for path, file_id, kind in delta.modified:
232
 
        print >>to_file, '=== modified %s %r' % (kind, path)
233
 
        _maybe_diff_file_or_symlink(old_label, path, old_tree, file_id,
234
 
                                    new_label, path, new_tree,
235
 
                                    True, kind, to_file, diff_file)
 
234
    for path, file_id, kind, text_modified, meta_modified in delta.modified:
 
235
        prop_str = get_prop_change(meta_modified)
 
236
        print >>to_file, '=== modified %s %r%s' % (kind, path, prop_str)
 
237
        if text_modified:
 
238
            _maybe_diff_file_or_symlink(old_label, path, old_tree, file_id,
 
239
                                        new_label, path, new_tree,
 
240
                                        True, kind, to_file, diff_file)
236
241
    
237
242
 
 
243
def get_prop_change(meta_modified):
 
244
    if meta_modified:
 
245
        return " (properties changed)"
 
246
    else:
 
247
        return  ""
 
248
 
 
249
 
238
250
def _maybe_diff_file_or_symlink(old_label, old_path, old_tree, file_id,
239
251
                                new_label, new_path, new_tree, text_modified,
240
252
                                kind, to_file, diff_file):