简体   繁体   中英

how to mirror CVS repository into Git in real time

I'd like to set up a read-only Git repository mirroring our CVS repo (to allow easy history browsing with Gitweb). The mirror should ideally be updated in realtime. I've tried git-cvsimport but it takes about two minutes for an update run and probably puts high load on the CVS server.

What would you use for this job?

Have you considered just switching to Git. I switched my team to Git from SVN over 6 months ago, and we haven't really missed SVN. Git is more flexible and powerful. It seems to have a bigger and more active community, and growing interest instead of declining interest Click here.

Anyhow the learning curve took us a few weeks, but now our development process and launch process are much quicker and happier.

We launch an internal web app ~10 times a day with a cherry-pick workflow that allows me to pick exactly which changes to launch. It also allows all the devs, myself included, to commit anything that is ready for review or launch at any time with little chance of merge conflicts. Most of which are whitespace changes.

Just something to chew on.

Like you say, a polling mechanism is too taxing for a CVS server.

The other solution would be to initiate that mechanism from the CVS server itself, through one of the CVS "commit support files" triggers .

From a commitinfo script , you could (if the CVS commit is validated by said script):

  • synchronize a CVS workspace (with a git repo inside) with the new content
  • run a program on that CVS workspace asking the git repo to add -A and commit .

That Git repo within a CVS workspace could be your read-only repo, or it could be an intermediate repo which would then, on each new Git commit, push all modification to said read-only Git repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM