Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move SVN project within repository without checkout

Suppose you have this SVN repository structure

Root
    Foo
        Project1
        Project2
    Bar
        Project3

And you want to move Project1 to the top level:

Root
    Foo
        Project2
    Bar
        Project3
    Project1

The developers already have Project1 at the top level of their local folder trees, so there's no point in moving them, and you'd like to accomplish this without requiring the developers to do checkouts etc. (which would force them to deal with lots of unversioned files).

Is this possible?

We're using Tortoise SVN, but we don't have a problem using svn.exe if that's necesary.

TIA

like image 773
chrisd Avatar asked Oct 25 '11 13:10

chrisd


3 Answers

Best thing would be to do an SVN move, to move the Project1 under root, and do an SVN switch on the already checked out ones.

Moving the Project1

svn move -m "message" http://<svn-url>/Foo/Project1 http://<svn-url>/Project1

Switching already checked-out repositories on local machines

svn switch http://<svn-url>/Project1

You can use TortoiseSVN to do the same.

like image 180
Venushka Perera Avatar answered Nov 03 '22 02:11

Venushka Perera


Yes. Move the project using the repository explorer, and ask the developers to switch to the new location (right-click, TortoiseSVN, Switch). It would be easier for them if they don't have any uncommitted files. Ask them to commit before moving the project.

like image 32
JB Nizet Avatar answered Nov 03 '22 03:11

JB Nizet


You can use the svn mv command. Just specify the source and the destination as URLs.
Use svn switch to update a working copy to a different URL.

like image 26
Eugene Yarmash Avatar answered Nov 03 '22 02:11

Eugene Yarmash