martinatime
martinatime

Reputation: 2487

What is the best way to replicate a version control repository?

Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this? If it is not really feasible in CVS then which source code control system would you recommend to accomplish this? Thanks

Upvotes: 3

Views: 1098

Answers (4)

Vincent Robert
Vincent Robert

Reputation: 36120

When using CVS, I don't know any tools to do that other than files syncing. You can achieve that using tools like rsync (Unix) or xcopy/robocopy (Windows).

If you plan on migrating to Subversion, it provides a tool called svnsync that allows to sync a repository from another one.

Upvotes: 4

prakash
prakash

Reputation: 59669

The Best (and perhaps costliest) way is Clearcase Multisite

But if you are looking for opensource, Git is becoming quickly replacing svn everywhere..

Upvotes: 0

Cheekysoft
Cheekysoft

Reputation: 35580

If you do take the rsync/filecopy approach with CVS, it is important to only sync the files at a time when there is not an active commit. Otherwise, the repository's lock file will get copied over and you will be unable to checkout/update on the target side until the next sync.

This reason alone may make CVS a bad choice. The migration path from CVS to Subversion is pretty smooth and there are tools to import a full CVS repo, with history, into Subversion.

Consider Git or Mercurial if you want to get into true distributed versioning, but it sounds like that would be overkill for your "read only" needs.

Upvotes: 2

Greg Hewgill
Greg Hewgill

Reputation: 992747

I would recommend you migrate from CVS to a proper distributed version control system such as git, which will provide this sort of functionality very naturally.

Subversion also provides svnsync which does the same sort of thing.

Upvotes: 2

Related Questions