3.4. Streamline your catalog for CVS
From your working directory (/tmp/import_foundation), decide which files will be in the CVS repository, and which will not. While it is entirely possible to import the entire catalog into the repository unchanged, I usually prefer to doctor my directories up before letting them into my repository because of several reasons:
- Will the file be modified by another source?
For example, /etc/order.number is modified by Interchange when run. It is recommended that the CVSIGNORE features be used to handle these types of files. See CVSIGNORE.
- The likelihood that you will modify the file.
For example, if I am certain that I wont every want to modify the session/ files directly, then I probably wouldn't need to manage that through CVS, but I do import the empty session/ directory to make it easier when setting up new catalogs.
Managing less files in the repository takes away from the amount of time required for CVS checkout, update, branching, and other CVS actions. For most, this amount of time is small already, but it is a consideration for some. If you have a very large image directory, it may be benificial to leave it out at first. Note that you can add or remove anything later on.
Here is an example of some things to remove from your catalog. If you do move more directories, be sure to move them to a directory that you can later use to re-unite with a checked-out copy for a working catalog. But here I chose just to move files that are not needed for a template "skeleton" catalog.
If you want to add images to your repository, the images directory is typically symlinked to /var/www/html/foundation/images, so I remove this symlink from the working copy, and replace it with an exact copy which will go into the CVS repository.
#Setup images directory rm images cp -a /var/www/html/foundation/images . #Remove rm -Rf \ error.log \ *.structure \ orders/* \ logs/* \ session/* \ tmp/* \ upload/* \ backup/* \ logs/* \ #done. # The ".empty" files make it so that CVS will still checkout the # directory, even though it is empty. touch \ orders/.empty \ logs/.empty \ session/.empty \ tmp/.empty \ upload/.empty \ backup/.empty \ #done.