Tuesday November 23, 2004
Adding a file system hierarchy into a CVS module
I had a whole bunch of code that needed to added to a CVS repository. Normally with just a new directory or two and a few files, doing "cvs add" for each one is no big deal. But when there's a whole file system hierarchy that can be a real PITA. This is where "cvs import" comes in handy.
I usually only use "cvs import" to create a new CVS module but it can also be used to do a "bulk add." Maybe it's common knowledge for CVS jockies but it's easy to forget about unless oft-used. Here's the scenario:
- module webservice already exists with subdirectories perl, python and php
- a new subdirectory java is in your sandbox and needs to be added and it has a complex hierarchy of source packages, jar files and test data
- to add webservice/java do this
vendorname and tag aren't really consequentially, if doing for your company, that sounds like a good choice for the vendorname... the tag should be indicative of the CVS module change i.e. java_implementation_start
- cd webservice/java
- cvs import -m "adding java implementation" webservice/java vendorname tag
There, that's a lot easier than individually adding directories and files.
( Nov 23 2004, 11:09:35 AM PST )