subrepositories

Mercurial Subrepositories

In the following examples i will use the scm-cli-client to create the repositories, but you can also use the web interface to create the repositories.

The best way to use subrepositories with scm-manager is the following. Create a main repository and for each subrepository a mercurial repository in scm-manager. Than add the subrepositories with the complete url to the .hgsub file.

java -jar scm-cli-client.jar create-repository -t hg -n main
java -jar scm-cli-client.jar create-repository -t hg -n module-1
java -jar scm-cli-client.jar create-repository -t hg -n module-2
hg clone http://localhost:8081/scm/hg/main
cd main
echo 'module-1 = http://localhost:8081/scm/hg/module-1' > .hgsub
echo 'module-2 = http://localhost:8081/scm/hg/module-2' >> .hgsub
hg add .hgsub
hg commit -m 'added module-1 and module-2 as subrepositories'
hg push

Mercurial nested repositories

If you already have nested repositories, you have to redirect the nested repository to a real scm-manager repository. This work is done by the scm-hgnested-plugin. Install the scm-hgnested-plugin from the plugin-center (requires scm-manager version 1.10 or higher). Create a repository for the main repository and for each nested repository. Configure the scm-hgnested-plugin like this.

Further reading

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.