210
210
for path, file_id, kind in delta.removed:
211
211
print >>to_file, '=== removed %s %r' % (kind, path)
213
diff_file(old_label + path,
214
old_tree.get_file(file_id).readlines(),
212
old_tree.inventory[file_id].diff(diff_file, old_label + path, old_tree,
213
DEVNULL, None, None, to_file)
218
214
for path, file_id, kind in delta.added:
219
215
print >>to_file, '=== added %s %r' % (kind, path)
224
new_tree.get_file(file_id).readlines(),
216
new_tree.inventory[file_id].diff(diff_file, new_label + path, new_tree,
217
DEVNULL, None, None, to_file,
226
219
for (old_path, new_path, file_id, kind,
227
220
text_modified, meta_modified) in delta.renamed:
228
221
prop_str = get_prop_change(meta_modified)
251
244
new_label, new_path, new_tree, text_modified,
252
245
kind, to_file, diff_file):
253
246
if text_modified:
255
diff_file(old_label + old_path,
256
old_tree.get_file(file_id).readlines(),
257
new_label + new_path,
258
new_tree.get_file(file_id).readlines(),
260
elif kind == 'symlink':
261
_diff_symlink(old_tree, new_tree, file_id, to_file)
263
def _diff_symlink(old_tree, new_tree, file_id, to_file):
264
t1 = old_tree.get_symlink_target(file_id)
265
t2 = new_tree.get_symlink_target(file_id)
266
print >>to_file, '=== target changed %r => %r' % (t1, t2)
247
new_entry = new_tree.inventory[file_id]
248
old_tree.inventory[file_id].diff(diff_file,
249
old_label + old_path, old_tree,
250
new_label + new_path, new_entry,