231
227
for old_path, new_path, file_id, kind, text_modified in delta.renamed:
232
228
print >>to_file, '*** renamed %s %r => %r' % (kind, old_path, new_path)
229
_maybe_diff_file_or_symlink(old_label, old_path, old_tree, file_id,
230
new_label, new_path, new_tree,
231
text_modified, kind, to_file)
233
for path, file_id, kind in delta.modified:
234
print >>to_file, '*** modified %s %r' % (kind, path)
235
_maybe_diff_file_or_symlink(old_label, path, old_tree, file_id,
236
new_label, path, new_tree,
239
def _maybe_diff_file_or_symlink(old_label, old_path, old_tree, file_id,
240
new_label, new_path, new_tree, text_modified,
234
244
diff_file(old_label + old_path,
235
245
old_tree.get_file(file_id).readlines(),
236
246
new_label + new_path,
237
247
new_tree.get_file(file_id).readlines(),
240
for path, file_id, kind in delta.modified:
241
print >>to_file, '*** modified %s %r' % (kind, path)
243
diff_file(old_label + path,
244
old_tree.get_file(file_id).readlines(),
246
new_tree.get_file(file_id).readlines(),
249
elif kind == 'symlink':
250
_diff_symlink(old_tree, new_tree, file_id, to_file)
252
def _diff_symlink(old_tree, new_tree, file_id, to_file):
253
t1 = old_tree.get_symlink_target(file_id)
254
t2 = new_tree.get_symlink_target(file_id)
255
print >>to_file, '*** *** target changed %r => %r' % (t1, t2)