tags:

views:

175

answers:

3

I have several related CVS projects, and I'd like to move them into subdirectories of a single new project.

Let's assume that everyone using the projects will delete their working copies before I make the change. Is it safe to just go into the repository directory and move the directories, as suggested in the manual? Do I need to do anything else?

It's very important that I preserve the files' history, so I don't want to just delete and re-commit them in the new location.

A: 

Yes, that will work.

chaos
+1  A: 

Doing modifications in the CVS repository is standard practice. However, instead of moving the directories, consider copying them (this is called a repocopy), and then deleting the files in their original locations through normal CVS commands. In this way even your change will be recorded as part of the history.

Needless to say, keep a full backup of your CVS files before you do any changes,

Diomidis Spinellis
A: 

Yes, as the other people have said, that will work, but keep a backup just in case. Also you might want to investigate Subversion (http://subversion.tigris.org/) as a replacement for CVS. I put off migrating from CVS to Subversion for a long time but now I'm kicking myself for not doing it much sooner. Tasks like this are trivial in Subversion, and since Subversion was designed from the beginning as a replacement for CVS, the migration is really not that painful.

m0j0
We'll probably leave CVS at some point, but there are some issues with Subversion, especially its handling of tags, that would require us to change our procedures. So it's not going to happen right away.
JW
So, how do you merge two unrelated projects under svn and keep their history?
Diomidis Spinellis