-Mercurial has a feature
s called subrepositories. This feature allows
+Mercurial has a feature called subrepositories. This feature allows
you to treat a collection of repositories as a group.
Reusing code is an important concept of software architecture.
option to recurse down into the subrepositories.
When executing a command within the working directory of a
. Then the behavior will be exactly the same as if it
+subrepositoryhen the behavior will be exactly the same as if it
wasn't a subrepository, so a subrepository doesn't "know" it is within
In the simple case where you have 'subrepo = subrepo', you end up
- with Mercurial doing these commands
+ with Mercurial doing these commands
and if you had used ``subrepo = ../subrepo``, then the commands
where the last URL is the normalization version of
$ echo svnrepo = [svn]http://mercurial.aragost.com/svn/hello1/trunk >> .hgsub
Then SVN commands should be used within the subrepository and
mercurial commands in the super repository.
+ercurial commands in the super repository.
Working with Subrepositories
subrepository. We realize that we want to link the main repository
with an earlier version of the subrepository. This is done by updating
the subrepository to the wanted revision and then performing a commit
-from the main repository
, Again to update and commit the
+from the main repositorygain to update and commit the
loose our precious history of these files.
The way to do it, is by converting a folder into a repository, using
-the convert extension and then include this repository as a
+the convert extension and then include this repository as a
subrepository in the different projects.
-.. _convert extension: http://mercurial
+.. _convert extension: http://mercurial
-This first part below, just creates our folder and makes and commits
-some changes to its contents.
+This first part below, just creates our folder. makes some changes and commits
Now we want to make the folder into a subrepository. First we just
make the folder into an repository. This is done by converting the
-original repository from a
mercurial repository to a mercurial
+original repository from a ercurial repository to a ercurial
repository and then using a filemap to specify we only want the
in the root directory of the repository we create. Then we perform the
conversion, and see that we now have a repository containing only the
changeset which edited in the file within the folder. This repository
-we can now include as a subrepository as previously described.
+we can now include as a subrepository as previously described.