views:

5386

answers:

5

How to move a sub directory from one directory to another, given that both are inside the same SVN repository? I am using tortoise SVN.

+25  A: 

Select the folder/files that you want to move, then RIGHT-CLICK them and drag them to where you want to move them. A menu will come up with an option "SVN Move versioned files here"

As clarified by phenry, the destination folder must be recognized as an SVN folder. The folder should already be committed to the repository or you can choose Add to set it to be added.

If the destination folder isn't part of an SVN repository, use the SVN Export command after your right-click and drag to copy the files to any destination folder.

Chris Thompson
That was exactly what I needed, thanks!
Ngu Soon Hui
Wow. Didn't know that. TortoiseSVN was beginning to tick me off with that.
Daddy Warbox
That really helped me as well - thanks!
Guy
Excellent. What does move and rename do?
Tim
I believe that move and rename bring up a dialog prompting you for the new name or location. You must use "Rename" to keep the version history of a file. Move is the same as dragging and dropping and select the "Move versioned files here"
Chris Thompson
you really helped me, thank you!
Alex
holy crap..i never knew i could do that. Thanks a whole bunch!
ShaChris23
good tip! thanks!
tony_le_montana
+4  A: 

Or in the Repository Browser, you can just drag the file/folder and drop into the desired folder.

Atempcode
+1  A: 

If a user has moved files using the repository browser...is there a way to see this changes? It will not show up in the "svn log", right?

The problem is. Somebody moved a folder by mistake, but as always in Windows with it's drag-n-drop, they just get lost - i mean - I don't know where it fell and I don't know which folder actually moved...

This is probably best asked as a new question.
Chris Thompson
+1  A: 

You can find more thorough answer here

ShaChris23
+9  A: 

Note that Chris Thompson's accepted answer only works if both directories are already recognized by TortoiseSVN. If you create a new folder in Explorer and try to move a file to it from an existing folder, you won't get the TortoiseSVN contextual menu items. After you create the new folder, you have to do either a Commit action (which creates a new version number) or an Add action (which doesn't), so TortoiseSVN knows about the new folder, and then you'll get the option to move the items in SVN. More here.

phenry
Most people miss this part
Quintin Par
I'm one of those who missed this part. Thanks alot!
Clean