Friday, October 14, 2011

Adding subdirectories to the CVS repository


Assume a scenario where you create a new directory for testing your source code and you want to check in this new directory to the CVS. However, this directory has several subdirectories and the subdirectories also have some subdirectories as well. (e.g. consider a scenario where the test results and input files for a certain action are stored independently for a given subdirectory).

To check in the main directory and subdirectories, you can perform the following steps:
  • First add the main directory to the CVS by typing
cvs add main_directory


This will schedule the addition of this directory to the CVS repository. However, a cvs commit is still necessary.
  •  Then cvs add the subdirectories via
find main_directory -type d -print | xargs cvs add

which basically finds the all subdirectories and schedules their cvs add to the repository
  • Once this is done, cvs commit should be performed for each of the file within the main and subdirectories. Without cvs commit you will not get them updated.

For a detailed description, check this link:


No comments:

Post a Comment