Linux Kernel & Device Driver Programming

CVS Instructions

 

Step A: Initializing the CVS: (one time step)

  1. Log into one of the department servers such as quake.cs.fsu.edu or diablo.cs.fsu.edu or linprog.cs.fsu.edu

  2. Execute 'mkdir CVSROOT' in your home directory.

  3. Assuming that you are using bash shell, open the .bashrc file and add the following line somewhere in the file:

    export CVSROOT=/home/grads/<your_userid>/CVSROOT
    where <your_userid> is your userid in the computer science department servers. (If there already is another CVSROOT variable exported, the please comment it out by inserting the # symbol in front of it.)

  4. Execute 'source ~/.bashrc'

  5. Execute 'cvs init'

  6. Now your cvs environment is initialized on department servers.

*BIG FAT WARNING*: Never ever modify the files inside the cvsroot directory manually. These files have version tags that only the CVS software understands. If you change it yourself, the repository gets corrupted.

Step B: Creating a new repository: (one time step)

  1. Log into the machine where you have a copy of the source code that you want to check in. For example, if your source code is on device12.cs.fsu.edu then please log into device12.cs.fsu.edu.

  2. Assuming that you are using bash shell, open the .bashrc file and add the following two lines somewhere in the file.

         export CVSROOT=:ext:<your_userid>@linprog:/home/grads/<your_userid>/CVSROOT
         export CVS_RSH=ssh
    where <your_userid> is your userid in the computer science department servers. (If there already are other CVSROOT and CVS_RSH variables exported, then please comment them out by inserting the # symbol in front of them.)

  3. Execute

    source ~/.bashrc
  4. Assume that your source code located is in a directory named my_projects/. Execute

    cd my_projects/

    (replace my_projects with the name of your working directory).

  5. Execute

    cvs import my_projects "init" "v1"

    When prompted for password, please enter the CS department password.

    This command will create a cvs repository named my_projects in the CS department server and import all the files in the current directory to the server.

    You can replace my_projects with whatever other name you wish to choose.

  6. Now your source code is imported into the CVS repository

Step C: Checking out your source code (one time step)

Do this whenever you want to check out a local copy of the source code from scratch from the department servers.

  1. Log into the machine where you want to work with your source code (e.g. device12.cs.fsu.edu)

  2. Rename your original my_projects directory to something else. (don't delete it until you successfully check out another copy from the department servers).

  3. Execute

           cvs co my_projects

    Enter your password when prompted. This command will check out a local copy of your source code repository from the department server.

    You will notice that the checked out directory my_projects/ has a subdirectory named CVS/. So does every other subdirectory under my_projects. This is CVS specific information. *NEVER* change the contents of this directory manually yourself.

Step D: Working with CVS (repetitive step each time you work on source code)

  1. Whenever you want to work on your source code, make changes to the local copy you checked out using step C above. Local copy means the copy you checked out on your work machine (e.g. device12.cs.fsu.edu)

  2. When you are done making changes, cd to the 'my_projects' directory.

  3. Execute

           cvs update

    You will see a bunch of messages with different tags against different files you have modified as CVS tries to merge the files you changed. Watch the messages for any conflict warnings. Conflicts mean that the changes you made and the copy in the repository are no consistent. Open the local files that report a conflict. You will see CVS tags inside the files that indicates where CVS has found conflicts. Resolve these conflicts manually by deleting the parts that seem old or incorrect. (Hopefully you'll rarely have to resolve conflicts).

  4. Execute

           cvs commit -m ""

    where is an informative message you want to add to the version of the source you are committing in.

  5. Now your changes to your source code are committed into the department servers. Do this each time you change your source code -- normally at least one every day and each time you make significant changes that are known to be stable.
($Id)