Swe05
Introduction
This series of exercises introduces you to the
cvs versioning
tool. It uses the same sample project as provided with the exercises
to
learn make. These exercises are meant to become acquainted with
cvs. As such the instructions closely follow the accompanying
presentation, which also contains the
cvs commands to be used.
The presentation about
cvs does not contain all necessary
information, for example about access rights related to usage by
different users. All required information can be found in the
`Cederquist' manual. At times some searching and browsing through
this manual may be required, especially with exercises starting at
exercise 8.
If circumstances allow, these exercises should be done in pairs, where
the repository created in exercise 1 is shared. The advantages (and
problems) of using
cvs for cooperation will be more apparent.
Exercises
- Create a local CVS repository which will be used for this series
of exercises. Import the example code to create a new project. Take
care to only include the files which are necessary to rebuild (with
make) the project from scratch. For example, it is neither
necessary nor desirable that object files (with extension .o)
are stored in the repository.
- Check the project out (
cvs checkout ...) in an other (new)
location in your local filesystem.
- Make modifications to a (or some) file(s). If you are working in
pairs, make sure to make modifications to different as well as same
files. Within a file, make sure to modify different as well as same
lines. If you are working alone, checkout the project in two
different locations in your local filesystem and simulate the working
in pairs by making the modifications in the two different checked out
versions.
- Commit the modifications (
cvs commit ...). If a conflict
occurs which cannot be solved by cvs (which should happen if
the previous exercise has been done), repair the file(s) containing
the conflicts and commit again.
- Add the keywords
Id and Header to one of the source files. When added
to a file which is used as input for some tool (like a compiler), make
sure the keywords are added as part of a comment. Commit the
changes.
- Tag the project (
cvs tag ...).
- Export the project in a new directory (
cvs export ...).
Use the tag added in the previous exercise. Rebuild the project to
make sure all sources are included.
- Checkout with keyword expansion
(so the latest tag is visible).
- Checkout without keyword expansion (so the keyword remains the
same and no unnecessary merges will be required).
- Create a branch. Make modifications to the branch, and join the
modifications of the branch to the original branch.
- Try to join a branch a second time. This is dangerous because
modifications will be joined twice. The manual contains instructions
how to avoid this, find those instructions, and redo the previous
exercises if necessary to allow for joining twice.