subrepos.rst
36 lines
| 1.0 KiB
| text/x-rst
|
RstLexer
r3073 | .. _subrepos: | |||
============================================= | ||||
Mads Kiilerich
|
r4902 | Working with Kallithea and Mercurial subrepos | ||
r3073 | ============================================= | |||
Mads Kiilerich
|
r4902 | Example usage of Subrepos with Kallithea:: | ||
r3224 | ||||
r3073 | ## init a simple repo | |||
r3224 | hg init repo1 | |||
r3073 | cd repo1 | |||
echo "file1" > file1 | ||||
r3224 | hg add file1 | |||
r3073 | hg ci --message "initial file 1" | |||
r3224 | ||||
r3073 | #clone subrepo we want to add | |||
Mads Kiilerich
|
r4902 | hg clone http://kallithea.local/subrepo | ||
r3073 | ||||
Bradley M. Kuhn
|
r4192 | ## use path like url to existing repo in Kallithea | ||
Mads Kiilerich
|
r4902 | echo "subrepo = http://kallithea.local/subrepo" > .hgsub | ||
r3073 | ||||
hg add .hgsub | ||||
hg ci --message "added remote subrepo" | ||||
r3224 | ||||
Mads Kiilerich
|
r4902 | In the file list of a clone of repo1 you will see a connected subrepo at | ||
revision it was during cloning. | ||||
Clicking in subrepos link should send you to proper repository in Kallithea. | ||||
r3073 | ||||
Mads Kiilerich
|
r4902 | Cloning repo1 will also clone attached subrepository. | ||
r3073 | ||||
Bradley M. Kuhn
|
r4192 | Next we can edit the subrepo data, and push back to Kallithea. This will update | ||
r3073 | both of repositories. | |||
Mads Kiilerich
|
r4902 | See http://mercurial.aragost.com/kick-start/en/subrepositories/ for more | ||
information about subrepositories. | ||||