Comment 3 for bug 71307

patience_diff.unified_diff() is a direct copy of difflib, just allows a custom SequenceMatcher.

It can take the parameters: fromfile, tofile, fromfiledate, tofiledate.

However diff.internal_diff() is where we call it, and it only takes the parameters old_filename, and new_filename.

So in diff._show_diff_trees() it has already reformatted the filename to be:
old_name = '%s%s\t%s' % (old_label, path,
                         _patch_header_date(old_tree, file_id, path))
new_name = '%s%s\t%s' % (new_label, path, EPOCH_DATE)

The reason we did that, is because we didn't want to change all the layers. Because _show_diff_trees() calls inventory[file_id].diff() passing it the names, which eventually calls back into internal_diff(). So we need to upgrade quite a few apis if we want to pass the filenames + datestamps around.

Further, unified_diff uses a space character to separate the filename from the datestamp, and we seem to want to use a tab character. But since we already have a custom copy of unified_diff, we could easily fix that.

(I hope I understood your question)