Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming SVN repository project name

Tags:

svn

naming

I have migrated a project from CVS to SVN. Now I need to rename that project. What can be the best possible way to rename it, keeping the all the history intact. The project folder contains some 100 numbers of C and its header files.

like image 613
thetna Avatar asked Oct 28 '10 23:10

thetna


People also ask

How do I unlink a project in svn?

Just remove the . svn folder inside the required folder then the control will be automatically removed.

How do I move files in svn without losing history?

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.

Can I rename a branch in svn?

Because branches and tags are ordinary directories, the svn move command can move or rename them however you wish.

How do I delete a local svn repository?

Right click the any folder and choose TortoiseSVN -> Repo Browser. Then point to your local repository in the URL field. Once open you could be able to browse the repo, and with a right click, delete the folder.


2 Answers

In order to rename a repository you only have to rename its root directory and generate a new UUID. Assuming the repository is in /var/svnroot/my_repo you have to run this commands (as root) to rename a repository:

$ mv /var/svnroot/my_repo /var/svnroot/my_new_repo $ svnadmin setuuid /var/svnroot/my_new_repo 

After that, you can access it through your favorite protocol.

like image 77
Diego Lago Avatar answered Sep 21 '22 14:09

Diego Lago


The original answer (which got accepted) was relevant at the time the question was asked, for the original questions (which has since been edited as well).

Things have changed and as others have pointed out in this thread, there are now better ways to rename repositories and/or projects inside a repository.

I'm going to convert this answer to a community wiki and let others maintain it forward to ensure it stays relevant.

like image 20
6 revs, 4 users 86% Avatar answered Sep 23 '22 14:09

6 revs, 4 users 86%