All of the interesting technological, artistic or just plain fun subjects I'd investigate if I had an infinite number of lifetimes. In other words, a dumping ground...

Friday, 23 May 2008

Git to CVS and back again

Importing in to Git is easy. Pushing back into CVS is hard mostly because you have to find the SHA1 commit message and use that to apply the patch.
There are scripts that do it automatically - not sure how good these are.
http://www.kernel.org/pub/software/scm/git-core/docs/v1.0.13/cvs-migration.html
http://chneukirchen.org/blog/archive/2006/04/tracking-the-ruby-cvs-with-git.html
git-cvsimport
http://www.kernel.org/pub/software/scm/git/docs/git-cvsexportcommit.html
Merge one patch into CVS
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cvsexportcommit -v <commit-sha1>
$ cvs commit -F .msg <files>
Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo
        $ git-cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
Merge pending patches into CVS automatically — only if you really know what you are doing
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v
https://wiki.bnl.gov/dayabay/index.php?title=Synchronizing_Repositories
http://tsunanet.blogspot.com/2007/07/git-cvs-in-5min.html
http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html
http://www.kernel.org/pub/software/scm/git/docs/git.html

No comments:

tim's shared items

Add to Google Reader or Homepage