Mercurial > kallithea
annotate docs/usage/subrepos.rst @ 4040:d415621fa7c5
compare: handle revisions and ancestor of empty range in _get_changesets
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 26 Jun 2013 00:20:17 +0200 |
parents | 8b8edfc25856 |
children | e73a69cb98dc |
rev | line source |
---|---|
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 .. _subrepos: |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 ============================================= |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 working with RhodeCode and mercurial subrepos |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 ============================================= |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 example usage of Subrepos with RhodeCode:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
8 |
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 ## init a simple repo |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
10 hg init repo1 |
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 cd repo1 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 echo "file1" > file1 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
13 hg add file1 |
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 hg ci --message "initial file 1" |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
15 |
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 #clone subrepo we want to add |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 hg clone http://rc.local/subrepo |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
19 ## use path like url to existing repo in RhodeCode |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 echo "subrepo = http://rc.local/subrepo" > .hgsub |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 hg add .hgsub |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 hg ci --message "added remote subrepo" |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
25 |
3073
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 In file list of repo1 you will see a connected subrepo at revision it was |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 during cloning. |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 Clicking in subrepos link should send you to proper repository in RhodeCode |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
31 cloning repo1 will also clone attached subrepository. |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 Next we can edit the subrepo data, and push back to RhodeCode. This will update |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 both of repositories. |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 |
e54ec8211944
added simple subrepos docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 see http://mercurial.aragost.com/kick-start/en/subrepositories/ for more |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3073
diff
changeset
|
37 information about subrepositories |