If I move a directory to another place inside the same repository by dragging it to the new place in Tortoise, I cannot checkout revisions prior to the move, because the URL to these old revisions is not valid anymore.
How do you move a directory and still be able to access revisions before the move?
Example: If I move
trunk/folder1/source
to
trunk/folder2/source
then I can see the "source" folder now under folder2, and I can checkout the head revision, meaning the revision that produced the move.
However, if I try to checkout an older revision that was committed before the move, I get an error that the url doesn't exist. I guess it's because the url of the older revision still points to the old path.
But there must be a way to fix this, otherwise a move would not make sense if you loose access to older revisions.
The easiest way to copy files and folders from within a working copy is to use the right drag menu. When you right drag a file or folder from one working copy to another, or even within the same folder, a context menu appears when you release the mouse.
If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.
You can move directories several ways.
The easiest way is to right mouse drag the directory and click "SVN Move versioned files here" when you drop.
You can use the rename function to rename a file from "blah.js" to "mydirectory/blah.js".
Lastly, you can use the commit window and drag items within there before you commit. A small red dot appears beside the checkbox when a file is set to be moved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With