| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 874 |
|
Checking out a portion of the data repository is the first step toward contributing to the repository. Whether you plan to modify existing data, check-in new data, or remove data, you must first checkout that portion of the repository which you plan to change. As an example, lets assume that we want to check in test data for a new AIPS++ package, foobar. The data we are adding is a table, footest1. So we first checkout the demo portion of the data repository:
yourhost% cvs co data/demo
This creates a workspace where we can make changes.
Next since foobar tests will need multiple data sets, we want to create the directory to group these data sets:
yourhost% cd data/demo
yourhost% mkdir foobar
yourhost% cvs add foobar
As discussed in section §4.4, makefile rules for installing tables from the data repository source tree to the repository tree which is exported to end users depend on the actual table being below a directory of the same name. In our case, the tree looks like:
data workspace root directory
|
+- demo all test and demo data
|
+- foobar all of our foobar test data
|
+- footest1 makefile to install footest1
|
+- footest1 actual footest1 data
This duplication of the table (footest1) is done because unlike our simple example some tables are automatically updated with scripts run by the makefiles found in the first level directory, i.e. there is no lower level directory in the data repository source tree.
So we create a footest1 directory which will contain the actual table as well as a makefile to install our table in the export area.
yourhost% cd foobar
yourhost% mkdir footest1
yourhost% cvs add footest1
We also create a simple makefile which will install our table from the repository source tree to the export tree. It looks like:
DATA_THISDIR := $(shell pwd | sed -e 's=^/tmp_mnt/=/=')
DATA_ROOT := $(shell echo $(DATA_THISDIR)/ | sed -e '{s@/data/.*$$@/data@;}')
include $(DATA_ROOT)/config/makedefs/basic
include $(DATA_ROOT)/config/makedefs/install.table
This is also discussed in section §4.4. In the footest1 directory just created, we check in this makefile and our table (which we copy for our work area):
yourhost% cd footest1
yourhost% cp ../../glishtutorial/t1/makefile .
yourhost% cvs add makefile
yourhost% mkdir footest1
yourhost% cvs add footest1
yourhost% cd footest1
yourhost% cp ~/footest1/table.* .
yourhost% cvs add table.*
Here, the standard table makefile was copied from a table already in the
repository, and the table contents were copied from elsewhere, i.e.
~/footest1.
Using add schedules the files for addition to the repository, but none are actually added until we do a commit:
yourhost% cd ../../..
yourhost% cvs commit -m 'initial check-in of foobar' foobar
The cd gets us to the demo directory, the -m on the
commit line supplies the log message and the foobar at the end
of the line indicates that the foobar subdirectory and all of its
contents should be committed to the repository. After all of this completes
successfully, we are through with this workspace (created with the initial
cvs co). It can be deleted if it is no longer needed.