Losing SVN history on files during refactoring

Viewed 6627

During some refactoring, I'm moving files around. Obviously SVN sees this as deleting the file and creating a new one since the IDE doesn't trigger an SVN rename/move operation. However I thought the SVN server would be smart enough to detect it, but this is not proving to be the case... not all the time anyway. I'm using Tortoise SVN and I am unchecking the "stop on copy/rename" button.

Is this expected? Is there a way round it? Should I move files using Tortoise SVN shell commands rather than letting the IDE do a regular file move?

Also, is it possible to manually force SVN to link two files as the same entity if it doesn't know? Like tell it "/com/john/test.tct is the same as /com/john/test/file.txt"?

4 Answers

If you rename your repo project and did bunch of renaming (classes etc), you might notice that "Show Log" will no longer show all the history that existed before the rename.

But, dont worry, it is not lost. It is just a flag. To show the history again, right click on your project > TortoiseSvn > Show Log, then uncheck the checkbox "Stop on copy/rename" in the dialog that opens and all the history will show up again:

enter image description here

Related