I am attempting to move a file to another folder inside a TortoiseSVN repository, and the revision history is not being preserved. I have tried moving the files using the Repo-browser (right-click drag the files and select "Move items to here") as well in the working folder (right-click drag, select "SVN Move versioned files here," and commit the parent folder). In both cases the history is not preserved. I have read the TortoiseSVN manual as well as some other posts from people and am postitive those are the ways to do it. Am I missing something?
+1
A:
Subversion and TortoiseSVN absolutely do preserve the file history. (It is one of the fundamental aspects of SVN.)
Two key points (which you already seem to be aware of):
You have to use the SVN move/copy/rename commands. Otherwise, SVN won't be able to know they are the same file.
When looking at the log for moved/copied/renamed, you have to make sure the "Stop on copy/rename" option is unchecked. Otherwise, the log will only go back so far.
Now, keep in mind that you need to be looking at the log for something that actually was moved/copied. Look at the log of the file that was copied. Don't look at the log of the directory you copied it from, or the directory you copied it to.
msemack
2010-01-26 18:34:00
Thanks! I've got both points covered, but still no history. And Subversion uses a global revision number, so if I do a "Show log" on the root in the repo browser, I should see the move operation. For some reason this is not showing up.
John Michaels
2010-01-26 19:14:31
If you show the log at the root of the repo, you should see every change. What does it show for the revision where you did the move operation?
msemack
2010-01-27 01:21:25
Looking at the log window for a folder after a file was renamed: You should see the file "removed" from the old location and "added" to the new location. You'll see the "copy from path" and "revision" columns are populated, which shows the file's ancestry. If you do a show log on the individual file, it will show the history of the file going all the way back (as long as "stop on copy/rename" is unchecked).
msemack
2010-01-27 14:07:02