Who is using subrepos?

Isaac Jurado diptongo at gmail.com
Wed Oct 19 07:30:29 CDT 2011


On Tue, Oct 18, 2011 at 1:54 PM, Angel Ezquerra
<angel.ezquerra at gmail.com> wrote:
>
> I am not in _your_ list, but I do use subrepos daily. Pretty much
> every project that uses mercurial in my company uses subrepos.
>
> If you want I could give you a more detailed account of how we use
> them, which problems we have faced and the things that we miss the
> most

I'm in the same situation: using subrepo daily at work.  We are very few
developers here (less than ten) and I'm the Mercurial "expert" so I take
care of all related issues.

We use subrepositories for code sharing between projects so we can merge
common parts easily.  Specially since shared code is often modified
independently on each project and it is very handy to be able to do
cross-project merges.

Each project repository uses standard branching (stable/default as in
Mercurial itself) and has its own clone-based branch of the common code.
We allow these subrepos to have multiple heads (without bookmarks)
because rebase on them is strictly forbbiden.

Therefore, our central repository server has something like the
following:

    /var/hg
            shared_code
            project_a
            shared_code-project_a
            project_b
            shared_code-project_b

The .hgsub config of project_a points to shared-code-project_a and so
on.  The "main" shared_code repository is used for merging the different
branches.

Perhaps this is not the most polished workflow and often my colleagues
are confused with it.  But I end up dealing with all details so by now
we are fine.

I hope it helped.  Cheers.

-- 
Isaac Jurado

"The noblest pleasure is the joy of understanding"
Leonardo da Vinci


More information about the Mercurial-devel mailing list