Need hints for Repository structure

Alan Boudreault aboudreault at mapgears.com
Mon Nov 2 10:50:29 CST 2009


Hi,

Recently, I moved the company repository from CVS to Mercurial. Doing the 
move... I tried to keep the same structure as it was before. I mainly only 
separated the repository in 2 master repos: company-admin and company-proj. 
The repository "company-proj" is relatively big and contains a lot of 
different projects from different clients. Here's the structure: 

company-proj/
company-proj/client1/
company-proj/client1/file1
company-proj/client1/proj1/
company-proj/client1/proj1/files_of_project
company-proj/client2/...
company-proj/client3/...
company-proj/client3/proj1/
company-proj/client3/proj2/
company-proj/client3/proj3/

The first thing I was sure at the beginning of the setup was:

- Cloning everything everytime everywhere is not a solution. The repository is 
too big.
- The repository is huge.... it would be nice to be able to clone only one 
client directory.
- A few projects are huge.... it would be nice to be able to clone only one 
proj directory

So, I guessed the solution was to use "subrepos". Basicly all "major 
directories are a subrepo. (client1, client2, */proj1 etc.) Unfortunately, I 
realized that it was not as efficient as I thought. The issues 1886 and 1887 
are a "problem" in these kind of structure. ( 
http://mercurial.selenic.com/bts/issue1886 and 
http://mercurial.selenic.com/bts/issue1887 ) Also, I this structure is not 
very good because the subrepos is not supported perfectly in other softwares: 
hgweb and trac per example.

I tried to keep my structure simple and intuitive for all my colleagues, who 
hadn't experience with mercurial before.

Does anyone could suggest me a better way to handle this kind of company 
repository. What structure do you use?

Thanks!
Alan

-- 
Alan Boudreault


More information about the Mercurial mailing list