As often as I use CVS, I can never remember how to start a new project from an existing code base. Invariably, I look in the man pages and on the web, and read through several pages to get what I want. Here is the way to do it.
The goal here is to take some existing code, put it under source control, and then set it up so you can begin checking it back in. We import, delete, then check out to do this:
The example uses a project called “rs232”
Make sure $CVSROOT is set:
(if not, set it, then “cvs init”)
Get into the directory with the code:
1 2 3 4
Import the code into CVS:
You’ll be prompted to make a comment, I usually use “Initial import” You’ll then see the files being created (the ‘N’ at the left column)
1 2 3 4 5
So, now the CVS repository is created:
1 2 3 4 5
Since I’d like to continue editing the code where it is, delete the working directory and check it out (or, we could have moved the original files to a tempdir)
1 2 3 4 5 6 7 8 9 10
Make your changes, then use cvs ci to check in.