
Ask HN: Do you recomment mercurial hg with subrepos, what's best practice? - bedros
I have a project with many sub tasks, each has large size test data, so cloning or branching entire repo is a big waste of disk space, so I decided to convert hg repo into smaller repos for each task (using hg convert extension), so I can branch it, experiment with code, then merge back without affecting the entire repo<p>so, I could either manage those sub-repos manually, or use use subrepo extension.<p>anyone with good or bad experience using subrepo extension, does it save time over doing the managing myself of subrepos
======
stephenr
I use mercurial subrepos. I think the official advice of “have a thin super
project with all real code in subrepos” (as opposed to eg a project repo with
code and a subrepo in it for some library) is quite key.

~~~
bedros
how easy is to pull/push and clone master-repo and its subrepo, is there any
gotcha?

~~~
stephenr
It’s mostly all automatic in my experience. As with most things mercurial
(compared to git), it just does what you _expect_

Subrepos are checked out automatically.

Pushing the super project ensures sub projects it references are pushed first.

It will prevent you from committing the super project state when a subrepo has
uncommitted changes (and tell you which subrepo)

~~~
bedros
that sounds great, thanks a lot

