Moving history directories

I have an SVN structure like this:

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

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

Caution: I would like to keep the full story. I suppose that each client will have to check the material from a new place again, which is good, but I'm still surprised that the easiest way is to move directories without completely destroying the story?

Subversion 1.5, if that matters.

+59
svn
Sep 20 '08 at 16:02
source share
9 answers
 svn help rename 

Moving / renaming in subversion keeps the history intact.

+52
Sep 20 '08 at 16:06
source share
  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 save your story.

+38
Sep 20 '08 at 16:06
source share

Tortoise SVN supports the right-click movement. When you drag the source file / directory to the destination using the "right-click" button, a context menu will appear. You can select the appropriate menu item for copy / move / move-rename, etc. This option will also save history.

Note. Tortoise SVN has a nice phrase called “Restore motion” - with this function you can rename a file / directory when moving it. (For more details see the Documentation )

+7
Jul 04 '16 at 7:00
source share

You can use the svn copy command. He keeps your story. You just need to deselect "Stop copying / renaming", showing the log (example for a turtle).

Take a look at Subversion-Book svn copy

+4
Sep 20 '08 at 16:04
source share

If you move Project 3 to the project folder using the svn move command, the history will be saved for the Project 3 folder, but it’s interesting that the Projects folder does not display the history of the project 3 that was created before Project 3 was transferred to the projects,

I find this confusing, I thought the folder would display the whole story below itself in the hierarchy, but it seems like it is not (just checking it myself)

+4
Mar 20 '12 at 7:30
source share

Drag it using the repo browser and reinstall your local folder on your SVN server.

+3
Jul 29 '09 at 15:10
source share

Moving directories in Subversion doesn't ruin the story, AFAIK.

+2
Sep 20 '08 at 16:04
source share

To do this, you will need to use the special svn move / rename functions (if you use this, for example, see the TortoiseSVN help). If you move the files yourself and then commit the changes, I’m not sure that the history will be saved.

+2
Sep 20 '08 at 16:19
source share

As far as I know, only Bazaar allows you to store history in directories, especially when it comes to moving directories. SVN allows you to save history when moving files, but not directories.

-3
Sep 20 '08 at 16:05
source share



All Articles