4 ms·
Ask HN: Do you recomment mercurial hg with subrepos, what's best practice?
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
so, I could either manage those sub-repos manually, or use use subrepo extension.
anyone with good or bad experience using subrepo extension, does it save time over doing the managing myself of subrepos
- stephenr 9y agoI 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 9y agohow easy is to pull/push and clone master-repo and its subrepo, is there any gotcha?
- stephenr 9y agoIt’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 9y agothat sounds great, thanks a lot