Mercurial > kallithea
comparison docs/usage/vcs_support.rst @ 6734:c5512c9d2118
docs/vcs_support: add information on importing repositories
This change directly relates to issue #254.
Some rework of the original patch done by Thomas De Schampheleire:
- generalize to cover both Mercurial and Git
- simplify instructions for importing via filesystem: don't impose a certain
flow as it depends on different factors: are the repos already present on
the machine, are they organized in a flat hierarchy or already in a more
complex one, ...
- invalidating cache while rescanning should not be needed when adding new
repositories
author | Karl Goetz <karl@kgoetz.id.au> |
---|---|
date | Wed, 28 Jun 2017 21:52:53 +0200 |
parents | 2c3d30095d5e |
children | 4d04ac08fff7 |
comparison
equal
deleted
inserted
replaced
6733:d29266efe5a5 | 6734:c5512c9d2118 |
---|---|
79 Cloning ``mainrepo`` will also clone the attached subrepository. | 79 Cloning ``mainrepo`` will also clone the attached subrepository. |
80 | 80 |
81 Next we can edit the subrepository data, and push back to Kallithea. This will | 81 Next we can edit the subrepository data, and push back to Kallithea. This will |
82 update both repositories. | 82 update both repositories. |
83 | 83 |
84 .. _importing: | |
85 | |
86 | |
87 Importing existing repositories | |
88 ------------------------------- | |
89 | |
90 There are two main methods to import repositories in Kallithea: via the web | |
91 interface or via the filesystem. If you have a large number of repositories to | |
92 import, importing them via the filesystem is more convenient. | |
93 | |
94 Importing via web interface | |
95 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
96 | |
97 For a small number of repositories, it may be easier to create the target | |
98 repositories through the Kallithea web interface, via *Admin > Repositories* or | |
99 via the *Add Repository* button on the entry page of the web interface. | |
100 | |
101 Repositories can be nested in repository groups by first creating the group (via | |
102 *Admin > Repository Groups* or via the *Add Repository Group* button on the | |
103 entry page of the web interface) and then selecting the appropriate group when | |
104 adding the repository. | |
105 | |
106 After creation of the (empty) repository, push the existing commits to the | |
107 *Clone URL* displayed on the repository summary page. For Git repositories, | |
108 first add the *Clone URL* as remote, then push the commits to that remote. The | |
109 specific commands to execute are shown under the *Existing repository?* section | |
110 of the new repository's summary page. | |
111 | |
112 A benefit of this method particular for Git repositories, is that the | |
113 Kallithea-specific Git hooks are installed automatically. For Mercurial, no | |
114 hooks are required anyway. | |
115 | |
116 Importing via the filesystem | |
117 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
118 | |
119 The alternative method of importing repositories consists of creating the | |
120 repositories in the desired hierarchy on the filesystem and letting Kallithea | |
121 scan that location. | |
122 | |
123 All repositories are stored in a central location on the filesystem. This | |
124 location is specified during installation (via ``setup-db``) and can be reviewed | |
125 at *Admin > Settings > VCS > Location of repositories*. Repository groups | |
126 (defined in *Admin > Repository Groups*) are represented by a directory in that | |
127 repository location. Repositories of the repository group are nested under that | |
128 directory. | |
129 | |
130 To import a set of repositories and organize them in a certain repository group | |
131 structure, first place clones in the desired hierarchy at the configured | |
132 repository location. | |
133 These clones should be created without working directory. For Mercurial, this is | |
134 done with ``hg clone -U``, for Git with ``git clone --bare``. | |
135 | |
136 When the repositories are added correctly on the filesystem: | |
137 | |
138 * go to *Admin > Settings > Remap and Rescan* in the Kallithea web interface | |
139 * select the *Install Git hooks* checkbox when importing Git repositories | |
140 * click *Rescan Repositories* | |
141 This step will scan the filesystem and create the appropriate repository groups | |
142 and repositories in Kallithea. | |
143 | |
144 *Note*: Once repository groups have been created this way, manage their access | |
145 permissions through the Kallithea web interface. | |
146 | |
84 | 147 |
85 .. _waitress: http://pypi.python.org/pypi/waitress | 148 .. _waitress: http://pypi.python.org/pypi/waitress |
86 .. _gunicorn: http://pypi.python.org/pypi/gunicorn | 149 .. _gunicorn: http://pypi.python.org/pypi/gunicorn |
87 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/ | 150 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/ |