Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a correct way to move directories with TortoiseSVN?

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.

like image 878
Holgerwa Avatar asked Aug 03 '09 06:08

Holgerwa


People also ask

How do I copy a folder from one directory to another in svn?

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.

Does svn move preserve history?

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.


1 Answers

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.

like image 142
Soviut Avatar answered Oct 20 '22 16:10

Soviut