tags:

views:

2213

answers:

7

I have a SVN structure like this:

/Projects
    /Project1
    /Project2
/someFolder
    /Project3
    /Project4

Now, i would like to move all the projects into the /Projects folder, which means I want to move Projects 3 and 4 from /someFolder into the /projects folder.

The caveat: I'd like to keep the full history. I assume that every client would have to check out the stuff from the new location again, which is fine, but I still wonder what the best approach is to move directories without completely destroying the History?

Subversion 1.5 if that matters.

+1  A: 

Moving directories in Subversion doesn't destroy history, AFAIK.

Eli Bendersky
+1  A: 

You can use the svn copy command. It keeps your history. You just have to deselect the Option "Stop on copy/rename" while showing the Log (Example for Tortoise).

Take a closer look at the Subversion-Book svn copy

binco
A: 

As far as I know, only Bazaar allow to keep history on directories, espacially when talking about moving directories. SVN allows you to keep history when moving files, but not directories.

gizmo
SVN and Bazaar track directories. Mercurial, Git, and CVS do not.
Joshua
+9  A: 

svn move SRC DST

$ svn move -m "Move a file" http://svn.red-bean.com/repos/foo.c http://svn.red-bean.com/repos/bar.c

svn move will keep your history.

Philz
+8  A: 
svn help rename

Moving/renaming in subversion keeps history intact.

Apocalisp
+2  A: 

IN order to do that, you'll have to use svn's specific move/rename functions (check TortoiseSVN help if you use this for example). If you move the files by yourself and then commit the changes i'm not sure that history will be kept.

ljubomir
A: 

Drag-drop it using the repo-browser and rebind your local folder to your SVN server.