Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial setup: One central repo or several?

Tags:

mercurial

My company is switching from Subversion to Mercurial. We're using .NET for our product. We have a solution with about a dozen projects that are separate modules with no dependencies on each other. We're using a central repo on a server with push/pull for our integration build.

I'm trying to figure out if I should create one central repo with all the projects in it, or if I should create a separate repo for each project. One argument for separate repos is that branching the individual modules would be easier, but an argument for a single repo is easier management and workflow.

I'm very new to hg and DVCS, so some guidance is greatly appreciated.

ETA: At hginit.com, Joel says:

[I]f you’re used to having one big gigantic repository for the whole company, where some people only check out and work on subdirectories that they care about, this isn’t a very good way to work with Mercurial—you’re better off having lots of smaller repositories for each project.

It'd be great if someone could expand on this or point me to more documentation.

like image 234
Robert S. Avatar asked Apr 02 '10 15:04

Robert S.


2 Answers

One thing you should take into consideration here is the fact that Mercurial does not support checking out directories like subversion does. One typical subversion setup is to have one giant repo with multiple separate projects in it, and when somebody needs code they will just checkout a subdirectory containing that project. You can't do this in mercurial. You either take the whole repo, or nothing. If everybody working on these projects does not need all the code, all the time, you might want to split it up into separate repositories.

EDIT: This link might be helpful in setting things up, in particular the "Publishing Multiple Repositories" section.

like image 104
TwentyMiles Avatar answered Oct 14 '22 06:10

TwentyMiles


if completely separate repos don't work for you maybe have each project as a subrepo of some umbrella repo. I have to say that seperate repos sounds like what you need though given that each project sounds totally independent.

like image 25
jk. Avatar answered Oct 14 '22 06:10

jk.