gc-utils is a small set of scripts that let you import and update CVS repositories.
To makes the exchange easy, gc-utils stores the CVS working copy into a subdirectory and receives all information from there whenever necessary.
1. How to install gc-utils
Extract the *.tar.gz.
$ tar xzvf gc-utils.tar.gz
Switch into the directory and make install using a prefix (usually /usr)
$ make prefix=/usr
Then install as root
$ sudo make prefix=/usr install
You can now use the gc-import, gc-update and gc-commit commands as well as
the corresponding manpages.
2. How to use gc-utils
2.1 Import from a CVS
To import from a cvs tell gc-import where to fetch from and what to fetch
$ gc-import -d myproj.git -v -m -u :ext:email@example.com:/cvsroot myproject
Will create a git repository in myproj.git and import the myproject module
from the example.com/cvsroot cvs.
The -v options turns on verbosity, while -m tries to merge commits based
on commit messages. This is usually usefull.
The -u options converts cvs tags with underscores into git tags with dots.
e.g. FOO_1_0 will be FOO.1.0.
2.2 Keep you git up to date
You usually want to keep your git repository up to date with the changes
made in the cvs. To do so, go into you git repository and run gc-update.
$ cd myproj.git
This command will do all the necesary steps.
Please notice that this works only with projects previously imported using
2.3 Commit changes back to cvs
You imported the cvs repos into a git repository and you made some changes
on your personal git and want to contribute back into cvs.
Therefore you need the SHA1 identifiers of the commits you did in your
git. Just run git-log to see the sha1.
$ cd myproj.git
// edit foo.c and commit
// foo.c commited was commit feca43......
$ gc-commit -c feca43
The -c option will cause gc-commit to do the actual commit into cvs.
Without that ption gc-commit just patches the cvs and echos the
command you have to execute to commit.
3. How gc-utils deal with your repository
gc-utils creates a git repository and then imports the cvs into a
.cvs directory in the git repository. Therefore it knows always where the
.cvs working copy resides and can easily use the git-cvs* tools to do
the job of commiting and updating.
What's New in This Release:
· This release uses dashless git commands, as the other versions are not longer supported in newer git versions.