so, i have a project in some path /main/oldProject/ with trunk, and branches folders within. I need to move the trunk and branches folder to a new one called /main/newProject/. I already imported an empty /main/newProject/ folder with TortoiseSVN but i don't know how to move all the contents from the existing folders.
i thought that svn export would do the trick but then i noticed that this will not move uncommitted changes. This is workable for me, but i was hoping there was a way to just copy the folders in the new one and run some operation that will let me work on the new path
any ideas?
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. But, the log dialog won't show the history unless you uncheck the box "Stop on copy/rename".
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 are using TortoiseSVN (and I'm sure there's a command line tool for this as well, but I'm using Tortoise), you can simply right-click on your existing working copy folder and select TortoiseSVN –> Relocate. In the dialog that comes up, enter the new location of the repository, and click OK.
The answer is surprisingly simple - export the folder to itself! TortoiseSVN detects this special case and asks if you want to make the working copy unversioned. If you answer yes the control directories will be removed and you will have a plain, unversioned directory tree.
I take it that this move is within a single repository? If so, checkout the repository to a local working copy somewhere and simply drag the trunk & branches folders in Windows Explorer using the right mouse button instead of the left. When you release, a dialog box will appear and give you the option of an SVN Move or an SVN Copy. Choose whichever is appropriate in your case and commit.
This will perform a proper SVN copy/move with full history.
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