Towards CVS code-exchange and gateways
- From
Martin Langhoff <martin.langhoff@gmail.com>
- Date
- Oct 25, 2005, 20:57 UTC
- Message-ID
- <46a038f90510251357l23886747s8024a4326ad4e392@mail.gmail.com>
Now that I have a few cvs2git gateways (git-cvsimport running on cron) for the projects we work on, I am starting to need tools to "replay" chunks of git history against external CVS repositories. So I am thinking of writing two new scripts which expect to be executed inside a CVS working copy:
+ "git-cvsapplypatch < patchfile" takes a patch as formatted by git-format-patch, apply using patch (with options to be strict of fuzzy), prepares the commit message and (optionally) autocommit if patch returned clean.
+ "GIT_DIR=~/foo/bar/.git git-cvsreplaycommit parent:child" takes a pair of git revisions that must be parent/child, applies the diff on text files and changes on binary objects. Prepares the commit message and (optionally) autocommits if the merge was clean.
Which should lead later to a git-cvsapplymbox script to automate the process further. This part of the automation is actually a bit scary: with git, all your scripted merges take place in your private repo, and you review the result of the whole patchrun before pushing it out to a public repo. With cvs, if the merge turns out to apply cleanly but be a really bad idea... it'll be way too late. I hope to be able to find a smart way to run it in "test" mode.
Is there anyone working on a git -> cvs gateway or similar scripts?
cheers,
martin