Feature Request: ability to compare files after renaming

17 views
Skip to first unread message

James Ward

unread,
Aug 18, 2021, 12:43:48 PM8/18/21
to TortoiseSVN
When a file is renamed, and also contains changes, it isn't easy to view the changes from "Check for modifications". It would be fantastic if you could diff the new and old file directly from within "Check for modifications".

Of course this issue arises because SVN treats the rename as a delete and add operation, so the deleted file no longer exists to compare with. The typical scenario is that you are reviewing someone else's code changes, and they have renamed a file, perhaps even moved it to a different folder, and have also made code changes within that file.

My current workaround is to revert the deleted file(s), then go into the folder in question, select the original file and the new file, then diff them there. It would be a really nice workflow if you could do this directly in "Check for modifications". e.g. if you could double-click on a renamed file just as you would with a modified file, and it was intelligent enough to figure out that it was renamed and show you the diff.

Stefan

unread,
Aug 18, 2021, 1:19:35 PM8/18/21
to TortoiseSVN
On Wednesday, August 18, 2021 at 6:43:48 PM UTC+2 James Ward wrote:
When a file is renamed, and also contains changes, it isn't easy to view the changes from "Check for modifications". It would be fantastic if you could diff the new and old file directly from within "Check for modifications".

if the file is renamed with the proper svn command, i.e. the 'old' name show up as "deleted" and the new one as "added(+)" then a simple double click will diff the added with the deleted one.
However if you just rename the file, one file will show up as "missing" and then svn doesn't know that the missing file is the old of the added one, and then you can't diff.
But if you select both the missing and added one, right-click then you get a "repair rename/move" entry in the context menu.

Rafal S

unread,
Sep 14, 2021, 10:35:36 AM9/14/21
to TortoiseSVN
ps. the proper svn command is "svn move" ;)
Reply all
Reply to author
Forward
0 new messages