##// END OF EJS Templates
docs: split vcs_support into admin/vcs_setup and usage/vcs_notes...
Thomas De Schampheleire -
r7260:2bb5e9ee default
parent child Browse files
Show More
@@ -1,14 +1,15 b''
1 .. _vcs_support:
1 .. _vcs_setup:
2
2
3 ===============================
3 =============================
4 Version control systems support
4 Version control systems setup
5 ===============================
5 =============================
6
6
7 Kallithea supports Git and Mercurial repositories out-of-the-box.
7 Kallithea supports Git and Mercurial repositories out-of-the-box.
8 For Git, you do need the ``git`` command line client installed on the server.
8 For Git, you do need the ``git`` command line client installed on the server.
9
9
10 You can always disable Git or Mercurial support by editing the
10 You can always disable Git or Mercurial support by editing the
11 file ``kallithea/__init__.py`` and commenting out the backend.
11 file ``kallithea/__init__.py`` and commenting out the backend. For example, to
12 disable Git but keep Mercurial enabled:
12
13
13 .. code-block:: python
14 .. code-block:: python
14
15
@@ -18,8 +19,8 b' file ``kallithea/__init__.py`` and comme'
18 }
19 }
19
20
20
21
21 Git support
22 Git-specific setup
22 -----------
23 ------------------
23
24
24
25
25 Web server with chunked encoding
26 Web server with chunked encoding
@@ -46,106 +47,6 b' Also make sure to comment out the follow'
46 use_threadpool =
47 use_threadpool =
47
48
48
49
49 Mercurial support
50 -----------------
51
52
53 Working with Mercurial subrepositories
54 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56 This section explains how to use Mercurial subrepositories_ in Kallithea.
57
58 Example usage::
59
60 ## init a simple repo
61 hg init mainrepo
62 cd mainrepo
63 echo "file" > file
64 hg add file
65 hg ci --message "initial file"
66
67 # clone subrepo we want to add from Kallithea
68 hg clone http://kallithea.local/subrepo
69
70 ## specify URL to existing repo in Kallithea as subrepository path
71 echo "subrepo = http://kallithea.local/subrepo" > .hgsub
72 hg add .hgsub
73 hg ci --message "added remote subrepo"
74
75 In the file list of a clone of ``mainrepo`` you will see a connected
76 subrepository at the revision it was cloned with. Clicking on the
77 subrepository link sends you to the proper repository in Kallithea.
78
79 Cloning ``mainrepo`` will also clone the attached subrepository.
80
81 Next we can edit the subrepository data, and push back to Kallithea. This will
82 update both repositories.
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
142 This step will scan the filesystem and create the appropriate repository groups
143 and repositories in Kallithea.
144
145 *Note*: Once repository groups have been created this way, manage their access
146 permissions through the Kallithea web interface.
147
148
149 .. _waitress: http://pypi.python.org/pypi/waitress
50 .. _waitress: http://pypi.python.org/pypi/waitress
150 .. _gunicorn: http://pypi.python.org/pypi/gunicorn
51 .. _gunicorn: http://pypi.python.org/pypi/gunicorn
151 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/
52 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/
@@ -39,6 +39,7 b' Administrator guide'
39 :maxdepth: 1
39 :maxdepth: 1
40
40
41 setup
41 setup
42 administrator_guide/vcs_setup
42 usage/email
43 usage/email
43 usage/customization
44 usage/customization
44
45
@@ -60,7 +61,7 b' User guide'
60 :maxdepth: 1
61 :maxdepth: 1
61
62
62 usage/general
63 usage/general
63 usage/vcs_support
64 usage/vcs_notes
64 usage/locking
65 usage/locking
65 usage/statistics
66 usage/statistics
66 api/api
67 api/api
@@ -1,85 +1,8 b''
1 .. _vcs_support:
1 .. _vcs_notes:
2
3 ===============================
4 Version control systems support
5 ===============================
6
7 Kallithea supports Git and Mercurial repositories out-of-the-box.
8 For Git, you do need the ``git`` command line client installed on the server.
9
10 You can always disable Git or Mercurial support by editing the
11 file ``kallithea/__init__.py`` and commenting out the backend.
12
13 .. code-block:: python
14
15 BACKENDS = {
16 'hg': 'Mercurial repository',
17 #'git': 'Git repository',
18 }
19
20
21 Git support
22 -----------
23
24
25 Web server with chunked encoding
26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28 Large Git pushes require an HTTP server with support for
29 chunked encoding for POST. The Python web servers waitress_ and
30 gunicorn_ (Linux only) can be used. By default, Kallithea uses
31 waitress_ for `gearbox serve` instead of the built-in `paste` WSGI
32 server.
33
34 The web server used by gearbox is controlled in the .ini file::
35
36 use = egg:waitress#main
37
38 or::
39
40 use = egg:gunicorn#main
41
2
42 Also make sure to comment out the following options::
3 ===================================
43
4 Version control systems usage notes
44 threadpool_workers =
5 ===================================
45 threadpool_max_requests =
46 use_threadpool =
47
48
49 Mercurial support
50 -----------------
51
52
53 Working with Mercurial subrepositories
54 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56 This section explains how to use Mercurial subrepositories_ in Kallithea.
57
58 Example usage::
59
60 ## init a simple repo
61 hg init mainrepo
62 cd mainrepo
63 echo "file" > file
64 hg add file
65 hg ci --message "initial file"
66
67 # clone subrepo we want to add from Kallithea
68 hg clone http://kallithea.local/subrepo
69
70 ## specify URL to existing repo in Kallithea as subrepository path
71 echo "subrepo = http://kallithea.local/subrepo" > .hgsub
72 hg add .hgsub
73 hg ci --message "added remote subrepo"
74
75 In the file list of a clone of ``mainrepo`` you will see a connected
76 subrepository at the revision it was cloned with. Clicking on the
77 subrepository link sends you to the proper repository in Kallithea.
78
79 Cloning ``mainrepo`` will also clone the attached subrepository.
80
81 Next we can edit the subrepository data, and push back to Kallithea. This will
82 update both repositories.
83
6
84 .. _importing:
7 .. _importing:
85
8
@@ -146,6 +69,40 b' and repositories in Kallithea.'
146 permissions through the Kallithea web interface.
69 permissions through the Kallithea web interface.
147
70
148
71
149 .. _waitress: http://pypi.python.org/pypi/waitress
72 Mercurial-specific notes
150 .. _gunicorn: http://pypi.python.org/pypi/gunicorn
73 ------------------------
74
75
76 Working with subrepositories
77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
79 This section explains how to use Mercurial subrepositories_ in Kallithea.
80
81 Example usage::
82
83 ## init a simple repo
84 hg init mainrepo
85 cd mainrepo
86 echo "file" > file
87 hg add file
88 hg ci --message "initial file"
89
90 # clone subrepo we want to add from Kallithea
91 hg clone http://kallithea.local/subrepo
92
93 ## specify URL to existing repo in Kallithea as subrepository path
94 echo "subrepo = http://kallithea.local/subrepo" > .hgsub
95 hg add .hgsub
96 hg ci --message "added remote subrepo"
97
98 In the file list of a clone of ``mainrepo`` you will see a connected
99 subrepository at the revision it was cloned with. Clicking on the
100 subrepository link sends you to the proper repository in Kallithea.
101
102 Cloning ``mainrepo`` will also clone the attached subrepository.
103
104 Next we can edit the subrepository data, and push back to Kallithea. This will
105 update both repositories.
106
107
151 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/
108 .. _subrepositories: http://mercurial.aragost.com/kick-start/en/subrepositories/
General Comments 0
You need to be logged in to leave comments. Login now