251
251
def _show_diff_trees(old_tree, new_tree, to_file,
252
252
specific_files, external_diff_options):
254
# TODO: Options to control putting on a prefix or suffix, perhaps as a format string
254
# TODO: Options to control putting on a prefix or suffix, perhaps
255
# as a format string?
258
259
DEVNULL = '/dev/null'
259
260
# Windows users, don't panic about this filename -- it is a
279
280
for path, file_id, kind in delta.removed:
281
print >>to_file, '=== removed %s %r' % (kind, path)
282
print >>to_file, '=== removed %s %r' % (kind, old_label + path)
282
283
old_tree.inventory[file_id].diff(diff_file, old_label + path, old_tree,
283
284
DEVNULL, None, None, to_file)
284
285
for path, file_id, kind in delta.added:
286
print >>to_file, '=== added %s %r' % (kind, path)
287
print >>to_file, '=== added %s %r' % (kind, new_label + path)
287
288
new_tree.inventory[file_id].diff(diff_file, new_label + path, new_tree,
288
289
DEVNULL, None, None, to_file,
293
294
prop_str = get_prop_change(meta_modified)
294
295
print >>to_file, '=== renamed %s %r => %r%s' % (
295
kind, old_path, new_path, prop_str)
296
kind, old_label + old_path, new_label + new_path, prop_str)
296
297
_maybe_diff_file_or_symlink(old_label, old_path, old_tree, file_id,
297
298
new_label, new_path, new_tree,
298
299
text_modified, kind, to_file, diff_file)
299
300
for path, file_id, kind, text_modified, meta_modified in delta.modified:
301
302
prop_str = get_prop_change(meta_modified)
302
print >>to_file, '=== modified %s %r%s' % (kind, path, prop_str)
303
print >>to_file, '=== modified %s %r%s' % (kind, old_label + path,
303
305
if text_modified:
304
306
_maybe_diff_file_or_symlink(old_label, path, old_tree, file_id,
305
307
new_label, path, new_tree,