git-to-cvs.sh
is part of the workflow for syncing a CVS branch with a git branch (and it's the only part of this that is actually tested, the rest has just been written down quickly). You do check out your CVS tree (with -kk
), go into its root directory, and run git-init.sh
(untested as of yet). The local git repo has the branch cvs checked out, and that is the one we keep in sync with CVS (and the branch we checked out there).
Update from cvs is
cvs -q update -dP
git add --all .
git commit -m 'update from cvs'
(It does not try to recreate the individual commits of the CVS side into git; we're just interested in bringing over the current tree state in this direction.)
In the other direction you need to push into the local master
branch the commits you want to put into CVS. They must be rebased onto the current state of cvs
(so that cvs..master
is a fast-forward); then you just run git-to-cvs.sh
until it claims no more work to be done. (If the repo isn't clean afterwards, then the cvs update
has washed ashore some updates from CVS, and you first need to put them into git, and rebase master again.)
The rebasing of master should be done in a clone where you also presumably do your work; this git repo plus CVS sandbox better stays clean. (Note that when you clone from this transfer repo, unfortunately cvs will be the checked-out branch; you'd need to change to master.)
The script also has a protection ('not for cvs') against putting commits into CVS that are marked such.
It will break if git brings in new directories.