I have a number of quasi-related projects that I want to version control. In SVN I would set them up as multiple directories within a single project
/scripts #updates in sync with project1 & project2
/project1 #requires database
/project2 #requires database
/database
Naturally other SVN layouts are possible for this toy example, but this layout has advantages:
- I can copy files between branches while preserving history
- I can check out only a subset of projects, eg
svn co repo/project2; svn co repo/database
. This saves a considerable amount of storage & time if project1 is large. - Easy repository management, since user access is defined once for all projects
This paradigm doesn't map well to mercurial since you can't clone a single directory of a mercurial repo. So my question is: what is the most common way to store large, closely related projects in mercurial?
My ideas:
- Multiple repositories - loses history of files which move between projects
- Forests - seems stalled, and I'm not sure how stable this extension is
- Named branches with mostly unrelated content
- SubRepos - Unfortunately I'm running Ubuntu 9.04, which only ships hg 1.1.2. Otherwise this would look like a good option