![]() Note that subpaths can be used to redefine source paths locally. URLs can also be used for external resources, but note that it in that case might be a better idea to use a local distributed mirror and use a trivial relative path instead. URLs and absolute paths can be useful if the subrepository is hosted centrally without utilizing any DVCS workflows and thus never should be re-cloned. A consequence of using such non-trivial relative paths is that clones can't be cloned. Other relative paths can be used if the subrepositories can't be hosted 'in place', for example because of limitations of a central repository or hosting service. It is generally recommended to use trivial relative paths where the source path is the same as the working dir path: This will ensure that the subrepositories always can be found 'in place'. The source path of a Mercurial repository can either be a relative or absolute path or URL. This functionality is cross-platform so Windows users have to use ' /' as the path separator for local directories. On the left hand side of the assignment is the path in our working dir, and the right hand side specifies the source to pull from. ![]() Next we'll mark the directory 'nested' as a Mercurial subrepository by creating an entry for it in the special '. To start using subrepositories, you need two repositories, a main repo and a nested repo: Mercurial 1.5 has support for using Subversion repositories as subrepos. There are still some commands that lack proper support for sub-repositories, but we will fix them as we come across them and as we figure out how to best make them subrepo-aware.įor those used to Subversion, this concept is closest to what you can achieve with Subversion directories marked with the svn:externals property. This feature was introduced in a preliminary form in Mercurial 1.3 and has been improved steadily since then. This will allow you to clone, commit to, push, and pull projects and their associated libraries as a group. Subrepositories is a feature that allows you to treat a collection of repositories as a group. How to find out what changeset of main repository contains specified changeset of subrepository.Use 'trivial' subrepo paths where possible. ![]()
0 Comments
Leave a Reply. |