When does it make sense to use subrepositories?

Kevin Bullock kbullock+mercurial at ringworld.org
Thu Apr 18 17:09:56 UTC 2013


On 18 Apr 2013, at 11:36 AM, v wrote:

> I've just backed out of several hours' work transitioning a set of related
> projects from one repository to a group of subrepositories. Having been
> through this a few times before, I always seem to end up with one of two
> scenarios:
> 
> - If changes to one project are usually associated with changes to other
> related projects, put them in the same repository.
> - Otherwise, use separate repositories, and handle the relationship with you
> favourite dependency management solution.

Yes. Whenever I start wanting to reach for subrepos, I consider it a code smell: it's an indication that things are insufficiently decoupled to be able to live in separate repositories.

Someday someone will write a language-neutral, easy-to-configure, non-XML-based dependency management tool that we can recommend when people ask for changes to subrepo functionality. (Note that such a tool would certainly be Mercurial-aware, but not _coupled_ to version control.)

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock




More information about the Mercurial mailing list