multiple source code repositories
Asked Answered
D

5

6

I use Mercurial for version controlling my source code. But some people prefer other version control systems (like git, Bazaar, SVN, CVS).

I would like to know, is it possible to store a repository under multiple systems at once, so people can use whichever repository they want?

Disburse answered 22/2, 2012 at 9:22 Comment(1)
People who want to can easily pull from your repo, then do darcs init or git init or svn import in their local copy if they wish. You can hardly cater to everyone's preferences server-side, and keeping your master repos in sync sounds pesky and resource-intensive.Dudden
S
4

GitHub developed the hg-git extension for Mercurial. This extension allows you to clone from git repositories using Mercurial, and then push back in. So if you didn't mind having a central git repository, then it would certainly be possible to access it using both git and mercurial.

Though as another answer has pointed out most of the VCS tools you mentioned are fairly similar to use, so it's questionable whether it would be worth putting in the effort to allow people to use whatever they want, compared to the minimal effort involved in learning a new system.

Shabuoth answered 22/2, 2012 at 13:10 Comment(0)
C
4

is it possible to store a repository under multiple systems at once

I think the answer is no, as a repository has a specific format linked to the application.

The best thing to do it to authorized other developer to use the client application that fit their needs, if it is compatible with your work process.

Example : You have an existing SVN repo and another Git repo. As a developer, I would like to use only BZR. I can use the bzr-svn or bzr-git plugin to branch from SVN or Git, commit locally with BZR (and benefits from BZR features), and then push the result back to SVN or Git.

Creatine answered 22/2, 2012 at 13:31 Comment(0)
I
3

I don't know about Mercurial but with AccuRev it is possible to maintain your source code in AccuRev and Git. The plugin Kando takes care of replication from AccuRev to Git and vice-versa. For more details have look at http://www.accurev.com/kando

Interfere answered 22/2, 2012 at 9:46 Comment(0)
I
2

Not easily - you would have to keep each one in sync with the other, via a multitude of hook and event scripts. It is possible, for example, to checkout from subversion, do an hg init in that folder, and temporarily work using mercurial, and then eventually commit back to subversion when you're happy (ensuring you don't add and commit and .hg files). Also depending on the number of developers you could get into all sorts of problems with conflicts from merges if two developers commit to the same file under different version control systems.

Since Subversion (and CVS) are centralised version control systems, and git, bazaar, and mercurial are all distributed, keeping them in sync would require choosing a master copy for each one.

The VCS tools you mention are all fairly similar on the command line (though CVS really shouldn't be used any more), so the learning curve for other users isn't particularly steep.

Immortal answered 22/2, 2012 at 13:3 Comment(0)
M
1

It depends whether the conversion tools is easy to choose and use e.g. git: git-svn is officially supported, it is build-in in Windows version and easy to install in debian/ubuntu with deb packages

hg:
https://www.mercurial-scm.org/wiki/WorkingWithSubversion
https://www.mercurial-scm.org/wiki/RepositoryConversion#Subversion with many types of converters to choose from, and many of them requires some setup

bzr:
bzr-svn is built-in in Windows version and it is officially supported
details here: http://wiki.bazaar.canonical.com/ForeignBranches/Subversion

Mudpack answered 23/2, 2012 at 2:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.