Show More
The requested changes are too big and content was truncated. Show full diff
@@ -0,0 +1,6 b'' | |||
|
1 | {% extends "!footer.html" %} | |
|
2 | ||
|
3 | {% block extrafooter %} | |
|
4 | <br/> | |
|
5 | Documentation defects and suggestions can be submitted <a href="https://issues.rhodecode.com/projects/documentation">here</a> | |
|
6 | {% endblock %} |
@@ -0,0 +1,77 b'' | |||
|
1 | .. _deprecated-methods-ref: | |
|
2 | ||
|
3 | deprecated methods | |
|
4 | ================= | |
|
5 | ||
|
6 | changeset_comment | |
|
7 | ----------------- | |
|
8 | ||
|
9 | .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>) | |
|
10 | ||
|
11 | .. deprecated:: 3.4.0 | |
|
12 | ||
|
13 | Please use method `comment_commit` instead. | |
|
14 | ||
|
15 | ||
|
16 | Set a changeset comment, and optionally change the status of the | |
|
17 | changeset. | |
|
18 | ||
|
19 | This command can only be run using an |authtoken| with admin | |
|
20 | permissions on the |repo|. | |
|
21 | ||
|
22 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
23 | :type apiuser: AuthUser | |
|
24 | :param repoid: Set the repository name or repository ID. | |
|
25 | :type repoid: str or int | |
|
26 | :param revision: Specify the revision for which to set a comment. | |
|
27 | :type revision: str | |
|
28 | :param message: The comment text. | |
|
29 | :type message: str | |
|
30 | :param userid: Set the user name of the comment creator. | |
|
31 | :type userid: Optional(str or int) | |
|
32 | :param status: Set the comment status. The following are valid options: | |
|
33 | * not_reviewed | |
|
34 | * approved | |
|
35 | * rejected | |
|
36 | * under_review | |
|
37 | :type status: str | |
|
38 | ||
|
39 | Example error output: | |
|
40 | ||
|
41 | .. code-block:: json | |
|
42 | ||
|
43 | { | |
|
44 | "id" : <id_given_in_input>, | |
|
45 | "result" : { | |
|
46 | "msg": "Commented on commit `<revision>` for repository `<repoid>`", | |
|
47 | "status_change": null or <status>, | |
|
48 | "success": true | |
|
49 | }, | |
|
50 | "error" : null | |
|
51 | } | |
|
52 | ||
|
53 | ||
|
54 | get_locks | |
|
55 | --------- | |
|
56 | ||
|
57 | .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
58 | ||
|
59 | .. deprecated:: 4.0.0 | |
|
60 | ||
|
61 | Please use method `get_user_locks` instead. | |
|
62 | ||
|
63 | None | |
|
64 | ||
|
65 | ||
|
66 | show_ip | |
|
67 | ------- | |
|
68 | ||
|
69 | .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
70 | ||
|
71 | .. deprecated:: 4.0.0 | |
|
72 | ||
|
73 | Please use method `get_ip` instead. | |
|
74 | ||
|
75 | None | |
|
76 | ||
|
77 |
@@ -0,0 +1,121 b'' | |||
|
1 | .. _gist-methods-ref: | |
|
2 | ||
|
3 | gist methods | |
|
4 | ================= | |
|
5 | ||
|
6 | create_gist | |
|
7 | ----------- | |
|
8 | ||
|
9 | .. py:function:: create_gist(apiuser, files, gistid=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, gist_type=<Optional:u'public'>, lifetime=<Optional:-1>, acl_level=<Optional:u'acl_public'>, description=<Optional:''>) | |
|
10 | ||
|
11 | Creates a new Gist. | |
|
12 | ||
|
13 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
14 | :type apiuser: AuthUser | |
|
15 | :param files: files to be added to the gist. The data structure has | |
|
16 | to match the following example:: | |
|
17 | ||
|
18 | {'filename1': {'content':'...'}, 'filename2': {'content':'...'}} | |
|
19 | ||
|
20 | :type files: dict | |
|
21 | :param gistid: Set a custom id for the gist | |
|
22 | :type gistid: Optional(str) | |
|
23 | :param owner: Set the gist owner, defaults to api method caller | |
|
24 | :type owner: Optional(str or int) | |
|
25 | :param gist_type: type of gist ``public`` or ``private`` | |
|
26 | :type gist_type: Optional(str) | |
|
27 | :param lifetime: time in minutes of gist lifetime | |
|
28 | :type lifetime: Optional(int) | |
|
29 | :param acl_level: acl level for this gist, can be | |
|
30 | ``acl_public`` or ``acl_private`` If the value is set to | |
|
31 | ``acl_private`` only logged in users are able to access this gist. | |
|
32 | If not set it defaults to ``acl_public``. | |
|
33 | :type acl_level: Optional(str) | |
|
34 | :param description: gist description | |
|
35 | :type description: Optional(str) | |
|
36 | ||
|
37 | Example output: | |
|
38 | ||
|
39 | .. code-block:: bash | |
|
40 | ||
|
41 | id : <id_given_in_input> | |
|
42 | result : { | |
|
43 | "msg": "created new gist", | |
|
44 | "gist": {} | |
|
45 | } | |
|
46 | error : null | |
|
47 | ||
|
48 | Example error output: | |
|
49 | ||
|
50 | .. code-block:: bash | |
|
51 | ||
|
52 | id : <id_given_in_input> | |
|
53 | result : null | |
|
54 | error : { | |
|
55 | "failed to create gist" | |
|
56 | } | |
|
57 | ||
|
58 | ||
|
59 | delete_gist | |
|
60 | ----------- | |
|
61 | ||
|
62 | .. py:function:: delete_gist(apiuser, gistid) | |
|
63 | ||
|
64 | Deletes existing gist | |
|
65 | ||
|
66 | :param apiuser: filled automatically from apikey | |
|
67 | :type apiuser: AuthUser | |
|
68 | :param gistid: id of gist to delete | |
|
69 | :type gistid: str | |
|
70 | ||
|
71 | Example output: | |
|
72 | ||
|
73 | .. code-block:: bash | |
|
74 | ||
|
75 | id : <id_given_in_input> | |
|
76 | result : { | |
|
77 | "deleted gist ID: <gist_id>", | |
|
78 | "gist": null | |
|
79 | } | |
|
80 | error : null | |
|
81 | ||
|
82 | Example error output: | |
|
83 | ||
|
84 | .. code-block:: bash | |
|
85 | ||
|
86 | id : <id_given_in_input> | |
|
87 | result : null | |
|
88 | error : { | |
|
89 | "failed to delete gist ID:<gist_id>" | |
|
90 | } | |
|
91 | ||
|
92 | ||
|
93 | get_gist | |
|
94 | -------- | |
|
95 | ||
|
96 | .. py:function:: get_gist(apiuser, gistid, content=<Optional:False>) | |
|
97 | ||
|
98 | Get the specified gist, based on the gist ID. | |
|
99 | ||
|
100 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
101 | :type apiuser: AuthUser | |
|
102 | :param gistid: Set the id of the private or public gist | |
|
103 | :type gistid: str | |
|
104 | :param content: Return the gist content. Default is false. | |
|
105 | :type content: Optional(bool) | |
|
106 | ||
|
107 | ||
|
108 | get_gists | |
|
109 | --------- | |
|
110 | ||
|
111 | .. py:function:: get_gists(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
112 | ||
|
113 | Get all gists for given user. If userid is empty returned gists | |
|
114 | are for user who called the api | |
|
115 | ||
|
116 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
117 | :type apiuser: AuthUser | |
|
118 | :param userid: user to get gists for | |
|
119 | :type userid: Optional(str or int) | |
|
120 | ||
|
121 |
@@ -0,0 +1,71 b'' | |||
|
1 | .. _license-methods-ref: | |
|
2 | ||
|
3 | license methods | |
|
4 | ================= | |
|
5 | ||
|
6 | get_license_info (EE only) | |
|
7 | ---------------- | |
|
8 | ||
|
9 | .. py:function:: get_license_info(apiuser) | |
|
10 | ||
|
11 | Returns the |RCE| license information. | |
|
12 | ||
|
13 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
14 | :type apiuser: AuthUser | |
|
15 | ||
|
16 | Example output: | |
|
17 | ||
|
18 | .. code-block:: bash | |
|
19 | ||
|
20 | id : <id_given_in_input> | |
|
21 | result : { | |
|
22 | 'rhodecode_version': <rhodecode version>, | |
|
23 | 'token': <license token>, | |
|
24 | 'issued_to': <license owner>, | |
|
25 | 'issued_on': <license issue date>, | |
|
26 | 'expires_on': <license expiration date>, | |
|
27 | 'type': <license type>, | |
|
28 | 'users_limit': <license users limit>, | |
|
29 | 'key': <license key> | |
|
30 | } | |
|
31 | error : null | |
|
32 | ||
|
33 | ||
|
34 | set_license_key (EE only) | |
|
35 | --------------- | |
|
36 | ||
|
37 | .. py:function:: set_license_key(apiuser, key) | |
|
38 | ||
|
39 | Sets the |RCE| license key. | |
|
40 | ||
|
41 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
42 | :type apiuser: AuthUser | |
|
43 | :param key: This is the license key to be set. | |
|
44 | :type key: str | |
|
45 | ||
|
46 | Example output: | |
|
47 | ||
|
48 | .. code-block:: bash | |
|
49 | ||
|
50 | id : <id_given_in_input> | |
|
51 | result: { | |
|
52 | "msg" : "updated license information", | |
|
53 | "key": <key> | |
|
54 | } | |
|
55 | error: null | |
|
56 | ||
|
57 | Example error output: | |
|
58 | ||
|
59 | .. code-block:: bash | |
|
60 | ||
|
61 | id : <id_given_in_input> | |
|
62 | result : null | |
|
63 | error : { | |
|
64 | "license key is not valid" | |
|
65 | or | |
|
66 | "trial licenses cannot be uploaded" | |
|
67 | or | |
|
68 | "error occurred while updating license" | |
|
69 | } | |
|
70 | ||
|
71 |
@@ -0,0 +1,344 b'' | |||
|
1 | .. _pull-request-methods-ref: | |
|
2 | ||
|
3 | pull_request methods | |
|
4 | ================= | |
|
5 | ||
|
6 | close_pull_request | |
|
7 | ------------------ | |
|
8 | ||
|
9 | .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
10 | ||
|
11 | Close the pull request specified by `pullrequestid`. | |
|
12 | ||
|
13 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
14 | :type apiuser: AuthUser | |
|
15 | :param repoid: Repository name or repository ID to which the pull | |
|
16 | request belongs. | |
|
17 | :type repoid: str or int | |
|
18 | :param pullrequestid: ID of the pull request to be closed. | |
|
19 | :type pullrequestid: int | |
|
20 | :param userid: Close the pull request as this user. | |
|
21 | :type userid: Optional(str or int) | |
|
22 | ||
|
23 | Example output: | |
|
24 | ||
|
25 | .. code-block:: bash | |
|
26 | ||
|
27 | "id": <id_given_in_input>, | |
|
28 | "result": | |
|
29 | { | |
|
30 | "pull_request_id": "<int>", | |
|
31 | "closed": "<bool>" | |
|
32 | }, | |
|
33 | "error": null | |
|
34 | ||
|
35 | ||
|
36 | comment_pull_request | |
|
37 | -------------------- | |
|
38 | ||
|
39 | .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, status=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
40 | ||
|
41 | Comment on the pull request specified with the `pullrequestid`, | |
|
42 | in the |repo| specified by the `repoid`, and optionally change the | |
|
43 | review status. | |
|
44 | ||
|
45 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
46 | :type apiuser: AuthUser | |
|
47 | :param repoid: The repository name or repository ID. | |
|
48 | :type repoid: str or int | |
|
49 | :param pullrequestid: The pull request ID. | |
|
50 | :type pullrequestid: int | |
|
51 | :param message: The text content of the comment. | |
|
52 | :type message: str | |
|
53 | :param status: (**Optional**) Set the approval status of the pull | |
|
54 | request. Valid options are: | |
|
55 | * not_reviewed | |
|
56 | * approved | |
|
57 | * rejected | |
|
58 | * under_review | |
|
59 | :type status: str | |
|
60 | :param userid: Comment on the pull request as this user | |
|
61 | :type userid: Optional(str or int) | |
|
62 | ||
|
63 | Example output: | |
|
64 | ||
|
65 | .. code-block:: bash | |
|
66 | ||
|
67 | id : <id_given_in_input> | |
|
68 | result : | |
|
69 | { | |
|
70 | "pull_request_id": "<Integer>", | |
|
71 | "comment_id": "<Integer>" | |
|
72 | } | |
|
73 | error : null | |
|
74 | ||
|
75 | ||
|
76 | create_pull_request | |
|
77 | ------------------- | |
|
78 | ||
|
79 | .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, title, description=<Optional:''>, reviewers=<Optional:None>) | |
|
80 | ||
|
81 | Creates a new pull request. | |
|
82 | ||
|
83 | Accepts refs in the following formats: | |
|
84 | ||
|
85 | * branch:<branch_name>:<sha> | |
|
86 | * branch:<branch_name> | |
|
87 | * bookmark:<bookmark_name>:<sha> (Mercurial only) | |
|
88 | * bookmark:<bookmark_name> (Mercurial only) | |
|
89 | ||
|
90 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
91 | :type apiuser: AuthUser | |
|
92 | :param source_repo: Set the source repository name. | |
|
93 | :type source_repo: str | |
|
94 | :param target_repo: Set the target repository name. | |
|
95 | :type target_repo: str | |
|
96 | :param source_ref: Set the source ref name. | |
|
97 | :type source_ref: str | |
|
98 | :param target_ref: Set the target ref name. | |
|
99 | :type target_ref: str | |
|
100 | :param title: Set the pull request title. | |
|
101 | :type title: str | |
|
102 | :param description: Set the pull request description. | |
|
103 | :type description: Optional(str) | |
|
104 | :param reviewers: Set the new pull request reviewers list. | |
|
105 | :type reviewers: Optional(list) | |
|
106 | ||
|
107 | ||
|
108 | get_pull_request | |
|
109 | ---------------- | |
|
110 | ||
|
111 | .. py:function:: get_pull_request(apiuser, repoid, pullrequestid) | |
|
112 | ||
|
113 | Get a pull request based on the given ID. | |
|
114 | ||
|
115 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
116 | :type apiuser: AuthUser | |
|
117 | :param repoid: Repository name or repository ID from where the pull | |
|
118 | request was opened. | |
|
119 | :type repoid: str or int | |
|
120 | :param pullrequestid: ID of the requested pull request. | |
|
121 | :type pullrequestid: int | |
|
122 | ||
|
123 | Example output: | |
|
124 | ||
|
125 | .. code-block:: bash | |
|
126 | ||
|
127 | "id": <id_given_in_input>, | |
|
128 | "result": | |
|
129 | { | |
|
130 | "pull_request_id": "<pull_request_id>", | |
|
131 | "url": "<url>", | |
|
132 | "title": "<title>", | |
|
133 | "description": "<description>", | |
|
134 | "status" : "<status>", | |
|
135 | "created_on": "<date_time_created>", | |
|
136 | "updated_on": "<date_time_updated>", | |
|
137 | "commit_ids": [ | |
|
138 | ... | |
|
139 | "<commit_id>", | |
|
140 | "<commit_id>", | |
|
141 | ... | |
|
142 | ], | |
|
143 | "review_status": "<review_status>", | |
|
144 | "mergeable": { | |
|
145 | "status": "<bool>", | |
|
146 | "message": "<message>", | |
|
147 | }, | |
|
148 | "source": { | |
|
149 | "clone_url": "<clone_url>", | |
|
150 | "repository": "<repository_name>", | |
|
151 | "reference": | |
|
152 | { | |
|
153 | "name": "<name>", | |
|
154 | "type": "<type>", | |
|
155 | "commit_id": "<commit_id>", | |
|
156 | } | |
|
157 | }, | |
|
158 | "target": { | |
|
159 | "clone_url": "<clone_url>", | |
|
160 | "repository": "<repository_name>", | |
|
161 | "reference": | |
|
162 | { | |
|
163 | "name": "<name>", | |
|
164 | "type": "<type>", | |
|
165 | "commit_id": "<commit_id>", | |
|
166 | } | |
|
167 | }, | |
|
168 | "author": <user_obj>, | |
|
169 | "reviewers": [ | |
|
170 | ... | |
|
171 | { | |
|
172 | "user": "<user_obj>", | |
|
173 | "review_status": "<review_status>", | |
|
174 | } | |
|
175 | ... | |
|
176 | ] | |
|
177 | }, | |
|
178 | "error": null | |
|
179 | ||
|
180 | ||
|
181 | get_pull_requests | |
|
182 | ----------------- | |
|
183 | ||
|
184 | .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>) | |
|
185 | ||
|
186 | Get all pull requests from the repository specified in `repoid`. | |
|
187 | ||
|
188 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
189 | :type apiuser: AuthUser | |
|
190 | :param repoid: Repository name or repository ID. | |
|
191 | :type repoid: str or int | |
|
192 | :param status: Only return pull requests with the specified status. | |
|
193 | Valid options are. | |
|
194 | * ``new`` (default) | |
|
195 | * ``open`` | |
|
196 | * ``closed`` | |
|
197 | :type status: str | |
|
198 | ||
|
199 | Example output: | |
|
200 | ||
|
201 | .. code-block:: bash | |
|
202 | ||
|
203 | "id": <id_given_in_input>, | |
|
204 | "result": | |
|
205 | [ | |
|
206 | ... | |
|
207 | { | |
|
208 | "pull_request_id": "<pull_request_id>", | |
|
209 | "url": "<url>", | |
|
210 | "title" : "<title>", | |
|
211 | "description": "<description>", | |
|
212 | "status": "<status>", | |
|
213 | "created_on": "<date_time_created>", | |
|
214 | "updated_on": "<date_time_updated>", | |
|
215 | "commit_ids": [ | |
|
216 | ... | |
|
217 | "<commit_id>", | |
|
218 | "<commit_id>", | |
|
219 | ... | |
|
220 | ], | |
|
221 | "review_status": "<review_status>", | |
|
222 | "mergeable": { | |
|
223 | "status": "<bool>", | |
|
224 | "message: "<message>", | |
|
225 | }, | |
|
226 | "source": { | |
|
227 | "clone_url": "<clone_url>", | |
|
228 | "reference": | |
|
229 | { | |
|
230 | "name": "<name>", | |
|
231 | "type": "<type>", | |
|
232 | "commit_id": "<commit_id>", | |
|
233 | } | |
|
234 | }, | |
|
235 | "target": { | |
|
236 | "clone_url": "<clone_url>", | |
|
237 | "reference": | |
|
238 | { | |
|
239 | "name": "<name>", | |
|
240 | "type": "<type>", | |
|
241 | "commit_id": "<commit_id>", | |
|
242 | } | |
|
243 | }, | |
|
244 | "author": <user_obj>, | |
|
245 | "reviewers": [ | |
|
246 | ... | |
|
247 | { | |
|
248 | "user": "<user_obj>", | |
|
249 | "review_status": "<review_status>", | |
|
250 | } | |
|
251 | ... | |
|
252 | ] | |
|
253 | } | |
|
254 | ... | |
|
255 | ], | |
|
256 | "error": null | |
|
257 | ||
|
258 | ||
|
259 | merge_pull_request | |
|
260 | ------------------ | |
|
261 | ||
|
262 | .. py:function:: merge_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
263 | ||
|
264 | Merge the pull request specified by `pullrequestid` into its target | |
|
265 | repository. | |
|
266 | ||
|
267 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
268 | :type apiuser: AuthUser | |
|
269 | :param repoid: The Repository name or repository ID of the | |
|
270 | target repository to which the |pr| is to be merged. | |
|
271 | :type repoid: str or int | |
|
272 | :param pullrequestid: ID of the pull request which shall be merged. | |
|
273 | :type pullrequestid: int | |
|
274 | :param userid: Merge the pull request as this user. | |
|
275 | :type userid: Optional(str or int) | |
|
276 | ||
|
277 | Example output: | |
|
278 | ||
|
279 | .. code-block:: bash | |
|
280 | ||
|
281 | "id": <id_given_in_input>, | |
|
282 | "result": | |
|
283 | { | |
|
284 | "executed": "<bool>", | |
|
285 | "failure_reason": "<int>", | |
|
286 | "merge_commit_id": "<merge_commit_id>", | |
|
287 | "possible": "<bool>" | |
|
288 | }, | |
|
289 | "error": null | |
|
290 | ||
|
291 | ||
|
292 | update_pull_request | |
|
293 | ------------------- | |
|
294 | ||
|
295 | .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>, close_pull_request=<Optional:None>) | |
|
296 | ||
|
297 | Updates a pull request. | |
|
298 | ||
|
299 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
300 | :type apiuser: AuthUser | |
|
301 | :param repoid: The repository name or repository ID. | |
|
302 | :type repoid: str or int | |
|
303 | :param pullrequestid: The pull request ID. | |
|
304 | :type pullrequestid: int | |
|
305 | :param title: Set the pull request title. | |
|
306 | :type title: str | |
|
307 | :param description: Update pull request description. | |
|
308 | :type description: Optional(str) | |
|
309 | :param reviewers: Update pull request reviewers list with new value. | |
|
310 | :type reviewers: Optional(list) | |
|
311 | :param update_commits: Trigger update of commits for this pull request | |
|
312 | :type: update_commits: Optional(bool) | |
|
313 | :param close_pull_request: Close this pull request with rejected state | |
|
314 | :type: close_pull_request: Optional(bool) | |
|
315 | ||
|
316 | Example output: | |
|
317 | ||
|
318 | .. code-block:: bash | |
|
319 | ||
|
320 | id : <id_given_in_input> | |
|
321 | result : | |
|
322 | { | |
|
323 | "msg": "Updated pull request `63`", | |
|
324 | "pull_request": <pull_request_object>, | |
|
325 | "updated_reviewers": { | |
|
326 | "added": [ | |
|
327 | "username" | |
|
328 | ], | |
|
329 | "removed": [] | |
|
330 | }, | |
|
331 | "updated_commits": { | |
|
332 | "added": [ | |
|
333 | "<sha1_hash>" | |
|
334 | ], | |
|
335 | "common": [ | |
|
336 | "<sha1_hash>", | |
|
337 | "<sha1_hash>", | |
|
338 | ], | |
|
339 | "removed": [] | |
|
340 | } | |
|
341 | } | |
|
342 | error : null | |
|
343 | ||
|
344 |
@@ -0,0 +1,350 b'' | |||
|
1 | .. _repo-group-methods-ref: | |
|
2 | ||
|
3 | repo_group methods | |
|
4 | ================= | |
|
5 | ||
|
6 | create_repo_group | |
|
7 | ----------------- | |
|
8 | ||
|
9 | .. py:function:: create_repo_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, copy_permissions=<Optional:False>) | |
|
10 | ||
|
11 | Creates a repository group. | |
|
12 | ||
|
13 | * If the repository group name contains "/", all the required repository | |
|
14 | groups will be created. | |
|
15 | ||
|
16 | For example "foo/bar/baz" will create |repo| groups "foo" and "bar" | |
|
17 | (with "foo" as parent). It will also create the "baz" repository | |
|
18 | with "bar" as |repo| group. | |
|
19 | ||
|
20 | This command can only be run using an |authtoken| with admin | |
|
21 | permissions. | |
|
22 | ||
|
23 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
24 | :type apiuser: AuthUser | |
|
25 | :param group_name: Set the repository group name. | |
|
26 | :type group_name: str | |
|
27 | :param description: Set the |repo| group description. | |
|
28 | :type description: str | |
|
29 | :param owner: Set the |repo| group owner. | |
|
30 | :type owner: str | |
|
31 | :param copy_permissions: | |
|
32 | :type copy_permissions: | |
|
33 | ||
|
34 | Example output: | |
|
35 | ||
|
36 | .. code-block:: bash | |
|
37 | ||
|
38 | id : <id_given_in_input> | |
|
39 | result : { | |
|
40 | "msg": "Created new repo group `<repo_group_name>`" | |
|
41 | "repo_group": <repogroup_object> | |
|
42 | } | |
|
43 | error : null | |
|
44 | ||
|
45 | ||
|
46 | Example error output: | |
|
47 | ||
|
48 | .. code-block:: bash | |
|
49 | ||
|
50 | id : <id_given_in_input> | |
|
51 | result : null | |
|
52 | error : { | |
|
53 | failed to create repo group `<repogroupid>` | |
|
54 | } | |
|
55 | ||
|
56 | ||
|
57 | delete_repo_group | |
|
58 | ----------------- | |
|
59 | ||
|
60 | .. py:function:: delete_repo_group(apiuser, repogroupid) | |
|
61 | ||
|
62 | Deletes a |repo| group. | |
|
63 | ||
|
64 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
65 | :type apiuser: AuthUser | |
|
66 | :param repogroupid: Set the name or ID of repository group to be | |
|
67 | deleted. | |
|
68 | :type repogroupid: str or int | |
|
69 | ||
|
70 | Example output: | |
|
71 | ||
|
72 | .. code-block:: bash | |
|
73 | ||
|
74 | id : <id_given_in_input> | |
|
75 | result : { | |
|
76 | 'msg': 'deleted repo group ID:<repogroupid> <repogroupname> | |
|
77 | 'repo_group': null | |
|
78 | } | |
|
79 | error : null | |
|
80 | ||
|
81 | Example error output: | |
|
82 | ||
|
83 | .. code-block:: bash | |
|
84 | ||
|
85 | id : <id_given_in_input> | |
|
86 | result : null | |
|
87 | error : { | |
|
88 | "failed to delete repo group ID:<repogroupid> <repogroupname>" | |
|
89 | } | |
|
90 | ||
|
91 | ||
|
92 | get_repo_group | |
|
93 | -------------- | |
|
94 | ||
|
95 | .. py:function:: get_repo_group(apiuser, repogroupid) | |
|
96 | ||
|
97 | Return the specified |repo| group, along with permissions, | |
|
98 | and repositories inside the group | |
|
99 | ||
|
100 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
101 | :type apiuser: AuthUser | |
|
102 | :param repogroupid: Specify the name of ID of the repository group. | |
|
103 | :type repogroupid: str or int | |
|
104 | ||
|
105 | ||
|
106 | Example output: | |
|
107 | ||
|
108 | .. code-block:: bash | |
|
109 | ||
|
110 | { | |
|
111 | "error": null, | |
|
112 | "id": repo-group-id, | |
|
113 | "result": { | |
|
114 | "group_description": "repo group description", | |
|
115 | "group_id": 14, | |
|
116 | "group_name": "group name", | |
|
117 | "members": [ | |
|
118 | { | |
|
119 | "name": "super-admin-username", | |
|
120 | "origin": "super-admin", | |
|
121 | "permission": "group.admin", | |
|
122 | "type": "user" | |
|
123 | }, | |
|
124 | { | |
|
125 | "name": "owner-name", | |
|
126 | "origin": "owner", | |
|
127 | "permission": "group.admin", | |
|
128 | "type": "user" | |
|
129 | }, | |
|
130 | { | |
|
131 | "name": "user-group-name", | |
|
132 | "origin": "permission", | |
|
133 | "permission": "group.write", | |
|
134 | "type": "user_group" | |
|
135 | } | |
|
136 | ], | |
|
137 | "owner": "owner-name", | |
|
138 | "parent_group": null, | |
|
139 | "repositories": [ repo-list ] | |
|
140 | } | |
|
141 | } | |
|
142 | ||
|
143 | ||
|
144 | get_repo_groups | |
|
145 | --------------- | |
|
146 | ||
|
147 | .. py:function:: get_repo_groups(apiuser) | |
|
148 | ||
|
149 | Returns all repository groups. | |
|
150 | ||
|
151 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
152 | :type apiuser: AuthUser | |
|
153 | ||
|
154 | ||
|
155 | grant_user_group_permission_to_repo_group | |
|
156 | ----------------------------------------- | |
|
157 | ||
|
158 | .. py:function:: grant_user_group_permission_to_repo_group(apiuser, repogroupid, usergroupid, perm, apply_to_children=<Optional:'none'>) | |
|
159 | ||
|
160 | Grant permission for a user group on given repository group, or update | |
|
161 | existing permissions if found. | |
|
162 | ||
|
163 | This command can only be run using an |authtoken| with admin | |
|
164 | permissions on the |repo| group. | |
|
165 | ||
|
166 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
167 | :type apiuser: AuthUser | |
|
168 | :param repogroupid: Set the name or id of repository group | |
|
169 | :type repogroupid: str or int | |
|
170 | :param usergroupid: id of usergroup | |
|
171 | :type usergroupid: str or int | |
|
172 | :param perm: (group.(none|read|write|admin)) | |
|
173 | :type perm: str | |
|
174 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
175 | :type apply_to_children: str | |
|
176 | ||
|
177 | Example output: | |
|
178 | ||
|
179 | .. code-block:: bash | |
|
180 | ||
|
181 | id : <id_given_in_input> | |
|
182 | result : { | |
|
183 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
|
184 | "success": true | |
|
185 | ||
|
186 | } | |
|
187 | error : null | |
|
188 | ||
|
189 | Example error output: | |
|
190 | ||
|
191 | .. code-block:: bash | |
|
192 | ||
|
193 | id : <id_given_in_input> | |
|
194 | result : null | |
|
195 | error : { | |
|
196 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" | |
|
197 | } | |
|
198 | ||
|
199 | ||
|
200 | grant_user_permission_to_repo_group | |
|
201 | ----------------------------------- | |
|
202 | ||
|
203 | .. py:function:: grant_user_permission_to_repo_group(apiuser, repogroupid, userid, perm, apply_to_children=<Optional:'none'>) | |
|
204 | ||
|
205 | Grant permission for a user on the given repository group, or update | |
|
206 | existing permissions if found. | |
|
207 | ||
|
208 | This command can only be run using an |authtoken| with admin | |
|
209 | permissions. | |
|
210 | ||
|
211 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
212 | :type apiuser: AuthUser | |
|
213 | :param repogroupid: Set the name or ID of repository group. | |
|
214 | :type repogroupid: str or int | |
|
215 | :param userid: Set the user name. | |
|
216 | :type userid: str | |
|
217 | :param perm: (group.(none|read|write|admin)) | |
|
218 | :type perm: str | |
|
219 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
220 | :type apply_to_children: str | |
|
221 | ||
|
222 | Example output: | |
|
223 | ||
|
224 | .. code-block:: bash | |
|
225 | ||
|
226 | id : <id_given_in_input> | |
|
227 | result: { | |
|
228 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
|
229 | "success": true | |
|
230 | } | |
|
231 | error: null | |
|
232 | ||
|
233 | Example error output: | |
|
234 | ||
|
235 | .. code-block:: bash | |
|
236 | ||
|
237 | id : <id_given_in_input> | |
|
238 | result : null | |
|
239 | error : { | |
|
240 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" | |
|
241 | } | |
|
242 | ||
|
243 | ||
|
244 | revoke_user_group_permission_from_repo_group | |
|
245 | -------------------------------------------- | |
|
246 | ||
|
247 | .. py:function:: revoke_user_group_permission_from_repo_group(apiuser, repogroupid, usergroupid, apply_to_children=<Optional:'none'>) | |
|
248 | ||
|
249 | Revoke permission for user group on given repository. | |
|
250 | ||
|
251 | This command can only be run using an |authtoken| with admin | |
|
252 | permissions on the |repo| group. | |
|
253 | ||
|
254 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
255 | :type apiuser: AuthUser | |
|
256 | :param repogroupid: name or id of repository group | |
|
257 | :type repogroupid: str or int | |
|
258 | :param usergroupid: | |
|
259 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
260 | :type apply_to_children: str | |
|
261 | ||
|
262 | Example output: | |
|
263 | ||
|
264 | .. code-block:: bash | |
|
265 | ||
|
266 | id : <id_given_in_input> | |
|
267 | result: { | |
|
268 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
|
269 | "success": true | |
|
270 | } | |
|
271 | error: null | |
|
272 | ||
|
273 | Example error output: | |
|
274 | ||
|
275 | .. code-block:: bash | |
|
276 | ||
|
277 | id : <id_given_in_input> | |
|
278 | result : null | |
|
279 | error : { | |
|
280 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" | |
|
281 | } | |
|
282 | ||
|
283 | ||
|
284 | revoke_user_permission_from_repo_group | |
|
285 | -------------------------------------- | |
|
286 | ||
|
287 | .. py:function:: revoke_user_permission_from_repo_group(apiuser, repogroupid, userid, apply_to_children=<Optional:'none'>) | |
|
288 | ||
|
289 | Revoke permission for a user in a given repository group. | |
|
290 | ||
|
291 | This command can only be run using an |authtoken| with admin | |
|
292 | permissions on the |repo| group. | |
|
293 | ||
|
294 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
295 | :type apiuser: AuthUser | |
|
296 | :param repogroupid: Set the name or ID of the repository group. | |
|
297 | :type repogroupid: str or int | |
|
298 | :param userid: Set the user name to revoke. | |
|
299 | :type userid: str | |
|
300 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
301 | :type apply_to_children: str | |
|
302 | ||
|
303 | Example output: | |
|
304 | ||
|
305 | .. code-block:: bash | |
|
306 | ||
|
307 | id : <id_given_in_input> | |
|
308 | result: { | |
|
309 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
|
310 | "success": true | |
|
311 | } | |
|
312 | error: null | |
|
313 | ||
|
314 | Example error output: | |
|
315 | ||
|
316 | .. code-block:: bash | |
|
317 | ||
|
318 | id : <id_given_in_input> | |
|
319 | result : null | |
|
320 | error : { | |
|
321 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" | |
|
322 | } | |
|
323 | ||
|
324 | ||
|
325 | update_repo_group | |
|
326 | ----------------- | |
|
327 | ||
|
328 | .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, parent=<Optional:None>, enable_locking=<Optional:False>) | |
|
329 | ||
|
330 | Updates repository group with the details given. | |
|
331 | ||
|
332 | This command can only be run using an |authtoken| with admin | |
|
333 | permissions. | |
|
334 | ||
|
335 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
336 | :type apiuser: AuthUser | |
|
337 | :param repogroupid: Set the ID of repository group. | |
|
338 | :type repogroupid: str or int | |
|
339 | :param group_name: Set the name of the |repo| group. | |
|
340 | :type group_name: str | |
|
341 | :param description: Set a description for the group. | |
|
342 | :type description: str | |
|
343 | :param owner: Set the |repo| group owner. | |
|
344 | :type owner: str | |
|
345 | :param parent: Set the |repo| group parent. | |
|
346 | :type parent: str or int | |
|
347 | :param enable_locking: Enable |repo| locking. The default is false. | |
|
348 | :type enable_locking: bool | |
|
349 | ||
|
350 |
This diff has been collapsed as it changes many lines, (967 lines changed) Show them Hide them | |||
@@ -0,0 +1,967 b'' | |||
|
1 | .. _repo-methods-ref: | |
|
2 | ||
|
3 | repo methods | |
|
4 | ================= | |
|
5 | ||
|
6 | add_field_to_repo | |
|
7 | ----------------- | |
|
8 | ||
|
9 | .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>) | |
|
10 | ||
|
11 | Adds an extra field to a repository. | |
|
12 | ||
|
13 | This command can only be run using an |authtoken| with at least | |
|
14 | write permissions to the |repo|. | |
|
15 | ||
|
16 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
17 | :type apiuser: AuthUser | |
|
18 | :param repoid: Set the repository name or repository id. | |
|
19 | :type repoid: str or int | |
|
20 | :param key: Create a unique field key for this repository. | |
|
21 | :type key: str | |
|
22 | :param label: | |
|
23 | :type label: Optional(str) | |
|
24 | :param description: | |
|
25 | :type description: Optional(str) | |
|
26 | ||
|
27 | ||
|
28 | comment_commit | |
|
29 | -------------- | |
|
30 | ||
|
31 | .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>) | |
|
32 | ||
|
33 | Set a commit comment, and optionally change the status of the commit. | |
|
34 | ||
|
35 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
36 | :type apiuser: AuthUser | |
|
37 | :param repoid: Set the repository name or repository ID. | |
|
38 | :type repoid: str or int | |
|
39 | :param commit_id: Specify the commit_id for which to set a comment. | |
|
40 | :type commit_id: str | |
|
41 | :param message: The comment text. | |
|
42 | :type message: str | |
|
43 | :param userid: Set the user name of the comment creator. | |
|
44 | :type userid: Optional(str or int) | |
|
45 | :param status: status, one of 'not_reviewed', 'approved', 'rejected', | |
|
46 | 'under_review' | |
|
47 | :type status: str | |
|
48 | ||
|
49 | Example error output: | |
|
50 | ||
|
51 | .. code-block:: json | |
|
52 | ||
|
53 | { | |
|
54 | "id" : <id_given_in_input>, | |
|
55 | "result" : { | |
|
56 | "msg": "Commented on commit `<commit_id>` for repository `<repoid>`", | |
|
57 | "status_change": null or <status>, | |
|
58 | "success": true | |
|
59 | }, | |
|
60 | "error" : null | |
|
61 | } | |
|
62 | ||
|
63 | ||
|
64 | create_repo | |
|
65 | ----------- | |
|
66 | ||
|
67 | .. py:function:: create_repo(apiuser, repo_name, repo_type, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, copy_permissions=<Optional:False>) | |
|
68 | ||
|
69 | Creates a repository. | |
|
70 | ||
|
71 | * If the repository name contains "/", all the required repository | |
|
72 | groups will be created. | |
|
73 | ||
|
74 | For example "foo/bar/baz" will create |repo| groups "foo" and "bar" | |
|
75 | (with "foo" as parent). It will also create the "baz" repository | |
|
76 | with "bar" as |repo| group. | |
|
77 | ||
|
78 | This command can only be run using an |authtoken| with at least | |
|
79 | write permissions to the |repo|. | |
|
80 | ||
|
81 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
82 | :type apiuser: AuthUser | |
|
83 | :param repo_name: Set the repository name. | |
|
84 | :type repo_name: str | |
|
85 | :param repo_type: Set the repository type; 'hg','git', or 'svn'. | |
|
86 | :type repo_type: str | |
|
87 | :param owner: user_id or username | |
|
88 | :type owner: Optional(str) | |
|
89 | :param description: Set the repository description. | |
|
90 | :type description: Optional(str) | |
|
91 | :param private: | |
|
92 | :type private: bool | |
|
93 | :param clone_uri: | |
|
94 | :type clone_uri: str | |
|
95 | :param landing_rev: <rev_type>:<rev> | |
|
96 | :type landing_rev: str | |
|
97 | :param enable_locking: | |
|
98 | :type enable_locking: bool | |
|
99 | :param enable_downloads: | |
|
100 | :type enable_downloads: bool | |
|
101 | :param enable_statistics: | |
|
102 | :type enable_statistics: bool | |
|
103 | :param copy_permissions: Copy permission from group in which the | |
|
104 | repository is being created. | |
|
105 | :type copy_permissions: bool | |
|
106 | ||
|
107 | ||
|
108 | Example output: | |
|
109 | ||
|
110 | .. code-block:: bash | |
|
111 | ||
|
112 | id : <id_given_in_input> | |
|
113 | result: { | |
|
114 | "msg": "Created new repository `<reponame>`", | |
|
115 | "success": true, | |
|
116 | "task": "<celery task id or None if done sync>" | |
|
117 | } | |
|
118 | error: null | |
|
119 | ||
|
120 | ||
|
121 | Example error output: | |
|
122 | ||
|
123 | .. code-block:: bash | |
|
124 | ||
|
125 | id : <id_given_in_input> | |
|
126 | result : null | |
|
127 | error : { | |
|
128 | 'failed to create repository `<repo_name>` | |
|
129 | } | |
|
130 | ||
|
131 | ||
|
132 | delete_repo | |
|
133 | ----------- | |
|
134 | ||
|
135 | .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>) | |
|
136 | ||
|
137 | Deletes a repository. | |
|
138 | ||
|
139 | * When the `forks` parameter is set it's possible to detach or delete | |
|
140 | forks of deleted repository. | |
|
141 | ||
|
142 | This command can only be run using an |authtoken| with admin | |
|
143 | permissions on the |repo|. | |
|
144 | ||
|
145 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
146 | :type apiuser: AuthUser | |
|
147 | :param repoid: Set the repository name or repository ID. | |
|
148 | :type repoid: str or int | |
|
149 | :param forks: Set to `detach` or `delete` forks from the |repo|. | |
|
150 | :type forks: Optional(str) | |
|
151 | ||
|
152 | Example error output: | |
|
153 | ||
|
154 | .. code-block:: bash | |
|
155 | ||
|
156 | id : <id_given_in_input> | |
|
157 | result: { | |
|
158 | "msg": "Deleted repository `<reponame>`", | |
|
159 | "success": true | |
|
160 | } | |
|
161 | error: null | |
|
162 | ||
|
163 | ||
|
164 | fork_repo | |
|
165 | --------- | |
|
166 | ||
|
167 | .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, copy_permissions=<Optional:False>, private=<Optional:False>, landing_rev=<Optional:'rev:tip'>) | |
|
168 | ||
|
169 | Creates a fork of the specified |repo|. | |
|
170 | ||
|
171 | * If using |RCE| with Celery this will immediately return a success | |
|
172 | message, even though the fork will be created asynchronously. | |
|
173 | ||
|
174 | This command can only be run using an |authtoken| with fork | |
|
175 | permissions on the |repo|. | |
|
176 | ||
|
177 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
178 | :type apiuser: AuthUser | |
|
179 | :param repoid: Set repository name or repository ID. | |
|
180 | :type repoid: str or int | |
|
181 | :param fork_name: Set the fork name. | |
|
182 | :type fork_name: str | |
|
183 | :param owner: Set the fork owner. | |
|
184 | :type owner: str | |
|
185 | :param description: Set the fork descripton. | |
|
186 | :type description: str | |
|
187 | :param copy_permissions: Copy permissions from parent |repo|. The | |
|
188 | default is False. | |
|
189 | :type copy_permissions: bool | |
|
190 | :param private: Make the fork private. The default is False. | |
|
191 | :type private: bool | |
|
192 | :param landing_rev: Set the landing revision. The default is tip. | |
|
193 | ||
|
194 | Example output: | |
|
195 | ||
|
196 | .. code-block:: bash | |
|
197 | ||
|
198 | id : <id_for_response> | |
|
199 | api_key : "<api_key>" | |
|
200 | args: { | |
|
201 | "repoid" : "<reponame or repo_id>", | |
|
202 | "fork_name": "<forkname>", | |
|
203 | "owner": "<username or user_id = Optional(=apiuser)>", | |
|
204 | "description": "<description>", | |
|
205 | "copy_permissions": "<bool>", | |
|
206 | "private": "<bool>", | |
|
207 | "landing_rev": "<landing_rev>" | |
|
208 | } | |
|
209 | ||
|
210 | Example error output: | |
|
211 | ||
|
212 | .. code-block:: bash | |
|
213 | ||
|
214 | id : <id_given_in_input> | |
|
215 | result: { | |
|
216 | "msg": "Created fork of `<reponame>` as `<forkname>`", | |
|
217 | "success": true, | |
|
218 | "task": "<celery task id or None if done sync>" | |
|
219 | } | |
|
220 | error: null | |
|
221 | ||
|
222 | ||
|
223 | get_repo | |
|
224 | -------- | |
|
225 | ||
|
226 | .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>) | |
|
227 | ||
|
228 | Gets an existing repository by its name or repository_id. | |
|
229 | ||
|
230 | The members section so the output returns users groups or users | |
|
231 | associated with that repository. | |
|
232 | ||
|
233 | This command can only be run using an |authtoken| with admin rights, | |
|
234 | or users with at least read rights to the |repo|. | |
|
235 | ||
|
236 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
237 | :type apiuser: AuthUser | |
|
238 | :param repoid: The repository name or repository id. | |
|
239 | :type repoid: str or int | |
|
240 | :param cache: use the cached value for last changeset | |
|
241 | :type: cache: Optional(bool) | |
|
242 | ||
|
243 | Example output: | |
|
244 | ||
|
245 | .. code-block:: bash | |
|
246 | ||
|
247 | { | |
|
248 | "error": null, | |
|
249 | "id": <repo_id>, | |
|
250 | "result": { | |
|
251 | "clone_uri": null, | |
|
252 | "created_on": "timestamp", | |
|
253 | "description": "repo description", | |
|
254 | "enable_downloads": false, | |
|
255 | "enable_locking": false, | |
|
256 | "enable_statistics": false, | |
|
257 | "followers": [ | |
|
258 | { | |
|
259 | "active": true, | |
|
260 | "admin": false, | |
|
261 | "api_key": "****************************************", | |
|
262 | "api_keys": [ | |
|
263 | "****************************************" | |
|
264 | ], | |
|
265 | "email": "user@example.com", | |
|
266 | "emails": [ | |
|
267 | "user@example.com" | |
|
268 | ], | |
|
269 | "extern_name": "rhodecode", | |
|
270 | "extern_type": "rhodecode", | |
|
271 | "firstname": "username", | |
|
272 | "ip_addresses": [], | |
|
273 | "language": null, | |
|
274 | "last_login": "2015-09-16T17:16:35.854", | |
|
275 | "lastname": "surname", | |
|
276 | "user_id": <user_id>, | |
|
277 | "username": "name" | |
|
278 | } | |
|
279 | ], | |
|
280 | "fork_of": "parent-repo", | |
|
281 | "landing_rev": [ | |
|
282 | "rev", | |
|
283 | "tip" | |
|
284 | ], | |
|
285 | "last_changeset": { | |
|
286 | "author": "User <user@example.com>", | |
|
287 | "branch": "default", | |
|
288 | "date": "timestamp", | |
|
289 | "message": "last commit message", | |
|
290 | "parents": [ | |
|
291 | { | |
|
292 | "raw_id": "commit-id" | |
|
293 | } | |
|
294 | ], | |
|
295 | "raw_id": "commit-id", | |
|
296 | "revision": <revision number>, | |
|
297 | "short_id": "short id" | |
|
298 | }, | |
|
299 | "lock_reason": null, | |
|
300 | "locked_by": null, | |
|
301 | "locked_date": null, | |
|
302 | "members": [ | |
|
303 | { | |
|
304 | "name": "super-admin-name", | |
|
305 | "origin": "super-admin", | |
|
306 | "permission": "repository.admin", | |
|
307 | "type": "user" | |
|
308 | }, | |
|
309 | { | |
|
310 | "name": "owner-name", | |
|
311 | "origin": "owner", | |
|
312 | "permission": "repository.admin", | |
|
313 | "type": "user" | |
|
314 | }, | |
|
315 | { | |
|
316 | "name": "user-group-name", | |
|
317 | "origin": "permission", | |
|
318 | "permission": "repository.write", | |
|
319 | "type": "user_group" | |
|
320 | } | |
|
321 | ], | |
|
322 | "owner": "owner-name", | |
|
323 | "permissions": [ | |
|
324 | { | |
|
325 | "name": "super-admin-name", | |
|
326 | "origin": "super-admin", | |
|
327 | "permission": "repository.admin", | |
|
328 | "type": "user" | |
|
329 | }, | |
|
330 | { | |
|
331 | "name": "owner-name", | |
|
332 | "origin": "owner", | |
|
333 | "permission": "repository.admin", | |
|
334 | "type": "user" | |
|
335 | }, | |
|
336 | { | |
|
337 | "name": "user-group-name", | |
|
338 | "origin": "permission", | |
|
339 | "permission": "repository.write", | |
|
340 | "type": "user_group" | |
|
341 | } | |
|
342 | ], | |
|
343 | "private": true, | |
|
344 | "repo_id": 676, | |
|
345 | "repo_name": "user-group/repo-name", | |
|
346 | "repo_type": "hg" | |
|
347 | } | |
|
348 | } | |
|
349 | ||
|
350 | ||
|
351 | get_repo_changeset | |
|
352 | ------------------ | |
|
353 | ||
|
354 | .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>) | |
|
355 | ||
|
356 | Returns information about a changeset. | |
|
357 | ||
|
358 | Additionally parameters define the amount of details returned by | |
|
359 | this function. | |
|
360 | ||
|
361 | This command can only be run using an |authtoken| with admin rights, | |
|
362 | or users with at least read rights to the |repo|. | |
|
363 | ||
|
364 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
365 | :type apiuser: AuthUser | |
|
366 | :param repoid: The repository name or repository id | |
|
367 | :type repoid: str or int | |
|
368 | :param revision: revision for which listing should be done | |
|
369 | :type revision: str | |
|
370 | :param details: details can be 'basic|extended|full' full gives diff | |
|
371 | info details like the diff itself, and number of changed files etc. | |
|
372 | :type details: Optional(str) | |
|
373 | ||
|
374 | ||
|
375 | get_repo_changesets | |
|
376 | ------------------- | |
|
377 | ||
|
378 | .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>) | |
|
379 | ||
|
380 | Returns a set of commits limited by the number starting | |
|
381 | from the `start_rev` option. | |
|
382 | ||
|
383 | Additional parameters define the amount of details returned by this | |
|
384 | function. | |
|
385 | ||
|
386 | This command can only be run using an |authtoken| with admin rights, | |
|
387 | or users with at least read rights to |repos|. | |
|
388 | ||
|
389 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
390 | :type apiuser: AuthUser | |
|
391 | :param repoid: The repository name or repository ID. | |
|
392 | :type repoid: str or int | |
|
393 | :param start_rev: The starting revision from where to get changesets. | |
|
394 | :type start_rev: str | |
|
395 | :param limit: Limit the number of commits to this amount | |
|
396 | :type limit: str or int | |
|
397 | :param details: Set the level of detail returned. Valid option are: | |
|
398 | ``basic``, ``extended`` and ``full``. | |
|
399 | :type details: Optional(str) | |
|
400 | ||
|
401 | .. note:: | |
|
402 | ||
|
403 | Setting the parameter `details` to the value ``full`` is extensive | |
|
404 | and returns details like the diff itself, and the number | |
|
405 | of changed files. | |
|
406 | ||
|
407 | ||
|
408 | get_repo_nodes | |
|
409 | -------------- | |
|
410 | ||
|
411 | .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>, max_file_bytes=<Optional:None>) | |
|
412 | ||
|
413 | Returns a list of nodes and children in a flat list for a given | |
|
414 | path at given revision. | |
|
415 | ||
|
416 | It's possible to specify ret_type to show only `files` or `dirs`. | |
|
417 | ||
|
418 | This command can only be run using an |authtoken| with admin rights, | |
|
419 | or users with at least read rights to |repos|. | |
|
420 | ||
|
421 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
422 | :type apiuser: AuthUser | |
|
423 | :param repoid: The repository name or repository ID. | |
|
424 | :type repoid: str or int | |
|
425 | :param revision: The revision for which listing should be done. | |
|
426 | :type revision: str | |
|
427 | :param root_path: The path from which to start displaying. | |
|
428 | :type root_path: str | |
|
429 | :param ret_type: Set the return type. Valid options are | |
|
430 | ``all`` (default), ``files`` and ``dirs``. | |
|
431 | :type ret_type: Optional(str) | |
|
432 | :param details: Returns extended information about nodes, such as | |
|
433 | md5, binary, and or content. The valid options are ``basic`` and | |
|
434 | ``full``. | |
|
435 | :type details: Optional(str) | |
|
436 | :param max_file_bytes: Only return file content under this file size bytes | |
|
437 | :type details: Optional(int) | |
|
438 | ||
|
439 | Example output: | |
|
440 | ||
|
441 | .. code-block:: bash | |
|
442 | ||
|
443 | id : <id_given_in_input> | |
|
444 | result: [ | |
|
445 | { | |
|
446 | "name" : "<name>" | |
|
447 | "type" : "<type>", | |
|
448 | "binary": "<true|false>" (only in extended mode) | |
|
449 | "md5" : "<md5 of file content>" (only in extended mode) | |
|
450 | }, | |
|
451 | ... | |
|
452 | ] | |
|
453 | error: null | |
|
454 | ||
|
455 | ||
|
456 | get_repo_refs | |
|
457 | ------------- | |
|
458 | ||
|
459 | .. py:function:: get_repo_refs(apiuser, repoid) | |
|
460 | ||
|
461 | Returns a dictionary of current references. It returns | |
|
462 | bookmarks, branches, closed_branches, and tags for given repository | |
|
463 | ||
|
464 | It's possible to specify ret_type to show only `files` or `dirs`. | |
|
465 | ||
|
466 | This command can only be run using an |authtoken| with admin rights, | |
|
467 | or users with at least read rights to |repos|. | |
|
468 | ||
|
469 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
470 | :type apiuser: AuthUser | |
|
471 | :param repoid: The repository name or repository ID. | |
|
472 | :type repoid: str or int | |
|
473 | ||
|
474 | Example output: | |
|
475 | ||
|
476 | .. code-block:: bash | |
|
477 | ||
|
478 | id : <id_given_in_input> | |
|
479 | result: [ | |
|
480 | TODO... | |
|
481 | ] | |
|
482 | error: null | |
|
483 | ||
|
484 | ||
|
485 | get_repo_settings | |
|
486 | ----------------- | |
|
487 | ||
|
488 | .. py:function:: get_repo_settings(apiuser, repoid, key=<Optional:None>) | |
|
489 | ||
|
490 | Returns all settings for a repository. If key is given it only returns the | |
|
491 | setting identified by the key or null. | |
|
492 | ||
|
493 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
494 | :type apiuser: AuthUser | |
|
495 | :param repoid: The repository name or repository id. | |
|
496 | :type repoid: str or int | |
|
497 | :param key: Key of the setting to return. | |
|
498 | :type: key: Optional(str) | |
|
499 | ||
|
500 | Example output: | |
|
501 | ||
|
502 | .. code-block:: bash | |
|
503 | ||
|
504 | { | |
|
505 | "error": null, | |
|
506 | "id": 237, | |
|
507 | "result": { | |
|
508 | "extensions_largefiles": true, | |
|
509 | "hooks_changegroup_push_logger": true, | |
|
510 | "hooks_changegroup_repo_size": false, | |
|
511 | "hooks_outgoing_pull_logger": true, | |
|
512 | "phases_publish": "True", | |
|
513 | "rhodecode_hg_use_rebase_for_merging": true, | |
|
514 | "rhodecode_pr_merge_enabled": true, | |
|
515 | "rhodecode_use_outdated_comments": true | |
|
516 | } | |
|
517 | } | |
|
518 | ||
|
519 | ||
|
520 | get_repos | |
|
521 | --------- | |
|
522 | ||
|
523 | .. py:function:: get_repos(apiuser) | |
|
524 | ||
|
525 | Lists all existing repositories. | |
|
526 | ||
|
527 | This command can only be run using an |authtoken| with admin rights, | |
|
528 | or users with at least read rights to |repos|. | |
|
529 | ||
|
530 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
531 | :type apiuser: AuthUser | |
|
532 | ||
|
533 | Example output: | |
|
534 | ||
|
535 | .. code-block:: bash | |
|
536 | ||
|
537 | id : <id_given_in_input> | |
|
538 | result: [ | |
|
539 | { | |
|
540 | "repo_id" : "<repo_id>", | |
|
541 | "repo_name" : "<reponame>" | |
|
542 | "repo_type" : "<repo_type>", | |
|
543 | "clone_uri" : "<clone_uri>", | |
|
544 | "private": : "<bool>", | |
|
545 | "created_on" : "<datetimecreated>", | |
|
546 | "description" : "<description>", | |
|
547 | "landing_rev": "<landing_rev>", | |
|
548 | "owner": "<repo_owner>", | |
|
549 | "fork_of": "<name_of_fork_parent>", | |
|
550 | "enable_downloads": "<bool>", | |
|
551 | "enable_locking": "<bool>", | |
|
552 | "enable_statistics": "<bool>", | |
|
553 | }, | |
|
554 | ... | |
|
555 | ] | |
|
556 | error: null | |
|
557 | ||
|
558 | ||
|
559 | grant_user_group_permission | |
|
560 | --------------------------- | |
|
561 | ||
|
562 | .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm) | |
|
563 | ||
|
564 | Grant permission for a user group on the specified repository, | |
|
565 | or update existing permissions. | |
|
566 | ||
|
567 | This command can only be run using an |authtoken| with admin | |
|
568 | permissions on the |repo|. | |
|
569 | ||
|
570 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
571 | :type apiuser: AuthUser | |
|
572 | :param repoid: Set the repository name or repository ID. | |
|
573 | :type repoid: str or int | |
|
574 | :param usergroupid: Specify the ID of the user group. | |
|
575 | :type usergroupid: str or int | |
|
576 | :param perm: Set the user group permissions using the following | |
|
577 | format: (repository.(none|read|write|admin)) | |
|
578 | :type perm: str | |
|
579 | ||
|
580 | Example output: | |
|
581 | ||
|
582 | .. code-block:: bash | |
|
583 | ||
|
584 | id : <id_given_in_input> | |
|
585 | result : { | |
|
586 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", | |
|
587 | "success": true | |
|
588 | ||
|
589 | } | |
|
590 | error : null | |
|
591 | ||
|
592 | Example error output: | |
|
593 | ||
|
594 | .. code-block:: bash | |
|
595 | ||
|
596 | id : <id_given_in_input> | |
|
597 | result : null | |
|
598 | error : { | |
|
599 | "failed to edit permission for user group: `<usergroup>` in repo `<repo>`' | |
|
600 | } | |
|
601 | ||
|
602 | ||
|
603 | grant_user_permission | |
|
604 | --------------------- | |
|
605 | ||
|
606 | .. py:function:: grant_user_permission(apiuser, repoid, userid, perm) | |
|
607 | ||
|
608 | Grant permissions for the specified user on the given repository, | |
|
609 | or update existing permissions if found. | |
|
610 | ||
|
611 | This command can only be run using an |authtoken| with admin | |
|
612 | permissions on the |repo|. | |
|
613 | ||
|
614 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
615 | :type apiuser: AuthUser | |
|
616 | :param repoid: Set the repository name or repository ID. | |
|
617 | :type repoid: str or int | |
|
618 | :param userid: Set the user name. | |
|
619 | :type userid: str | |
|
620 | :param perm: Set the user permissions, using the following format | |
|
621 | ``(repository.(none|read|write|admin))`` | |
|
622 | :type perm: str | |
|
623 | ||
|
624 | Example output: | |
|
625 | ||
|
626 | .. code-block:: bash | |
|
627 | ||
|
628 | id : <id_given_in_input> | |
|
629 | result: { | |
|
630 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", | |
|
631 | "success": true | |
|
632 | } | |
|
633 | error: null | |
|
634 | ||
|
635 | ||
|
636 | invalidate_cache | |
|
637 | ---------------- | |
|
638 | ||
|
639 | .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>) | |
|
640 | ||
|
641 | Invalidates the cache for the specified repository. | |
|
642 | ||
|
643 | This command can only be run using an |authtoken| with admin rights to | |
|
644 | the specified repository. | |
|
645 | ||
|
646 | This command takes the following options: | |
|
647 | ||
|
648 | :param apiuser: This is filled automatically from |authtoken|. | |
|
649 | :type apiuser: AuthUser | |
|
650 | :param repoid: Sets the repository name or repository ID. | |
|
651 | :type repoid: str or int | |
|
652 | :param delete_keys: This deletes the invalidated keys instead of | |
|
653 | just flagging them. | |
|
654 | :type delete_keys: Optional(``True`` | ``False``) | |
|
655 | ||
|
656 | Example output: | |
|
657 | ||
|
658 | .. code-block:: bash | |
|
659 | ||
|
660 | id : <id_given_in_input> | |
|
661 | result : { | |
|
662 | 'msg': Cache for repository `<repository name>` was invalidated, | |
|
663 | 'repository': <repository name> | |
|
664 | } | |
|
665 | error : null | |
|
666 | ||
|
667 | Example error output: | |
|
668 | ||
|
669 | .. code-block:: bash | |
|
670 | ||
|
671 | id : <id_given_in_input> | |
|
672 | result : null | |
|
673 | error : { | |
|
674 | 'Error occurred during cache invalidation action' | |
|
675 | } | |
|
676 | ||
|
677 | ||
|
678 | lock | |
|
679 | ---- | |
|
680 | ||
|
681 | .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
682 | ||
|
683 | Sets the lock state of the specified |repo| by the given user. | |
|
684 | From more information, see :ref:`repo-locking`. | |
|
685 | ||
|
686 | * If the ``userid`` option is not set, the repository is locked to the | |
|
687 | user who called the method. | |
|
688 | * If the ``locked`` parameter is not set, the current lock state of the | |
|
689 | repository is displayed. | |
|
690 | ||
|
691 | This command can only be run using an |authtoken| with admin rights to | |
|
692 | the specified repository. | |
|
693 | ||
|
694 | This command takes the following options: | |
|
695 | ||
|
696 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
697 | :type apiuser: AuthUser | |
|
698 | :param repoid: Sets the repository name or repository ID. | |
|
699 | :type repoid: str or int | |
|
700 | :param locked: Sets the lock state. | |
|
701 | :type locked: Optional(``True`` | ``False``) | |
|
702 | :param userid: Set the repository lock to this user. | |
|
703 | :type userid: Optional(str or int) | |
|
704 | ||
|
705 | Example error output: | |
|
706 | ||
|
707 | .. code-block:: bash | |
|
708 | ||
|
709 | id : <id_given_in_input> | |
|
710 | result : { | |
|
711 | 'repo': '<reponame>', | |
|
712 | 'locked': <bool: lock state>, | |
|
713 | 'locked_since': <int: lock timestamp>, | |
|
714 | 'locked_by': <username of person who made the lock>, | |
|
715 | 'lock_reason': <str: reason for locking>, | |
|
716 | 'lock_state_changed': <bool: True if lock state has been changed in this request>, | |
|
717 | 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.' | |
|
718 | or | |
|
719 | 'msg': 'Repo `<repository name>` not locked.' | |
|
720 | or | |
|
721 | 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`' | |
|
722 | } | |
|
723 | error : null | |
|
724 | ||
|
725 | Example error output: | |
|
726 | ||
|
727 | .. code-block:: bash | |
|
728 | ||
|
729 | id : <id_given_in_input> | |
|
730 | result : null | |
|
731 | error : { | |
|
732 | 'Error occurred locking repository `<reponame>` | |
|
733 | } | |
|
734 | ||
|
735 | ||
|
736 | pull | |
|
737 | ---- | |
|
738 | ||
|
739 | .. py:function:: pull(apiuser, repoid) | |
|
740 | ||
|
741 | Triggers a pull on the given repository from a remote location. You | |
|
742 | can use this to keep remote repositories up-to-date. | |
|
743 | ||
|
744 | This command can only be run using an |authtoken| with admin | |
|
745 | rights to the specified repository. For more information, | |
|
746 | see :ref:`config-token-ref`. | |
|
747 | ||
|
748 | This command takes the following options: | |
|
749 | ||
|
750 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
751 | :type apiuser: AuthUser | |
|
752 | :param repoid: The repository name or repository ID. | |
|
753 | :type repoid: str or int | |
|
754 | ||
|
755 | Example output: | |
|
756 | ||
|
757 | .. code-block:: bash | |
|
758 | ||
|
759 | id : <id_given_in_input> | |
|
760 | result : { | |
|
761 | "msg": "Pulled from `<repository name>`" | |
|
762 | "repository": "<repository name>" | |
|
763 | } | |
|
764 | error : null | |
|
765 | ||
|
766 | Example error output: | |
|
767 | ||
|
768 | .. code-block:: bash | |
|
769 | ||
|
770 | id : <id_given_in_input> | |
|
771 | result : null | |
|
772 | error : { | |
|
773 | "Unable to pull changes from `<reponame>`" | |
|
774 | } | |
|
775 | ||
|
776 | ||
|
777 | remove_field_from_repo | |
|
778 | ---------------------- | |
|
779 | ||
|
780 | .. py:function:: remove_field_from_repo(apiuser, repoid, key) | |
|
781 | ||
|
782 | Removes an extra field from a repository. | |
|
783 | ||
|
784 | This command can only be run using an |authtoken| with at least | |
|
785 | write permissions to the |repo|. | |
|
786 | ||
|
787 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
788 | :type apiuser: AuthUser | |
|
789 | :param repoid: Set the repository name or repository ID. | |
|
790 | :type repoid: str or int | |
|
791 | :param key: Set the unique field key for this repository. | |
|
792 | :type key: str | |
|
793 | ||
|
794 | ||
|
795 | revoke_user_group_permission | |
|
796 | ---------------------------- | |
|
797 | ||
|
798 | .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid) | |
|
799 | ||
|
800 | Revoke the permissions of a user group on a given repository. | |
|
801 | ||
|
802 | This command can only be run using an |authtoken| with admin | |
|
803 | permissions on the |repo|. | |
|
804 | ||
|
805 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
806 | :type apiuser: AuthUser | |
|
807 | :param repoid: Set the repository name or repository ID. | |
|
808 | :type repoid: str or int | |
|
809 | :param usergroupid: Specify the user group ID. | |
|
810 | :type usergroupid: str or int | |
|
811 | ||
|
812 | Example output: | |
|
813 | ||
|
814 | .. code-block:: bash | |
|
815 | ||
|
816 | id : <id_given_in_input> | |
|
817 | result: { | |
|
818 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", | |
|
819 | "success": true | |
|
820 | } | |
|
821 | error: null | |
|
822 | ||
|
823 | ||
|
824 | revoke_user_permission | |
|
825 | ---------------------- | |
|
826 | ||
|
827 | .. py:function:: revoke_user_permission(apiuser, repoid, userid) | |
|
828 | ||
|
829 | Revoke permission for a user on the specified repository. | |
|
830 | ||
|
831 | This command can only be run using an |authtoken| with admin | |
|
832 | permissions on the |repo|. | |
|
833 | ||
|
834 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
835 | :type apiuser: AuthUser | |
|
836 | :param repoid: Set the repository name or repository ID. | |
|
837 | :type repoid: str or int | |
|
838 | :param userid: Set the user name of revoked user. | |
|
839 | :type userid: str or int | |
|
840 | ||
|
841 | Example error output: | |
|
842 | ||
|
843 | .. code-block:: bash | |
|
844 | ||
|
845 | id : <id_given_in_input> | |
|
846 | result: { | |
|
847 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", | |
|
848 | "success": true | |
|
849 | } | |
|
850 | error: null | |
|
851 | ||
|
852 | ||
|
853 | set_repo_settings | |
|
854 | ----------------- | |
|
855 | ||
|
856 | .. py:function:: set_repo_settings(apiuser, repoid, settings) | |
|
857 | ||
|
858 | Update repository settings. Returns true on success. | |
|
859 | ||
|
860 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
861 | :type apiuser: AuthUser | |
|
862 | :param repoid: The repository name or repository id. | |
|
863 | :type repoid: str or int | |
|
864 | :param settings: The new settings for the repository. | |
|
865 | :type: settings: dict | |
|
866 | ||
|
867 | Example output: | |
|
868 | ||
|
869 | .. code-block:: bash | |
|
870 | ||
|
871 | { | |
|
872 | "error": null, | |
|
873 | "id": 237, | |
|
874 | "result": true | |
|
875 | } | |
|
876 | ||
|
877 | ||
|
878 | strip | |
|
879 | ----- | |
|
880 | ||
|
881 | .. py:function:: strip(apiuser, repoid, revision, branch) | |
|
882 | ||
|
883 | Strips the given revision from the specified repository. | |
|
884 | ||
|
885 | * This will remove the revision and all of its decendants. | |
|
886 | ||
|
887 | This command can only be run using an |authtoken| with admin rights to | |
|
888 | the specified repository. | |
|
889 | ||
|
890 | This command takes the following options: | |
|
891 | ||
|
892 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
893 | :type apiuser: AuthUser | |
|
894 | :param repoid: The repository name or repository ID. | |
|
895 | :type repoid: str or int | |
|
896 | :param revision: The revision you wish to strip. | |
|
897 | :type revision: str | |
|
898 | :param branch: The branch from which to strip the revision. | |
|
899 | :type branch: str | |
|
900 | ||
|
901 | Example output: | |
|
902 | ||
|
903 | .. code-block:: bash | |
|
904 | ||
|
905 | id : <id_given_in_input> | |
|
906 | result : { | |
|
907 | "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'" | |
|
908 | "repository": "<repository name>" | |
|
909 | } | |
|
910 | error : null | |
|
911 | ||
|
912 | Example error output: | |
|
913 | ||
|
914 | .. code-block:: bash | |
|
915 | ||
|
916 | id : <id_given_in_input> | |
|
917 | result : null | |
|
918 | error : { | |
|
919 | "Unable to strip commit <commit_hash> from repo `<repository name>`" | |
|
920 | } | |
|
921 | ||
|
922 | ||
|
923 | update_repo | |
|
924 | ----------- | |
|
925 | ||
|
926 | .. py:function:: update_repo(apiuser, repoid, name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, group=<Optional:None>, fork_of=<Optional:None>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>) | |
|
927 | ||
|
928 | Updates a repository with the given information. | |
|
929 | ||
|
930 | This command can only be run using an |authtoken| with at least | |
|
931 | write permissions to the |repo|. | |
|
932 | ||
|
933 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
934 | :type apiuser: AuthUser | |
|
935 | :param repoid: repository name or repository ID. | |
|
936 | :type repoid: str or int | |
|
937 | :param name: Update the |repo| name. | |
|
938 | :type name: str | |
|
939 | :param owner: Set the |repo| owner. | |
|
940 | :type owner: str | |
|
941 | :param group: Set the |repo| group the |repo| belongs to. | |
|
942 | :type group: str | |
|
943 | :param fork_of: Set the master |repo| name. | |
|
944 | :type fork_of: str | |
|
945 | :param description: Update the |repo| description. | |
|
946 | :type description: str | |
|
947 | :param private: Set the |repo| as private. (True | False) | |
|
948 | :type private: bool | |
|
949 | :param clone_uri: Update the |repo| clone URI. | |
|
950 | :type clone_uri: str | |
|
951 | :param landing_rev: Set the |repo| landing revision. Default is | |
|
952 | ``tip``. | |
|
953 | :type landing_rev: str | |
|
954 | :param enable_statistics: Enable statistics on the |repo|, | |
|
955 | (True | False). | |
|
956 | :type enable_statistics: bool | |
|
957 | :param enable_locking: Enable |repo| locking. | |
|
958 | :type enable_locking: bool | |
|
959 | :param enable_downloads: Enable downloads from the |repo|, | |
|
960 | (True | False). | |
|
961 | :type enable_downloads: bool | |
|
962 | :param fields: Add extra fields to the |repo|. Use the following | |
|
963 | example format: ``field_key=field_val,field_key2=fieldval2``. | |
|
964 | Escape ', ' with \, | |
|
965 | :type fields: str | |
|
966 | ||
|
967 |
@@ -0,0 +1,115 b'' | |||
|
1 | .. _server-methods-ref: | |
|
2 | ||
|
3 | server methods | |
|
4 | ================= | |
|
5 | ||
|
6 | get_ip | |
|
7 | ------ | |
|
8 | ||
|
9 | .. py:function:: get_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
10 | ||
|
11 | Displays the IP Address as seen from the |RCE| server. | |
|
12 | ||
|
13 | * This command displays the IP Address, as well as all the defined IP | |
|
14 | addresses for the specified user. If the ``userid`` is not set, the | |
|
15 | data returned is for the user calling the method. | |
|
16 | ||
|
17 | This command can only be run using an |authtoken| with admin rights to | |
|
18 | the specified repository. | |
|
19 | ||
|
20 | This command takes the following options: | |
|
21 | ||
|
22 | :param apiuser: This is filled automatically from |authtoken|. | |
|
23 | :type apiuser: AuthUser | |
|
24 | :param userid: Sets the userid for which associated IP Address data | |
|
25 | is returned. | |
|
26 | :type userid: Optional(str or int) | |
|
27 | ||
|
28 | Example output: | |
|
29 | ||
|
30 | .. code-block:: bash | |
|
31 | ||
|
32 | id : <id_given_in_input> | |
|
33 | result : { | |
|
34 | "server_ip_addr": "<ip_from_clien>", | |
|
35 | "user_ips": [ | |
|
36 | { | |
|
37 | "ip_addr": "<ip_with_mask>", | |
|
38 | "ip_range": ["<start_ip>", "<end_ip>"], | |
|
39 | }, | |
|
40 | ... | |
|
41 | ] | |
|
42 | } | |
|
43 | ||
|
44 | ||
|
45 | get_server_info | |
|
46 | --------------- | |
|
47 | ||
|
48 | .. py:function:: get_server_info(apiuser) | |
|
49 | ||
|
50 | Returns the |RCE| server information. | |
|
51 | ||
|
52 | This includes the running version of |RCE| and all installed | |
|
53 | packages. This command takes the following options: | |
|
54 | ||
|
55 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
56 | :type apiuser: AuthUser | |
|
57 | ||
|
58 | Example output: | |
|
59 | ||
|
60 | .. code-block:: bash | |
|
61 | ||
|
62 | id : <id_given_in_input> | |
|
63 | result : { | |
|
64 | 'modules': [<module name>,...] | |
|
65 | 'py_version': <python version>, | |
|
66 | 'platform': <platform type>, | |
|
67 | 'rhodecode_version': <rhodecode version> | |
|
68 | } | |
|
69 | error : null | |
|
70 | ||
|
71 | ||
|
72 | rescan_repos | |
|
73 | ------------ | |
|
74 | ||
|
75 | .. py:function:: rescan_repos(apiuser, remove_obsolete=<Optional:False>) | |
|
76 | ||
|
77 | Triggers a rescan of the specified repositories. | |
|
78 | ||
|
79 | * If the ``remove_obsolete`` option is set, it also deletes repositories | |
|
80 | that are found in the database but not on the file system, so called | |
|
81 | "clean zombies". | |
|
82 | ||
|
83 | This command can only be run using an |authtoken| with admin rights to | |
|
84 | the specified repository. | |
|
85 | ||
|
86 | This command takes the following options: | |
|
87 | ||
|
88 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
89 | :type apiuser: AuthUser | |
|
90 | :param remove_obsolete: Deletes repositories from the database that | |
|
91 | are not found on the filesystem. | |
|
92 | :type remove_obsolete: Optional(``True`` | ``False``) | |
|
93 | ||
|
94 | Example output: | |
|
95 | ||
|
96 | .. code-block:: bash | |
|
97 | ||
|
98 | id : <id_given_in_input> | |
|
99 | result : { | |
|
100 | 'added': [<added repository name>,...] | |
|
101 | 'removed': [<removed repository name>,...] | |
|
102 | } | |
|
103 | error : null | |
|
104 | ||
|
105 | Example error output: | |
|
106 | ||
|
107 | .. code-block:: bash | |
|
108 | ||
|
109 | id : <id_given_in_input> | |
|
110 | result : null | |
|
111 | error : { | |
|
112 | 'Error occurred during rescan repositories action' | |
|
113 | } | |
|
114 | ||
|
115 |
@@ -0,0 +1,406 b'' | |||
|
1 | .. _user-group-methods-ref: | |
|
2 | ||
|
3 | user_group methods | |
|
4 | ================= | |
|
5 | ||
|
6 | add_user_to_user_group | |
|
7 | ---------------------- | |
|
8 | ||
|
9 | .. py:function:: add_user_to_user_group(apiuser, usergroupid, userid) | |
|
10 | ||
|
11 | Adds a user to a `user group`. If the user already exists in the group | |
|
12 | this command will return false. | |
|
13 | ||
|
14 | This command can only be run using an |authtoken| with admin rights to | |
|
15 | the specified user group. | |
|
16 | ||
|
17 | This command takes the following options: | |
|
18 | ||
|
19 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
20 | :type apiuser: AuthUser | |
|
21 | :param usergroupid: Set the name of the `user group` to which a | |
|
22 | user will be added. | |
|
23 | :type usergroupid: int | |
|
24 | :param userid: Set the `user_id` of the user to add to the group. | |
|
25 | :type userid: int | |
|
26 | ||
|
27 | Example output: | |
|
28 | ||
|
29 | .. code-block:: bash | |
|
30 | ||
|
31 | id : <id_given_in_input> | |
|
32 | result : { | |
|
33 | "success": True|False # depends on if member is in group | |
|
34 | "msg": "added member `<username>` to user group `<groupname>` | | |
|
35 | User is already in that group" | |
|
36 | ||
|
37 | } | |
|
38 | error : null | |
|
39 | ||
|
40 | Example error output: | |
|
41 | ||
|
42 | .. code-block:: bash | |
|
43 | ||
|
44 | id : <id_given_in_input> | |
|
45 | result : null | |
|
46 | error : { | |
|
47 | "failed to add member to user group `<user_group_name>`" | |
|
48 | } | |
|
49 | ||
|
50 | ||
|
51 | create_user_group | |
|
52 | ----------------- | |
|
53 | ||
|
54 | .. py:function:: create_user_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, active=<Optional:True>) | |
|
55 | ||
|
56 | Creates a new user group. | |
|
57 | ||
|
58 | This command can only be run using an |authtoken| with admin rights to | |
|
59 | the specified repository. | |
|
60 | ||
|
61 | This command takes the following options: | |
|
62 | ||
|
63 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
64 | :type apiuser: AuthUser | |
|
65 | :param group_name: Set the name of the new user group. | |
|
66 | :type group_name: str | |
|
67 | :param description: Give a description of the new user group. | |
|
68 | :type description: str | |
|
69 | :param owner: Set the owner of the new user group. | |
|
70 | If not set, the owner is the |authtoken| user. | |
|
71 | :type owner: Optional(str or int) | |
|
72 | :param active: Set this group as active. | |
|
73 | :type active: Optional(``True`` | ``False``) | |
|
74 | ||
|
75 | Example output: | |
|
76 | ||
|
77 | .. code-block:: bash | |
|
78 | ||
|
79 | id : <id_given_in_input> | |
|
80 | result: { | |
|
81 | "msg": "created new user group `<groupname>`", | |
|
82 | "user_group": <user_group_object> | |
|
83 | } | |
|
84 | error: null | |
|
85 | ||
|
86 | Example error output: | |
|
87 | ||
|
88 | .. code-block:: bash | |
|
89 | ||
|
90 | id : <id_given_in_input> | |
|
91 | result : null | |
|
92 | error : { | |
|
93 | "user group `<group name>` already exist" | |
|
94 | or | |
|
95 | "failed to create group `<group name>`" | |
|
96 | } | |
|
97 | ||
|
98 | ||
|
99 | delete_user_group | |
|
100 | ----------------- | |
|
101 | ||
|
102 | .. py:function:: delete_user_group(apiuser, usergroupid) | |
|
103 | ||
|
104 | Deletes the specified `user group`. | |
|
105 | ||
|
106 | This command can only be run using an |authtoken| with admin rights to | |
|
107 | the specified repository. | |
|
108 | ||
|
109 | This command takes the following options: | |
|
110 | ||
|
111 | :param apiuser: filled automatically from apikey | |
|
112 | :type apiuser: AuthUser | |
|
113 | :param usergroupid: | |
|
114 | :type usergroupid: int | |
|
115 | ||
|
116 | Example output: | |
|
117 | ||
|
118 | .. code-block:: bash | |
|
119 | ||
|
120 | id : <id_given_in_input> | |
|
121 | result : { | |
|
122 | "msg": "deleted user group ID:<user_group_id> <user_group_name>" | |
|
123 | } | |
|
124 | error : null | |
|
125 | ||
|
126 | Example error output: | |
|
127 | ||
|
128 | .. code-block:: bash | |
|
129 | ||
|
130 | id : <id_given_in_input> | |
|
131 | result : null | |
|
132 | error : { | |
|
133 | "failed to delete user group ID:<user_group_id> <user_group_name>" | |
|
134 | or | |
|
135 | "RepoGroup assigned to <repo_groups_list>" | |
|
136 | } | |
|
137 | ||
|
138 | ||
|
139 | get_user_group | |
|
140 | -------------- | |
|
141 | ||
|
142 | .. py:function:: get_user_group(apiuser, usergroupid) | |
|
143 | ||
|
144 | Returns the data of an existing user group. | |
|
145 | ||
|
146 | This command can only be run using an |authtoken| with admin rights to | |
|
147 | the specified repository. | |
|
148 | ||
|
149 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
150 | :type apiuser: AuthUser | |
|
151 | :param usergroupid: Set the user group from which to return data. | |
|
152 | :type usergroupid: str or int | |
|
153 | ||
|
154 | Example error output: | |
|
155 | ||
|
156 | .. code-block:: bash | |
|
157 | ||
|
158 | { | |
|
159 | "error": null, | |
|
160 | "id": <id>, | |
|
161 | "result": { | |
|
162 | "active": true, | |
|
163 | "group_description": "group description", | |
|
164 | "group_name": "group name", | |
|
165 | "members": [ | |
|
166 | { | |
|
167 | "name": "owner-name", | |
|
168 | "origin": "owner", | |
|
169 | "permission": "usergroup.admin", | |
|
170 | "type": "user" | |
|
171 | }, | |
|
172 | { | |
|
173 | { | |
|
174 | "name": "user name", | |
|
175 | "origin": "permission", | |
|
176 | "permission": "usergroup.admin", | |
|
177 | "type": "user" | |
|
178 | }, | |
|
179 | { | |
|
180 | "name": "user group name", | |
|
181 | "origin": "permission", | |
|
182 | "permission": "usergroup.write", | |
|
183 | "type": "user_group" | |
|
184 | } | |
|
185 | ], | |
|
186 | "owner": "owner name", | |
|
187 | "users": [], | |
|
188 | "users_group_id": 2 | |
|
189 | } | |
|
190 | } | |
|
191 | ||
|
192 | ||
|
193 | get_user_groups | |
|
194 | --------------- | |
|
195 | ||
|
196 | .. py:function:: get_user_groups(apiuser) | |
|
197 | ||
|
198 | Lists all the existing user groups within RhodeCode. | |
|
199 | ||
|
200 | This command can only be run using an |authtoken| with admin rights to | |
|
201 | the specified repository. | |
|
202 | ||
|
203 | This command takes the following options: | |
|
204 | ||
|
205 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
206 | :type apiuser: AuthUser | |
|
207 | ||
|
208 | Example error output: | |
|
209 | ||
|
210 | .. code-block:: bash | |
|
211 | ||
|
212 | id : <id_given_in_input> | |
|
213 | result : [<user_group_obj>,...] | |
|
214 | error : null | |
|
215 | ||
|
216 | ||
|
217 | grant_user_group_permission_to_user_group | |
|
218 | ----------------------------------------- | |
|
219 | ||
|
220 | .. py:function:: grant_user_group_permission_to_user_group(apiuser, usergroupid, sourceusergroupid, perm) | |
|
221 | ||
|
222 | Give one user group permissions to another user group. | |
|
223 | ||
|
224 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
225 | :type apiuser: AuthUser | |
|
226 | :param usergroupid: Set the user group on which to edit permissions. | |
|
227 | :type usergroupid: str or int | |
|
228 | :param sourceusergroupid: Set the source user group to which | |
|
229 | access/permissions will be granted. | |
|
230 | :type sourceusergroupid: str or int | |
|
231 | :param perm: (usergroup.(none|read|write|admin)) | |
|
232 | :type perm: str | |
|
233 | ||
|
234 | Example output: | |
|
235 | ||
|
236 | .. code-block:: bash | |
|
237 | ||
|
238 | id : <id_given_in_input> | |
|
239 | result : { | |
|
240 | "msg": "Granted perm: `<perm_name>` for user group: `<source_user_group_name>` in user group: `<user_group_name>`", | |
|
241 | "success": true | |
|
242 | } | |
|
243 | error : null | |
|
244 | ||
|
245 | ||
|
246 | grant_user_permission_to_user_group | |
|
247 | ----------------------------------- | |
|
248 | ||
|
249 | .. py:function:: grant_user_permission_to_user_group(apiuser, usergroupid, userid, perm) | |
|
250 | ||
|
251 | Set permissions for a user in a user group. | |
|
252 | ||
|
253 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
254 | :type apiuser: AuthUser | |
|
255 | :param usergroupid: Set the user group to edit permissions on. | |
|
256 | :type usergroupid: str or int | |
|
257 | :param userid: Set the user from whom you wish to set permissions. | |
|
258 | :type userid: str | |
|
259 | :param perm: (usergroup.(none|read|write|admin)) | |
|
260 | :type perm: str | |
|
261 | ||
|
262 | Example output: | |
|
263 | ||
|
264 | .. code-block:: bash | |
|
265 | ||
|
266 | id : <id_given_in_input> | |
|
267 | result : { | |
|
268 | "msg": "Granted perm: `<perm_name>` for user: `<username>` in user group: `<user_group_name>`", | |
|
269 | "success": true | |
|
270 | } | |
|
271 | error : null | |
|
272 | ||
|
273 | ||
|
274 | remove_user_from_user_group | |
|
275 | --------------------------- | |
|
276 | ||
|
277 | .. py:function:: remove_user_from_user_group(apiuser, usergroupid, userid) | |
|
278 | ||
|
279 | Removes a user from a user group. | |
|
280 | ||
|
281 | * If the specified user is not in the group, this command will return | |
|
282 | `false`. | |
|
283 | ||
|
284 | This command can only be run using an |authtoken| with admin rights to | |
|
285 | the specified user group. | |
|
286 | ||
|
287 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
288 | :type apiuser: AuthUser | |
|
289 | :param usergroupid: Sets the user group name. | |
|
290 | :type usergroupid: str or int | |
|
291 | :param userid: The user you wish to remove from |RCE|. | |
|
292 | :type userid: str or int | |
|
293 | ||
|
294 | Example output: | |
|
295 | ||
|
296 | .. code-block:: bash | |
|
297 | ||
|
298 | id : <id_given_in_input> | |
|
299 | result: { | |
|
300 | "success": True|False, # depends on if member is in group | |
|
301 | "msg": "removed member <username> from user group <groupname> | | |
|
302 | User wasn't in group" | |
|
303 | } | |
|
304 | error: null | |
|
305 | ||
|
306 | ||
|
307 | revoke_user_group_permission_from_user_group | |
|
308 | -------------------------------------------- | |
|
309 | ||
|
310 | .. py:function:: revoke_user_group_permission_from_user_group(apiuser, usergroupid, sourceusergroupid) | |
|
311 | ||
|
312 | Revoke the permissions that one user group has to another. | |
|
313 | ||
|
314 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
315 | :type apiuser: AuthUser | |
|
316 | :param usergroupid: Set the user group on which to edit permissions. | |
|
317 | :type usergroupid: str or int | |
|
318 | :param sourceusergroupid: Set the user group from which permissions | |
|
319 | are revoked. | |
|
320 | :type sourceusergroupid: str or int | |
|
321 | ||
|
322 | Example output: | |
|
323 | ||
|
324 | .. code-block:: bash | |
|
325 | ||
|
326 | id : <id_given_in_input> | |
|
327 | result : { | |
|
328 | "msg": "Revoked perm for user group: `<user_group_name>` in user group: `<target_user_group_name>`", | |
|
329 | "success": true | |
|
330 | } | |
|
331 | error : null | |
|
332 | ||
|
333 | ||
|
334 | revoke_user_permission_from_user_group | |
|
335 | -------------------------------------- | |
|
336 | ||
|
337 | .. py:function:: revoke_user_permission_from_user_group(apiuser, usergroupid, userid) | |
|
338 | ||
|
339 | Revoke a users permissions in a user group. | |
|
340 | ||
|
341 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
342 | :type apiuser: AuthUser | |
|
343 | :param usergroupid: Set the user group from which to revoke the user | |
|
344 | permissions. | |
|
345 | :type: usergroupid: str or int | |
|
346 | :param userid: Set the userid of the user whose permissions will be | |
|
347 | revoked. | |
|
348 | :type userid: str | |
|
349 | ||
|
350 | Example output: | |
|
351 | ||
|
352 | .. code-block:: bash | |
|
353 | ||
|
354 | id : <id_given_in_input> | |
|
355 | result : { | |
|
356 | "msg": "Revoked perm for user: `<username>` in user group: `<user_group_name>`", | |
|
357 | "success": true | |
|
358 | } | |
|
359 | error : null | |
|
360 | ||
|
361 | ||
|
362 | update_user_group | |
|
363 | ----------------- | |
|
364 | ||
|
365 | .. py:function:: update_user_group(apiuser, usergroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:None>, active=<Optional:True>) | |
|
366 | ||
|
367 | Updates the specified `user group` with the details provided. | |
|
368 | ||
|
369 | This command can only be run using an |authtoken| with admin rights to | |
|
370 | the specified repository. | |
|
371 | ||
|
372 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
373 | :type apiuser: AuthUser | |
|
374 | :param usergroupid: Set the id of the `user group` to update. | |
|
375 | :type usergroupid: str or int | |
|
376 | :param group_name: Set the new name the `user group` | |
|
377 | :type group_name: str | |
|
378 | :param description: Give a description for the `user group` | |
|
379 | :type description: str | |
|
380 | :param owner: Set the owner of the `user group`. | |
|
381 | :type owner: Optional(str or int) | |
|
382 | :param active: Set the group as active. | |
|
383 | :type active: Optional(``True`` | ``False``) | |
|
384 | ||
|
385 | Example output: | |
|
386 | ||
|
387 | .. code-block:: bash | |
|
388 | ||
|
389 | id : <id_given_in_input> | |
|
390 | result : { | |
|
391 | "msg": 'updated user group ID:<user group id> <user group name>', | |
|
392 | "user_group": <user_group_object> | |
|
393 | } | |
|
394 | error : null | |
|
395 | ||
|
396 | Example error output: | |
|
397 | ||
|
398 | .. code-block:: bash | |
|
399 | ||
|
400 | id : <id_given_in_input> | |
|
401 | result : null | |
|
402 | error : { | |
|
403 | "failed to update user group `<user group name>`" | |
|
404 | } | |
|
405 | ||
|
406 |
@@ -0,0 +1,295 b'' | |||
|
1 | .. _user-methods-ref: | |
|
2 | ||
|
3 | user methods | |
|
4 | ================= | |
|
5 | ||
|
6 | create_user | |
|
7 | ----------- | |
|
8 | ||
|
9 | .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>) | |
|
10 | ||
|
11 | Creates a new user and returns the new user object. | |
|
12 | ||
|
13 | This command can only be run using an |authtoken| with admin rights to | |
|
14 | the specified repository. | |
|
15 | ||
|
16 | This command takes the following options: | |
|
17 | ||
|
18 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
19 | :type apiuser: AuthUser | |
|
20 | :param username: Set the new username. | |
|
21 | :type username: str or int | |
|
22 | :param email: Set the user email address. | |
|
23 | :type email: str | |
|
24 | :param password: Set the new user password. | |
|
25 | :type password: Optional(str) | |
|
26 | :param firstname: Set the new user firstname. | |
|
27 | :type firstname: Optional(str) | |
|
28 | :param lastname: Set the new user surname. | |
|
29 | :type lastname: Optional(str) | |
|
30 | :param active: Set the user as active. | |
|
31 | :type active: Optional(``True`` | ``False``) | |
|
32 | :param admin: Give the new user admin rights. | |
|
33 | :type admin: Optional(``True`` | ``False``) | |
|
34 | :param extern_name: Set the authentication plugin name. | |
|
35 | Using LDAP this is filled with LDAP UID. | |
|
36 | :type extern_name: Optional(str) | |
|
37 | :param extern_type: Set the new user authentication plugin. | |
|
38 | :type extern_type: Optional(str) | |
|
39 | :param force_password_change: Force the new user to change password | |
|
40 | on next login. | |
|
41 | :type force_password_change: Optional(``True`` | ``False``) | |
|
42 | ||
|
43 | Example output: | |
|
44 | ||
|
45 | .. code-block:: bash | |
|
46 | ||
|
47 | id : <id_given_in_input> | |
|
48 | result: { | |
|
49 | "msg" : "created new user `<username>`", | |
|
50 | "user": <user_obj> | |
|
51 | } | |
|
52 | error: null | |
|
53 | ||
|
54 | Example error output: | |
|
55 | ||
|
56 | .. code-block:: bash | |
|
57 | ||
|
58 | id : <id_given_in_input> | |
|
59 | result : null | |
|
60 | error : { | |
|
61 | "user `<username>` already exist" | |
|
62 | or | |
|
63 | "email `<email>` already exist" | |
|
64 | or | |
|
65 | "failed to create user `<username>`" | |
|
66 | } | |
|
67 | ||
|
68 | ||
|
69 | delete_user | |
|
70 | ----------- | |
|
71 | ||
|
72 | .. py:function:: delete_user(apiuser, userid) | |
|
73 | ||
|
74 | Deletes the specified user from the |RCE| user database. | |
|
75 | ||
|
76 | This command can only be run using an |authtoken| with admin rights to | |
|
77 | the specified repository. | |
|
78 | ||
|
79 | .. important:: | |
|
80 | ||
|
81 | Ensure all open pull requests and open code review | |
|
82 | requests to this user are close. | |
|
83 | ||
|
84 | Also ensure all repositories, or repository groups owned by this | |
|
85 | user are reassigned before deletion. | |
|
86 | ||
|
87 | This command takes the following options: | |
|
88 | ||
|
89 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
90 | :type apiuser: AuthUser | |
|
91 | :param userid: Set the user to delete. | |
|
92 | :type userid: str or int | |
|
93 | ||
|
94 | Example output: | |
|
95 | ||
|
96 | .. code-block:: bash | |
|
97 | ||
|
98 | id : <id_given_in_input> | |
|
99 | result: { | |
|
100 | "msg" : "deleted user ID:<userid> <username>", | |
|
101 | "user": null | |
|
102 | } | |
|
103 | error: null | |
|
104 | ||
|
105 | Example error output: | |
|
106 | ||
|
107 | .. code-block:: bash | |
|
108 | ||
|
109 | id : <id_given_in_input> | |
|
110 | result : null | |
|
111 | error : { | |
|
112 | "failed to delete user ID:<userid> <username>" | |
|
113 | } | |
|
114 | ||
|
115 | ||
|
116 | get_user | |
|
117 | -------- | |
|
118 | ||
|
119 | .. py:function:: get_user(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
120 | ||
|
121 | Returns the information associated with a username or userid. | |
|
122 | ||
|
123 | * If the ``userid`` is not set, this command returns the information | |
|
124 | for the ``userid`` calling the method. | |
|
125 | ||
|
126 | .. note:: | |
|
127 | ||
|
128 | Normal users may only run this command against their ``userid``. For | |
|
129 | full privileges you must run this command using an |authtoken| with | |
|
130 | admin rights. | |
|
131 | ||
|
132 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
133 | :type apiuser: AuthUser | |
|
134 | :param userid: Sets the userid for which data will be returned. | |
|
135 | :type userid: Optional(str or int) | |
|
136 | ||
|
137 | Example output: | |
|
138 | ||
|
139 | .. code-block:: bash | |
|
140 | ||
|
141 | { | |
|
142 | "error": null, | |
|
143 | "id": <id>, | |
|
144 | "result": { | |
|
145 | "active": true, | |
|
146 | "admin": false, | |
|
147 | "api_key": "api-key", | |
|
148 | "api_keys": [ list of keys ], | |
|
149 | "email": "user@example.com", | |
|
150 | "emails": [ | |
|
151 | "user@example.com" | |
|
152 | ], | |
|
153 | "extern_name": "rhodecode", | |
|
154 | "extern_type": "rhodecode", | |
|
155 | "firstname": "username", | |
|
156 | "ip_addresses": [], | |
|
157 | "language": null, | |
|
158 | "last_login": "Timestamp", | |
|
159 | "lastname": "surnae", | |
|
160 | "permissions": { | |
|
161 | "global": [ | |
|
162 | "hg.inherit_default_perms.true", | |
|
163 | "usergroup.read", | |
|
164 | "hg.repogroup.create.false", | |
|
165 | "hg.create.none", | |
|
166 | "hg.extern_activate.manual", | |
|
167 | "hg.create.write_on_repogroup.false", | |
|
168 | "hg.usergroup.create.false", | |
|
169 | "group.none", | |
|
170 | "repository.none", | |
|
171 | "hg.register.none", | |
|
172 | "hg.fork.repository" | |
|
173 | ], | |
|
174 | "repositories": { "username/example": "repository.write"}, | |
|
175 | "repositories_groups": { "user-group/repo": "group.none" }, | |
|
176 | "user_groups": { "user_group_name": "usergroup.read" } | |
|
177 | }, | |
|
178 | "user_id": 32, | |
|
179 | "username": "username" | |
|
180 | } | |
|
181 | } | |
|
182 | ||
|
183 | ||
|
184 | get_user_locks | |
|
185 | -------------- | |
|
186 | ||
|
187 | .. py:function:: get_user_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
188 | ||
|
189 | Displays all repositories locked by the specified user. | |
|
190 | ||
|
191 | * If this command is run by a non-admin user, it returns | |
|
192 | a list of |repos| locked by that user. | |
|
193 | ||
|
194 | This command takes the following options: | |
|
195 | ||
|
196 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
197 | :type apiuser: AuthUser | |
|
198 | :param userid: Sets the userid whose list of locked |repos| will be | |
|
199 | displayed. | |
|
200 | :type userid: Optional(str or int) | |
|
201 | ||
|
202 | Example output: | |
|
203 | ||
|
204 | .. code-block:: bash | |
|
205 | ||
|
206 | id : <id_given_in_input> | |
|
207 | result : { | |
|
208 | [repo_object, repo_object,...] | |
|
209 | } | |
|
210 | error : null | |
|
211 | ||
|
212 | ||
|
213 | get_users | |
|
214 | --------- | |
|
215 | ||
|
216 | .. py:function:: get_users(apiuser) | |
|
217 | ||
|
218 | Lists all users in the |RCE| user database. | |
|
219 | ||
|
220 | This command can only be run using an |authtoken| with admin rights to | |
|
221 | the specified repository. | |
|
222 | ||
|
223 | This command takes the following options: | |
|
224 | ||
|
225 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
226 | :type apiuser: AuthUser | |
|
227 | ||
|
228 | Example output: | |
|
229 | ||
|
230 | .. code-block:: bash | |
|
231 | ||
|
232 | id : <id_given_in_input> | |
|
233 | result: [<user_object>, ...] | |
|
234 | error: null | |
|
235 | ||
|
236 | ||
|
237 | update_user | |
|
238 | ----------- | |
|
239 | ||
|
240 | .. py:function:: update_user(apiuser, userid, username=<Optional:None>, email=<Optional:None>, password=<Optional:None>, firstname=<Optional:None>, lastname=<Optional:None>, active=<Optional:None>, admin=<Optional:None>, extern_type=<Optional:None>, extern_name=<Optional:None>) | |
|
241 | ||
|
242 | Updates the details for the specified user, if that user exists. | |
|
243 | ||
|
244 | This command can only be run using an |authtoken| with admin rights to | |
|
245 | the specified repository. | |
|
246 | ||
|
247 | This command takes the following options: | |
|
248 | ||
|
249 | :param apiuser: This is filled automatically from |authtoken|. | |
|
250 | :type apiuser: AuthUser | |
|
251 | :param userid: Set the ``userid`` to update. | |
|
252 | :type userid: str or int | |
|
253 | :param username: Set the new username. | |
|
254 | :type username: str or int | |
|
255 | :param email: Set the new email. | |
|
256 | :type email: str | |
|
257 | :param password: Set the new password. | |
|
258 | :type password: Optional(str) | |
|
259 | :param firstname: Set the new first name. | |
|
260 | :type firstname: Optional(str) | |
|
261 | :param lastname: Set the new surname. | |
|
262 | :type lastname: Optional(str) | |
|
263 | :param active: Set the new user as active. | |
|
264 | :type active: Optional(``True`` | ``False``) | |
|
265 | :param admin: Give the user admin rights. | |
|
266 | :type admin: Optional(``True`` | ``False``) | |
|
267 | :param extern_name: Set the authentication plugin user name. | |
|
268 | Using LDAP this is filled with LDAP UID. | |
|
269 | :type extern_name: Optional(str) | |
|
270 | :param extern_type: Set the authentication plugin type. | |
|
271 | :type extern_type: Optional(str) | |
|
272 | ||
|
273 | ||
|
274 | Example output: | |
|
275 | ||
|
276 | .. code-block:: bash | |
|
277 | ||
|
278 | id : <id_given_in_input> | |
|
279 | result: { | |
|
280 | "msg" : "updated user ID:<userid> <username>", | |
|
281 | "user": <user_object>, | |
|
282 | } | |
|
283 | error: null | |
|
284 | ||
|
285 | Example error output: | |
|
286 | ||
|
287 | .. code-block:: bash | |
|
288 | ||
|
289 | id : <id_given_in_input> | |
|
290 | result : null | |
|
291 | error : { | |
|
292 | "failed to update user `<username>`" | |
|
293 | } | |
|
294 | ||
|
295 |
@@ -0,0 +1,25 b'' | |||
|
1 | .. _extensions-hooks-ref: | |
|
2 | ||
|
3 | Extensions & Hooks | |
|
4 | ================== | |
|
5 | ||
|
6 | The extensions & hooks section references three concepts regularly, | |
|
7 | so to clarify what is meant each time, read the following definitions: | |
|
8 | ||
|
9 | * **Plugin**: A Plugin is software that adds a specific feature to | |
|
10 | an existing software application. | |
|
11 | * **Extension**: An extension extends the capabilities of, | |
|
12 | or the data available to, an existing software application. | |
|
13 | * **Hook**: A hook intercepts function calls, messages, or events passed | |
|
14 | between software components and can be used to trigger plugins, or their | |
|
15 | extensions. | |
|
16 | ||
|
17 | .. toctree:: | |
|
18 | ||
|
19 | rcx | |
|
20 | install-ext | |
|
21 | config-ext | |
|
22 | extensions | |
|
23 | hooks | |
|
24 | full-blown-example | |
|
25 | int-slack |
@@ -0,0 +1,23 b'' | |||
|
1 | .. _integrations-email: | |
|
2 | ||
|
3 | Email integration | |
|
4 | ================= | |
|
5 | ||
|
6 | The email integration allows you to send the summary of repo pushes to a | |
|
7 | list of email recipients in the format: | |
|
8 | ||
|
9 | An example:: | |
|
10 | ||
|
11 | User: johndoe | |
|
12 | Branches: default | |
|
13 | Repository: http://rhodecode.company.com/repo | |
|
14 | Commit: 8eab60a44a612e331edfcd59b8d96b2f6a935cd9 | |
|
15 | URL: http://rhodecode.company.com/repo/changeset/8eab60a44a612e331edfcd59b8d96b2f6a935cd9 | |
|
16 | Author: John Doe | |
|
17 | Date: 2016-03-01 11:20:44 | |
|
18 | Commit Message: | |
|
19 | ||
|
20 | fixed bug with thing | |
|
21 | ||
|
22 | ||
|
23 | To create one, create a ``email`` integration in `creating-integrations`. |
@@ -0,0 +1,14 b'' | |||
|
1 | .. _integrations-hipchat: | |
|
2 | ||
|
3 | Hipchat integration | |
|
4 | =================== | |
|
5 | ||
|
6 | In order to set a Hipchat integration up, it is necessary to obtain the Hipchat | |
|
7 | service url by: | |
|
8 | ||
|
9 | 1. Log into Hipchat (https://your-hipchat.hipchat.com/) | |
|
10 | 2. Go to *Integrations* -> *Build your own* | |
|
11 | 3. Select a room to post notifications to and save it | |
|
12 | ||
|
13 | Hipchat will create a URL for you to use in your integration as outlined in | |
|
14 | :ref:`creating-integrations`. No newline at end of file |
@@ -0,0 +1,27 b'' | |||
|
1 | .. _integrations-jira: | |
|
2 | ||
|
3 | JIRA integration | |
|
4 | ================ | |
|
5 | ||
|
6 | .. important:: | |
|
7 | ||
|
8 | JIRA integration is only available in |RCEE|. | |
|
9 | ||
|
10 | ||
|
11 | .. important:: | |
|
12 | ||
|
13 | In order to make issue numbers clickable in commit messages, see the | |
|
14 | :ref:`rhodecode-issue-trackers-ref` section. The JIRA integration | |
|
15 | only deals with altering JIRA issues. | |
|
16 | ||
|
17 | ||
|
18 | The JIRA integration allows you to reference and change issue statuses in | |
|
19 | JIRA directly from commit messages using commit message patterns such as | |
|
20 | ``fixes #JIRA-235`` in order to change the status of issue JIRA-235 to | |
|
21 | eg. "Resolved". | |
|
22 | ||
|
23 | In order to apply a status to a JIRA issue, it is necessary to find the | |
|
24 | transition status id in the *Workflow* section of JIRA. | |
|
25 | ||
|
26 | Once you have the transition status id, you can create a JIRA integration | |
|
27 | as outlined in :ref:`creating-integrations`. |
@@ -0,0 +1,28 b'' | |||
|
1 | .. _integrations-redmine: | |
|
2 | ||
|
3 | Redmine integration | |
|
4 | =================== | |
|
5 | ||
|
6 | .. important:: | |
|
7 | ||
|
8 | Redmine integration is only available in |RCEE|. | |
|
9 | ||
|
10 | ||
|
11 | .. important:: | |
|
12 | ||
|
13 | In order to make issue numbers clickable in commit messages, see the section | |
|
14 | :ref:`rhodecode-issue-trackers-ref`. Redmine integration is specifically for | |
|
15 | altering Redmine issues. | |
|
16 | ||
|
17 | ||
|
18 | Redmine integration allows you to reference and change issue statuses in | |
|
19 | Redmine directly from commit messages, using commit message patterns such as | |
|
20 | ``fixes #235`` in order to change the status of issue 235 to eg. "Resolved". | |
|
21 | ||
|
22 | To set a Redmine integration up, it is first necessary to obtain a Redmine API | |
|
23 | key. This can be found under *My Account* in the Redmine application. | |
|
24 | You may have to enable API Access in Redmine settings if it is not already | |
|
25 | available. | |
|
26 | ||
|
27 | Once you have the API key, create a Redmine integration as outlined in | |
|
28 | :ref:`creating-integrations`. |
@@ -0,0 +1,21 b'' | |||
|
1 | .. _integrations-slack: | |
|
2 | ||
|
3 | Slack integration | |
|
4 | ================= | |
|
5 | ||
|
6 | To set a Slack integration up, it is first necessary to set up a Slack webhook | |
|
7 | API endpoint for your Slack channel. This can be done at: | |
|
8 | ||
|
9 | https://my.slack.com/services/new/incoming-webhook/ | |
|
10 | ||
|
11 | Select the channel you would like to use, and Slack will provide you with the | |
|
12 | webhook URL for configuration. | |
|
13 | ||
|
14 | You can now create a Slack integration as outlined in | |
|
15 | :ref:`creating-integrations`. | |
|
16 | ||
|
17 | .. note:: | |
|
18 | Some settings in the RhodeCode admin are identical to the options within the | |
|
19 | Slack integration. For example, if notifications are to be sent in a private | |
|
20 | chat, leave the "Channel" field blank. Likewise, the Emoji option within | |
|
21 | RhodeCode can override the one set in the Slack admin. No newline at end of file |
@@ -0,0 +1,12 b'' | |||
|
1 | .. _integrations-webhook: | |
|
2 | ||
|
3 | Webhook integration | |
|
4 | =================== | |
|
5 | ||
|
6 | The Webhook integration allows you to POST events such as repository pushes | |
|
7 | or pull requests to a custom http endpoint as a json dict with details of the | |
|
8 | event. | |
|
9 | ||
|
10 | To create a webhook integration, select "webhook" in the integration settings | |
|
11 | and use the url and key from your custom webhook. See | |
|
12 | :ref:`creating-integrations` for additional instructions. No newline at end of file |
@@ -0,0 +1,121 b'' | |||
|
1 | |RCE| 4.3.0 |RNS| | |
|
2 | ----------------- | |
|
3 | ||
|
4 | Release Date | |
|
5 | ^^^^^^^^^^^^ | |
|
6 | ||
|
7 | - 2016-08-12 | |
|
8 | ||
|
9 | ||
|
10 | General | |
|
11 | ^^^^^^^ | |
|
12 | ||
|
13 | - Subversion: detect requests also based on magic path. | |
|
14 | This adds subversion 1.9 support for SVN backend. | |
|
15 | - Summary/changelog: unified how data is displayed for those pages. | |
|
16 | * use consistent order of columns | |
|
17 | * fix the link to commit status | |
|
18 | * fix order of displaying comments | |
|
19 | - Live-chat: refactor live chat system for code review based on | |
|
20 | latest channelstream changes. | |
|
21 | - SVN: Add template to generate the apache mod_dav_svn config for all | |
|
22 | repository groups. Repository groups can now be automatically mapped to be | |
|
23 | supported by SVN backend. Set `svn.proxy.generate_config = true` and similar | |
|
24 | options found inside .ini config. | |
|
25 | - Readme/markup: improved order of generating readme files. Fixes #4050 | |
|
26 | * we now use order based on default system renderer | |
|
27 | * having multiple readme files will pick correct one as set renderer | |
|
28 | - Api: add a max_file_bytes parameter to get_nodes so that large files | |
|
29 | can be skipped. | |
|
30 | - Auth-ldap: added flag to set debug mode for LDAP connections. | |
|
31 | - Labs: moved rebase-merge option from labs settings into VCS settings. | |
|
32 | - System: send platform type and version to upgrade endpoint when checking | |
|
33 | for new versions. | |
|
34 | - Packaging: update rhodecode-tools from 0.8.3 to 0.10.0 | |
|
35 | - Packaging: update codemirror from 5.4.0 to 5.11.0 | |
|
36 | - Packaging: updated pygments to 2.1.3 | |
|
37 | - Packaging: bumped supervisor to 3.3.0 | |
|
38 | - Packaging: bumped psycopg2 to 2.6.1 | |
|
39 | - Packaging: bumped mercurial to 3.8.4 | |
|
40 | ||
|
41 | ||
|
42 | New Features | |
|
43 | ^^^^^^^^^^^^ | |
|
44 | ||
|
45 | - Integrations: created new event based integration framework. | |
|
46 | Allows to configure global, or per repo: Slack, Hipchat, Webhooks, Email | |
|
47 | integrations. This also deprecated usage of rcextensions for those. | |
|
48 | - Integrations (EE only): added smart commits for Jira and Redmine with | |
|
49 | ability to map keywords into issue tracker actions. | |
|
50 | `Fixes #123 -> resolves issues`, `Closes #123 -> closes issue` etc. | |
|
51 | - Markdown: added improved support for Github flavored markdown. | |
|
52 | - Labs: enable labs setting by default. Labs are new experimental features in | |
|
53 | RhodeCode that can be used to test new upcomming features. | |
|
54 | - Api: Add api methods to get/set repository settings, implements #4021. | |
|
55 | - Gravatars: commit emails are now displayed based on the actual email | |
|
56 | used inside commit rather then the main one of associated account | |
|
57 | inside RhodeCode, #4037. | |
|
58 | - Emails: All emails got new styling. They look now consistent | |
|
59 | to UI of application. We also added bunch of usefull information into | |
|
60 | email body, #4087. | |
|
61 | - Pull requests: add show/hide comment functionality inside diffs, #4106. | |
|
62 | - Notifications: added real-time notifications with via channelstream | |
|
63 | about new comments when reviewing the code. Never miss someone replies | |
|
64 | onto comments you submitted while doing a code-review. | |
|
65 | ||
|
66 | ||
|
67 | Security | |
|
68 | ^^^^^^^^ | |
|
69 | ||
|
70 | - Api: make `comment_commits` api call have consistent permissions | |
|
71 | with web interface. | |
|
72 | - Files: fixes display of "Add File" button missing or present despite | |
|
73 | permissions, because of cached version of the page was rendered, fixes #4083. | |
|
74 | - Login/Registration: fixed flash message problem on login/registration | |
|
75 | pages, fixes #4043. | |
|
76 | - Auth-token: allow other authentication types to use auth-token. | |
|
77 | Accounts associated with other types like LDAP, or PAM can | |
|
78 | now use auth-tokens to authenticate via RhodeCode. | |
|
79 | ||
|
80 | ||
|
81 | Performance | |
|
82 | ^^^^^^^^^^^ | |
|
83 | ||
|
84 | - Core: made all RhodeCode components gevent compatible. RhodeCode can now make | |
|
85 | use of async workers. You can handle dozens of concurrent operations using a | |
|
86 | single worker. This works only with new HTTP backend. | |
|
87 | - Core: added new very efficient HTTP backend can be used to replace pyro4. | |
|
88 | - Core: Set 'gzip_responses' to false by default. We no longer require any | |
|
89 | gzip computations on backed, thus speeding up large file transfers. | |
|
90 | - UI: optimized events system for JavaScript to boost performance on | |
|
91 | large html pages. | |
|
92 | - VCS: moved VCSMiddleware up to pyramid layer as wrapper around pylons app. | |
|
93 | Skips few calls, and allows slightly faster clones/pulls and pushes. | |
|
94 | ||
|
95 | ||
|
96 | Fixes | |
|
97 | ^^^^^ | |
|
98 | ||
|
99 | - VCS: add vcsserver cache invalidation to mercurial backend. | |
|
100 | Fixes multi-process problems after Mercurial 3.8.X release with server | |
|
101 | side merges. | |
|
102 | - VCS: clear caches on remap-and-rescan option. | |
|
103 | - VCS: improved logic of updating commit caches in cases of rebases. | |
|
104 | - Caches: Add an argument to make the cache context thread scoped. Brings | |
|
105 | support to gevent compatible handling. | |
|
106 | - Diff2way: fixed unicode problem on non-ascii files. | |
|
107 | - Full text search: whoosh schema uses now bigger ints, fixes #4035 | |
|
108 | - File-browser: optimized cached tree calculation, reduced load times by | |
|
109 | 50% on complex file trees. | |
|
110 | - Styling: #4086 fixing bug where long commit messages did not wrap in file view. | |
|
111 | - SVN: Ignore the content length header from response, fixes #4112. | |
|
112 | Fixes the "svn: E120106: ra_serf: The server sent a truncated HTTP response body." | |
|
113 | - Auth: Fix password_changed function, fixes #4043. | |
|
114 | - UI/tables: better message when tables are empty #685 #1832. | |
|
115 | - UX: put gravatar and username together in user list #3203. | |
|
116 | - Gists: use colander schema to validate input data. | |
|
117 | * brings consistent validation acros API and web | |
|
118 | * use nicer and stricter schemas to validate data | |
|
119 | * fixes #4118 | |
|
120 | - Appenlight: error reporting can now also report VCSMiddleware errors. | |
|
121 | - Users: hash email key for User.get_by_email() fixes #4132 |
@@ -0,0 +1,13 b'' | |||
|
1 | # Copyright 2009 Facebook | |
|
2 | # | |
|
3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
|
4 | # not use this file except in compliance with the License. You may obtain | |
|
5 | # a copy of the License at | |
|
6 | # | |
|
7 | # http://www.apache.org/licenses/LICENSE-2.0 | |
|
8 | # | |
|
9 | # Unless required by applicable law or agreed to in writing, software | |
|
10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
|
11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
|
12 | # License for the specific language governing permissions and limitations | |
|
13 | # under the License. |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
@@ -1,6 +1,6 b'' | |||
|
1 | 1 | [bumpversion] |
|
2 |
current_version = 4. |
|
|
2 | current_version = 4.3.0 | |
|
3 | 3 | message = release: Bump version {current_version} to {new_version} |
|
4 | 4 | |
|
5 | 5 | [bumpversion:file:rhodecode/VERSION] |
|
6 | 6 |
@@ -1,58 +1,59 b'' | |||
|
1 | 1 | syntax: glob |
|
2 | 2 | *.egg |
|
3 | 3 | *.egg-info |
|
4 | 4 | *.idea |
|
5 | 5 | *.orig |
|
6 | 6 | *.pyc |
|
7 | 7 | *.sqlite-journal |
|
8 | 8 | *.swp |
|
9 | 9 | *.tox |
|
10 | 10 | *.DS_Store* |
|
11 | 11 | |
|
12 | 12 | syntax: regexp |
|
13 | 13 | |
|
14 | 14 | #.filename |
|
15 | 15 | ^\.settings$ |
|
16 | 16 | ^\.project$ |
|
17 | 17 | ^\.pydevproject$ |
|
18 | 18 | ^\.coverage$ |
|
19 | 19 | ^\.cache.*$ |
|
20 | 20 | ^\.rhodecode$ |
|
21 | 21 | |
|
22 | 22 | ^rcextensions |
|
23 | 23 | ^_dev |
|
24 | 24 | ^._dev |
|
25 | 25 | ^build/ |
|
26 | 26 | ^coverage\.xml$ |
|
27 | 27 | ^data$ |
|
28 | ^\.eggs/ | |
|
28 | 29 | ^configs/data$ |
|
29 | 30 | ^dev.ini$ |
|
30 | 31 | ^acceptance_tests/dev.*\.ini$ |
|
31 | 32 | ^dist/ |
|
32 | 33 | ^fabfile.py |
|
33 | 34 | ^htmlcov |
|
34 | 35 | ^junit\.xml$ |
|
35 | 36 | ^node_modules/ |
|
36 | 37 | ^pylint.log$ |
|
37 | 38 | ^rcextensions/ |
|
38 | 39 | ^result$ |
|
39 | 40 | ^rhodecode/public/css/style.css$ |
|
40 | 41 | ^rhodecode/public/js/scripts.js$ |
|
41 | 42 | ^rhodecode\.db$ |
|
42 | 43 | ^rhodecode\.log$ |
|
43 | 44 | ^rhodecode_dev\.log$ |
|
44 | 45 | ^test\.db$ |
|
45 | 46 | |
|
46 | 47 | # ac-tests |
|
47 | 48 | ^acceptance_tests/\.cache.*$ |
|
48 | 49 | ^acceptance_tests/externals |
|
49 | 50 | ^acceptance_tests/ghostdriver.log$ |
|
50 | 51 | ^acceptance_tests/local(_.+)?\.ini$ |
|
51 | 52 | |
|
52 | 53 | # docs |
|
53 | 54 | ^docs/_build$ |
|
54 | 55 | ^docs/result$ |
|
55 | 56 | ^docs-internal/_build$ |
|
56 | 57 | |
|
57 | 58 | # Cythonized things |
|
58 | 59 | ^rhodecode/.*\.(c|so)$ |
@@ -1,33 +1,28 b'' | |||
|
1 | 1 | [DEFAULT] |
|
2 | 2 | done = false |
|
3 | 3 | |
|
4 | 4 | [task:bump_version] |
|
5 | 5 | done = true |
|
6 | 6 | |
|
7 | [task:rc_tools_pinned] | |
|
8 | done = true | |
|
9 | ||
|
10 | 7 | [task:fixes_on_stable] |
|
11 | done = true | |
|
12 | 8 | |
|
13 | 9 | [task:pip2nix_generated] |
|
14 | done = true | |
|
15 | 10 | |
|
16 | 11 | [task:changelog_updated] |
|
17 | done = true | |
|
18 | 12 | |
|
19 | 13 | [task:generate_api_docs] |
|
20 | done = true | |
|
14 | ||
|
15 | [task:updated_translation] | |
|
21 | 16 | |
|
22 | 17 | [release] |
|
23 |
state = |
|
|
24 |
version = 4. |
|
|
18 | state = in_progress | |
|
19 | version = 4.3.0 | |
|
25 | 20 | |
|
26 | [task:updated_translation] | |
|
21 | [task:rc_tools_pinned] | |
|
27 | 22 | |
|
28 | 23 | [task:generate_js_routes] |
|
29 | 24 | |
|
30 | 25 | [task:updated_trial_license] |
|
31 | 26 | |
|
32 | 27 | [task:generate_oss_licenses] |
|
33 | 28 |
@@ -1,139 +1,144 b'' | |||
|
1 | 1 | module.exports = function(grunt) { |
|
2 | 2 | grunt.initConfig({ |
|
3 | 3 | |
|
4 | 4 | dirs: { |
|
5 | 5 | css: "rhodecode/public/css", |
|
6 | 6 | js: { |
|
7 | 7 | "src": "rhodecode/public/js/src", |
|
8 | 8 | "dest": "rhodecode/public/js" |
|
9 | 9 | } |
|
10 | 10 | }, |
|
11 | 11 | |
|
12 | 12 | concat: { |
|
13 | 13 | dist: { |
|
14 | 14 | src: [ |
|
15 | 15 | // Base libraries |
|
16 | 16 | '<%= dirs.js.src %>/jquery-1.11.1.min.js', |
|
17 | 17 | '<%= dirs.js.src %>/logging.js', |
|
18 | 18 | '<%= dirs.js.src %>/bootstrap.js', |
|
19 | 19 | '<%= dirs.js.src %>/mousetrap.js', |
|
20 | 20 | '<%= dirs.js.src %>/moment.js', |
|
21 | 21 | '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js', |
|
22 | 22 | '<%= dirs.js.src %>/i18n_utils.js', |
|
23 | '<%= dirs.js.src %>/deform.js', | |
|
23 | 24 | |
|
24 | 25 | // Plugins |
|
25 | 26 | '<%= dirs.js.src %>/plugins/jquery.pjax.js', |
|
26 | 27 | '<%= dirs.js.src %>/plugins/jquery.dataTables.js', |
|
27 | 28 | '<%= dirs.js.src %>/plugins/flavoured_checkbox.js', |
|
28 | 29 | '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js', |
|
29 | 30 | '<%= dirs.js.src %>/plugins/jquery.autocomplete.js', |
|
30 | 31 | '<%= dirs.js.src %>/plugins/jquery.debounce.js', |
|
31 | 32 | '<%= dirs.js.src %>/plugins/jquery.mark.js', |
|
32 | 33 | '<%= dirs.js.src %>/plugins/jquery.timeago.js', |
|
33 | 34 | '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js', |
|
35 | '<%= dirs.js.src %>/plugins/toastr.js', | |
|
34 | 36 | |
|
35 | 37 | // Select2 |
|
36 | 38 | '<%= dirs.js.src %>/select2/select2.js', |
|
37 | 39 | |
|
38 | 40 | // Code-mirror |
|
39 | 41 | '<%= dirs.js.src %>/codemirror/codemirror.js', |
|
40 | 42 | '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js', |
|
41 | 43 | '<%= dirs.js.src %>/codemirror/codemirror_hint.js', |
|
42 | 44 | '<%= dirs.js.src %>/codemirror/codemirror_overlay.js', |
|
43 | 45 | '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js', |
|
44 | 46 | // TODO: mikhail: this is an exception. Since the code mirror modes |
|
45 | 47 | // are loaded "on the fly", we need to keep them in a public folder |
|
46 | 48 | '<%= dirs.js.dest %>/mode/meta.js', |
|
47 | 49 | '<%= dirs.js.dest %>/mode/meta_ext.js', |
|
48 | 50 | '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js', |
|
49 | 51 | |
|
50 | 52 | // Rhodecode utilities |
|
51 | 53 | '<%= dirs.js.src %>/rhodecode/utils/array.js', |
|
52 | 54 | '<%= dirs.js.src %>/rhodecode/utils/string.js', |
|
53 | 55 | '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js', |
|
54 | 56 | '<%= dirs.js.src %>/rhodecode/utils/ajax.js', |
|
55 | 57 | '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js', |
|
56 | 58 | '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js', |
|
57 | 59 | '<%= dirs.js.src %>/rhodecode/utils/ie.js', |
|
58 | 60 | '<%= dirs.js.src %>/rhodecode/utils/os.js', |
|
61 | '<%= dirs.js.src %>/rhodecode/utils/topics.js', | |
|
59 | 62 | |
|
60 | 63 | // Rhodecode widgets |
|
61 | 64 | '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js', |
|
62 | 65 | |
|
63 | 66 | // Rhodecode components |
|
64 | 67 | '<%= dirs.js.src %>/rhodecode/init.js', |
|
68 | '<%= dirs.js.src %>/rhodecode/connection_controller.js', | |
|
65 | 69 | '<%= dirs.js.src %>/rhodecode/codemirror.js', |
|
66 | 70 | '<%= dirs.js.src %>/rhodecode/comments.js', |
|
67 | 71 | '<%= dirs.js.src %>/rhodecode/constants.js', |
|
68 | 72 | '<%= dirs.js.src %>/rhodecode/files.js', |
|
69 | 73 | '<%= dirs.js.src %>/rhodecode/followers.js', |
|
70 | 74 | '<%= dirs.js.src %>/rhodecode/menus.js', |
|
71 | 75 | '<%= dirs.js.src %>/rhodecode/notifications.js', |
|
72 | 76 | '<%= dirs.js.src %>/rhodecode/permissions.js', |
|
73 | 77 | '<%= dirs.js.src %>/rhodecode/pjax.js', |
|
74 | 78 | '<%= dirs.js.src %>/rhodecode/pullrequests.js', |
|
75 | 79 | '<%= dirs.js.src %>/rhodecode/settings.js', |
|
76 | 80 | '<%= dirs.js.src %>/rhodecode/select2_widgets.js', |
|
77 | 81 | '<%= dirs.js.src %>/rhodecode/tooltips.js', |
|
78 | 82 | '<%= dirs.js.src %>/rhodecode/users.js', |
|
83 | '<%= dirs.js.src %>/rhodecode/utils/notifications.js', | |
|
79 | 84 | '<%= dirs.js.src %>/rhodecode/appenlight.js', |
|
80 | 85 | |
|
81 | 86 | // Rhodecode main module |
|
82 | 87 | '<%= dirs.js.src %>/rhodecode.js' |
|
83 | 88 | ], |
|
84 | 89 | dest: '<%= dirs.js.dest %>/scripts.js', |
|
85 | 90 | nonull: true |
|
86 | 91 | } |
|
87 | 92 | }, |
|
88 | 93 | |
|
89 | 94 | less: { |
|
90 | 95 | development: { |
|
91 | 96 | options: { |
|
92 | 97 | compress: false, |
|
93 | 98 | yuicompress: false, |
|
94 | 99 | optimization: 0 |
|
95 | 100 | }, |
|
96 | 101 | files: { |
|
97 | 102 | "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less" |
|
98 | 103 | } |
|
99 | 104 | }, |
|
100 | 105 | production: { |
|
101 | 106 | options: { |
|
102 | 107 | compress: true, |
|
103 | 108 | yuicompress: true, |
|
104 | 109 | optimization: 2 |
|
105 | 110 | }, |
|
106 | 111 | files: { |
|
107 | 112 | "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less" |
|
108 | 113 | } |
|
109 | 114 | } |
|
110 | 115 | }, |
|
111 | 116 | |
|
112 | 117 | watch: { |
|
113 | 118 | less: { |
|
114 | 119 | files: ["<%= dirs.css %>/*.less"], |
|
115 | 120 | tasks: ["less:production"] |
|
116 | 121 | }, |
|
117 | 122 | js: { |
|
118 | 123 | files: ["<%= dirs.js.src %>/**/*.js"], |
|
119 | 124 | tasks: ["concat:dist"] |
|
120 | 125 | } |
|
121 | 126 | }, |
|
122 | 127 | |
|
123 | 128 | jshint: { |
|
124 | 129 | rhodecode: { |
|
125 | 130 | src: '<%= dirs.js.src %>/rhodecode/**/*.js', |
|
126 | 131 | options: { |
|
127 | 132 | jshintrc: '.jshintrc' |
|
128 | 133 | } |
|
129 | 134 | } |
|
130 | 135 | } |
|
131 | 136 | }); |
|
132 | 137 | |
|
133 | 138 | grunt.loadNpmTasks('grunt-contrib-less'); |
|
134 | 139 | grunt.loadNpmTasks('grunt-contrib-concat'); |
|
135 | 140 | grunt.loadNpmTasks('grunt-contrib-watch'); |
|
136 | 141 | grunt.loadNpmTasks('grunt-contrib-jshint'); |
|
137 | 142 | |
|
138 | 143 | grunt.registerTask('default', ['less:production', 'concat:dist']); |
|
139 | 144 | }; |
@@ -1,690 +1,692 b'' | |||
|
1 | 1 | This program is free software: you can redistribute it and/or modify |
|
2 | 2 | it under the terms of the GNU Affero General Public License, version 3 |
|
3 | 3 | (only), as published by the Free Software Foundation. |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | This program incorporates work covered by the following copyright and |
|
7 | 7 | permission notice: |
|
8 | 8 | |
|
9 | 9 | Copyright (c) 2014-2016 - packaging |
|
10 | 10 | file: |
|
11 | 11 | Copyright (c) 2008-2011 - msgpack-python |
|
12 | 12 | file:licenses/msgpack_license.txt |
|
13 | Copyright (c) 2009 - tornado | |
|
14 | file:licenses/tornado_license.txt | |
|
13 | 15 | |
|
14 |
|
|
|
16 | All licensed under the Apache License, Version 2.0 (the "License"); | |
|
15 | 17 | you may not use this file except in compliance with the License. |
|
16 | 18 | You may obtain a copy of the License at |
|
17 | 19 | |
|
18 | 20 | http://www.apache.org/licenses/LICENSE-2.0 |
|
19 | 21 | |
|
20 | 22 | Unless required by applicable law or agreed to in writing, software |
|
21 | 23 | distributed under the License is distributed on an "AS IS" BASIS, |
|
22 | 24 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
23 | 25 | See the License for the specific language governing permissions and |
|
24 | 26 | imitations under the License. |
|
25 | 27 | |
|
26 | 28 | |
|
27 | 29 | Below is the full text of GNU Affero General Public License, version 3 |
|
28 | 30 | |
|
29 | 31 | |
|
30 | 32 | GNU AFFERO GENERAL PUBLIC LICENSE |
|
31 | 33 | Version 3, 19 November 2007 |
|
32 | 34 | |
|
33 | 35 | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
|
34 | 36 | Everyone is permitted to copy and distribute verbatim copies |
|
35 | 37 | of this license document, but changing it is not allowed. |
|
36 | 38 | |
|
37 | 39 | Preamble |
|
38 | 40 | |
|
39 | 41 | The GNU Affero General Public License is a free, copyleft license for |
|
40 | 42 | software and other kinds of works, specifically designed to ensure |
|
41 | 43 | cooperation with the community in the case of network server software. |
|
42 | 44 | |
|
43 | 45 | The licenses for most software and other practical works are designed |
|
44 | 46 | to take away your freedom to share and change the works. By contrast, |
|
45 | 47 | our General Public Licenses are intended to guarantee your freedom to |
|
46 | 48 | share and change all versions of a program--to make sure it remains free |
|
47 | 49 | software for all its users. |
|
48 | 50 | |
|
49 | 51 | When we speak of free software, we are referring to freedom, not |
|
50 | 52 | price. Our General Public Licenses are designed to make sure that you |
|
51 | 53 | have the freedom to distribute copies of free software (and charge for |
|
52 | 54 | them if you wish), that you receive source code or can get it if you |
|
53 | 55 | want it, that you can change the software or use pieces of it in new |
|
54 | 56 | free programs, and that you know you can do these things. |
|
55 | 57 | |
|
56 | 58 | Developers that use our General Public Licenses protect your rights |
|
57 | 59 | with two steps: (1) assert copyright on the software, and (2) offer |
|
58 | 60 | you this License which gives you legal permission to copy, distribute |
|
59 | 61 | and/or modify the software. |
|
60 | 62 | |
|
61 | 63 | A secondary benefit of defending all users' freedom is that |
|
62 | 64 | improvements made in alternate versions of the program, if they |
|
63 | 65 | receive widespread use, become available for other developers to |
|
64 | 66 | incorporate. Many developers of free software are heartened and |
|
65 | 67 | encouraged by the resulting cooperation. However, in the case of |
|
66 | 68 | software used on network servers, this result may fail to come about. |
|
67 | 69 | The GNU General Public License permits making a modified version and |
|
68 | 70 | letting the public access it on a server without ever releasing its |
|
69 | 71 | source code to the public. |
|
70 | 72 | |
|
71 | 73 | The GNU Affero General Public License is designed specifically to |
|
72 | 74 | ensure that, in such cases, the modified source code becomes available |
|
73 | 75 | to the community. It requires the operator of a network server to |
|
74 | 76 | provide the source code of the modified version running there to the |
|
75 | 77 | users of that server. Therefore, public use of a modified version, on |
|
76 | 78 | a publicly accessible server, gives the public access to the source |
|
77 | 79 | code of the modified version. |
|
78 | 80 | |
|
79 | 81 | An older license, called the Affero General Public License and |
|
80 | 82 | published by Affero, was designed to accomplish similar goals. This is |
|
81 | 83 | a different license, not a version of the Affero GPL, but Affero has |
|
82 | 84 | released a new version of the Affero GPL which permits relicensing under |
|
83 | 85 | this license. |
|
84 | 86 | |
|
85 | 87 | The precise terms and conditions for copying, distribution and |
|
86 | 88 | modification follow. |
|
87 | 89 | |
|
88 | 90 | TERMS AND CONDITIONS |
|
89 | 91 | |
|
90 | 92 | 0. Definitions. |
|
91 | 93 | |
|
92 | 94 | "This License" refers to version 3 of the GNU Affero General Public License. |
|
93 | 95 | |
|
94 | 96 | "Copyright" also means copyright-like laws that apply to other kinds of |
|
95 | 97 | works, such as semiconductor masks. |
|
96 | 98 | |
|
97 | 99 | "The Program" refers to any copyrightable work licensed under this |
|
98 | 100 | License. Each licensee is addressed as "you". "Licensees" and |
|
99 | 101 | "recipients" may be individuals or organizations. |
|
100 | 102 | |
|
101 | 103 | To "modify" a work means to copy from or adapt all or part of the work |
|
102 | 104 | in a fashion requiring copyright permission, other than the making of an |
|
103 | 105 | exact copy. The resulting work is called a "modified version" of the |
|
104 | 106 | earlier work or a work "based on" the earlier work. |
|
105 | 107 | |
|
106 | 108 | A "covered work" means either the unmodified Program or a work based |
|
107 | 109 | on the Program. |
|
108 | 110 | |
|
109 | 111 | To "propagate" a work means to do anything with it that, without |
|
110 | 112 | permission, would make you directly or secondarily liable for |
|
111 | 113 | infringement under applicable copyright law, except executing it on a |
|
112 | 114 | computer or modifying a private copy. Propagation includes copying, |
|
113 | 115 | distribution (with or without modification), making available to the |
|
114 | 116 | public, and in some countries other activities as well. |
|
115 | 117 | |
|
116 | 118 | To "convey" a work means any kind of propagation that enables other |
|
117 | 119 | parties to make or receive copies. Mere interaction with a user through |
|
118 | 120 | a computer network, with no transfer of a copy, is not conveying. |
|
119 | 121 | |
|
120 | 122 | An interactive user interface displays "Appropriate Legal Notices" |
|
121 | 123 | to the extent that it includes a convenient and prominently visible |
|
122 | 124 | feature that (1) displays an appropriate copyright notice, and (2) |
|
123 | 125 | tells the user that there is no warranty for the work (except to the |
|
124 | 126 | extent that warranties are provided), that licensees may convey the |
|
125 | 127 | work under this License, and how to view a copy of this License. If |
|
126 | 128 | the interface presents a list of user commands or options, such as a |
|
127 | 129 | menu, a prominent item in the list meets this criterion. |
|
128 | 130 | |
|
129 | 131 | 1. Source Code. |
|
130 | 132 | |
|
131 | 133 | The "source code" for a work means the preferred form of the work |
|
132 | 134 | for making modifications to it. "Object code" means any non-source |
|
133 | 135 | form of a work. |
|
134 | 136 | |
|
135 | 137 | A "Standard Interface" means an interface that either is an official |
|
136 | 138 | standard defined by a recognized standards body, or, in the case of |
|
137 | 139 | interfaces specified for a particular programming language, one that |
|
138 | 140 | is widely used among developers working in that language. |
|
139 | 141 | |
|
140 | 142 | The "System Libraries" of an executable work include anything, other |
|
141 | 143 | than the work as a whole, that (a) is included in the normal form of |
|
142 | 144 | packaging a Major Component, but which is not part of that Major |
|
143 | 145 | Component, and (b) serves only to enable use of the work with that |
|
144 | 146 | Major Component, or to implement a Standard Interface for which an |
|
145 | 147 | implementation is available to the public in source code form. A |
|
146 | 148 | "Major Component", in this context, means a major essential component |
|
147 | 149 | (kernel, window system, and so on) of the specific operating system |
|
148 | 150 | (if any) on which the executable work runs, or a compiler used to |
|
149 | 151 | produce the work, or an object code interpreter used to run it. |
|
150 | 152 | |
|
151 | 153 | The "Corresponding Source" for a work in object code form means all |
|
152 | 154 | the source code needed to generate, install, and (for an executable |
|
153 | 155 | work) run the object code and to modify the work, including scripts to |
|
154 | 156 | control those activities. However, it does not include the work's |
|
155 | 157 | System Libraries, or general-purpose tools or generally available free |
|
156 | 158 | programs which are used unmodified in performing those activities but |
|
157 | 159 | which are not part of the work. For example, Corresponding Source |
|
158 | 160 | includes interface definition files associated with source files for |
|
159 | 161 | the work, and the source code for shared libraries and dynamically |
|
160 | 162 | linked subprograms that the work is specifically designed to require, |
|
161 | 163 | such as by intimate data communication or control flow between those |
|
162 | 164 | subprograms and other parts of the work. |
|
163 | 165 | |
|
164 | 166 | The Corresponding Source need not include anything that users |
|
165 | 167 | can regenerate automatically from other parts of the Corresponding |
|
166 | 168 | Source. |
|
167 | 169 | |
|
168 | 170 | The Corresponding Source for a work in source code form is that |
|
169 | 171 | same work. |
|
170 | 172 | |
|
171 | 173 | 2. Basic Permissions. |
|
172 | 174 | |
|
173 | 175 | All rights granted under this License are granted for the term of |
|
174 | 176 | copyright on the Program, and are irrevocable provided the stated |
|
175 | 177 | conditions are met. This License explicitly affirms your unlimited |
|
176 | 178 | permission to run the unmodified Program. The output from running a |
|
177 | 179 | covered work is covered by this License only if the output, given its |
|
178 | 180 | content, constitutes a covered work. This License acknowledges your |
|
179 | 181 | rights of fair use or other equivalent, as provided by copyright law. |
|
180 | 182 | |
|
181 | 183 | You may make, run and propagate covered works that you do not |
|
182 | 184 | convey, without conditions so long as your license otherwise remains |
|
183 | 185 | in force. You may convey covered works to others for the sole purpose |
|
184 | 186 | of having them make modifications exclusively for you, or provide you |
|
185 | 187 | with facilities for running those works, provided that you comply with |
|
186 | 188 | the terms of this License in conveying all material for which you do |
|
187 | 189 | not control copyright. Those thus making or running the covered works |
|
188 | 190 | for you must do so exclusively on your behalf, under your direction |
|
189 | 191 | and control, on terms that prohibit them from making any copies of |
|
190 | 192 | your copyrighted material outside their relationship with you. |
|
191 | 193 | |
|
192 | 194 | Conveying under any other circumstances is permitted solely under |
|
193 | 195 | the conditions stated below. Sublicensing is not allowed; section 10 |
|
194 | 196 | makes it unnecessary. |
|
195 | 197 | |
|
196 | 198 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
|
197 | 199 | |
|
198 | 200 | No covered work shall be deemed part of an effective technological |
|
199 | 201 | measure under any applicable law fulfilling obligations under article |
|
200 | 202 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or |
|
201 | 203 | similar laws prohibiting or restricting circumvention of such |
|
202 | 204 | measures. |
|
203 | 205 | |
|
204 | 206 | When you convey a covered work, you waive any legal power to forbid |
|
205 | 207 | circumvention of technological measures to the extent such circumvention |
|
206 | 208 | is effected by exercising rights under this License with respect to |
|
207 | 209 | the covered work, and you disclaim any intention to limit operation or |
|
208 | 210 | modification of the work as a means of enforcing, against the work's |
|
209 | 211 | users, your or third parties' legal rights to forbid circumvention of |
|
210 | 212 | technological measures. |
|
211 | 213 | |
|
212 | 214 | 4. Conveying Verbatim Copies. |
|
213 | 215 | |
|
214 | 216 | You may convey verbatim copies of the Program's source code as you |
|
215 | 217 | receive it, in any medium, provided that you conspicuously and |
|
216 | 218 | appropriately publish on each copy an appropriate copyright notice; |
|
217 | 219 | keep intact all notices stating that this License and any |
|
218 | 220 | non-permissive terms added in accord with section 7 apply to the code; |
|
219 | 221 | keep intact all notices of the absence of any warranty; and give all |
|
220 | 222 | recipients a copy of this License along with the Program. |
|
221 | 223 | |
|
222 | 224 | You may charge any price or no price for each copy that you convey, |
|
223 | 225 | and you may offer support or warranty protection for a fee. |
|
224 | 226 | |
|
225 | 227 | 5. Conveying Modified Source Versions. |
|
226 | 228 | |
|
227 | 229 | You may convey a work based on the Program, or the modifications to |
|
228 | 230 | produce it from the Program, in the form of source code under the |
|
229 | 231 | terms of section 4, provided that you also meet all of these conditions: |
|
230 | 232 | |
|
231 | 233 | a) The work must carry prominent notices stating that you modified |
|
232 | 234 | it, and giving a relevant date. |
|
233 | 235 | |
|
234 | 236 | b) The work must carry prominent notices stating that it is |
|
235 | 237 | released under this License and any conditions added under section |
|
236 | 238 | 7. This requirement modifies the requirement in section 4 to |
|
237 | 239 | "keep intact all notices". |
|
238 | 240 | |
|
239 | 241 | c) You must license the entire work, as a whole, under this |
|
240 | 242 | License to anyone who comes into possession of a copy. This |
|
241 | 243 | License will therefore apply, along with any applicable section 7 |
|
242 | 244 | additional terms, to the whole of the work, and all its parts, |
|
243 | 245 | regardless of how they are packaged. This License gives no |
|
244 | 246 | permission to license the work in any other way, but it does not |
|
245 | 247 | invalidate such permission if you have separately received it. |
|
246 | 248 | |
|
247 | 249 | d) If the work has interactive user interfaces, each must display |
|
248 | 250 | Appropriate Legal Notices; however, if the Program has interactive |
|
249 | 251 | interfaces that do not display Appropriate Legal Notices, your |
|
250 | 252 | work need not make them do so. |
|
251 | 253 | |
|
252 | 254 | A compilation of a covered work with other separate and independent |
|
253 | 255 | works, which are not by their nature extensions of the covered work, |
|
254 | 256 | and which are not combined with it such as to form a larger program, |
|
255 | 257 | in or on a volume of a storage or distribution medium, is called an |
|
256 | 258 | "aggregate" if the compilation and its resulting copyright are not |
|
257 | 259 | used to limit the access or legal rights of the compilation's users |
|
258 | 260 | beyond what the individual works permit. Inclusion of a covered work |
|
259 | 261 | in an aggregate does not cause this License to apply to the other |
|
260 | 262 | parts of the aggregate. |
|
261 | 263 | |
|
262 | 264 | 6. Conveying Non-Source Forms. |
|
263 | 265 | |
|
264 | 266 | You may convey a covered work in object code form under the terms |
|
265 | 267 | of sections 4 and 5, provided that you also convey the |
|
266 | 268 | machine-readable Corresponding Source under the terms of this License, |
|
267 | 269 | in one of these ways: |
|
268 | 270 | |
|
269 | 271 | a) Convey the object code in, or embodied in, a physical product |
|
270 | 272 | (including a physical distribution medium), accompanied by the |
|
271 | 273 | Corresponding Source fixed on a durable physical medium |
|
272 | 274 | customarily used for software interchange. |
|
273 | 275 | |
|
274 | 276 | b) Convey the object code in, or embodied in, a physical product |
|
275 | 277 | (including a physical distribution medium), accompanied by a |
|
276 | 278 | written offer, valid for at least three years and valid for as |
|
277 | 279 | long as you offer spare parts or customer support for that product |
|
278 | 280 | model, to give anyone who possesses the object code either (1) a |
|
279 | 281 | copy of the Corresponding Source for all the software in the |
|
280 | 282 | product that is covered by this License, on a durable physical |
|
281 | 283 | medium customarily used for software interchange, for a price no |
|
282 | 284 | more than your reasonable cost of physically performing this |
|
283 | 285 | conveying of source, or (2) access to copy the |
|
284 | 286 | Corresponding Source from a network server at no charge. |
|
285 | 287 | |
|
286 | 288 | c) Convey individual copies of the object code with a copy of the |
|
287 | 289 | written offer to provide the Corresponding Source. This |
|
288 | 290 | alternative is allowed only occasionally and noncommercially, and |
|
289 | 291 | only if you received the object code with such an offer, in accord |
|
290 | 292 | with subsection 6b. |
|
291 | 293 | |
|
292 | 294 | d) Convey the object code by offering access from a designated |
|
293 | 295 | place (gratis or for a charge), and offer equivalent access to the |
|
294 | 296 | Corresponding Source in the same way through the same place at no |
|
295 | 297 | further charge. You need not require recipients to copy the |
|
296 | 298 | Corresponding Source along with the object code. If the place to |
|
297 | 299 | copy the object code is a network server, the Corresponding Source |
|
298 | 300 | may be on a different server (operated by you or a third party) |
|
299 | 301 | that supports equivalent copying facilities, provided you maintain |
|
300 | 302 | clear directions next to the object code saying where to find the |
|
301 | 303 | Corresponding Source. Regardless of what server hosts the |
|
302 | 304 | Corresponding Source, you remain obligated to ensure that it is |
|
303 | 305 | available for as long as needed to satisfy these requirements. |
|
304 | 306 | |
|
305 | 307 | e) Convey the object code using peer-to-peer transmission, provided |
|
306 | 308 | you inform other peers where the object code and Corresponding |
|
307 | 309 | Source of the work are being offered to the general public at no |
|
308 | 310 | charge under subsection 6d. |
|
309 | 311 | |
|
310 | 312 | A separable portion of the object code, whose source code is excluded |
|
311 | 313 | from the Corresponding Source as a System Library, need not be |
|
312 | 314 | included in conveying the object code work. |
|
313 | 315 | |
|
314 | 316 | A "User Product" is either (1) a "consumer product", which means any |
|
315 | 317 | tangible personal property which is normally used for personal, family, |
|
316 | 318 | or household purposes, or (2) anything designed or sold for incorporation |
|
317 | 319 | into a dwelling. In determining whether a product is a consumer product, |
|
318 | 320 | doubtful cases shall be resolved in favor of coverage. For a particular |
|
319 | 321 | product received by a particular user, "normally used" refers to a |
|
320 | 322 | typical or common use of that class of product, regardless of the status |
|
321 | 323 | of the particular user or of the way in which the particular user |
|
322 | 324 | actually uses, or expects or is expected to use, the product. A product |
|
323 | 325 | is a consumer product regardless of whether the product has substantial |
|
324 | 326 | commercial, industrial or non-consumer uses, unless such uses represent |
|
325 | 327 | the only significant mode of use of the product. |
|
326 | 328 | |
|
327 | 329 | "Installation Information" for a User Product means any methods, |
|
328 | 330 | procedures, authorization keys, or other information required to install |
|
329 | 331 | and execute modified versions of a covered work in that User Product from |
|
330 | 332 | a modified version of its Corresponding Source. The information must |
|
331 | 333 | suffice to ensure that the continued functioning of the modified object |
|
332 | 334 | code is in no case prevented or interfered with solely because |
|
333 | 335 | modification has been made. |
|
334 | 336 | |
|
335 | 337 | If you convey an object code work under this section in, or with, or |
|
336 | 338 | specifically for use in, a User Product, and the conveying occurs as |
|
337 | 339 | part of a transaction in which the right of possession and use of the |
|
338 | 340 | User Product is transferred to the recipient in perpetuity or for a |
|
339 | 341 | fixed term (regardless of how the transaction is characterized), the |
|
340 | 342 | Corresponding Source conveyed under this section must be accompanied |
|
341 | 343 | by the Installation Information. But this requirement does not apply |
|
342 | 344 | if neither you nor any third party retains the ability to install |
|
343 | 345 | modified object code on the User Product (for example, the work has |
|
344 | 346 | been installed in ROM). |
|
345 | 347 | |
|
346 | 348 | The requirement to provide Installation Information does not include a |
|
347 | 349 | requirement to continue to provide support service, warranty, or updates |
|
348 | 350 | for a work that has been modified or installed by the recipient, or for |
|
349 | 351 | the User Product in which it has been modified or installed. Access to a |
|
350 | 352 | network may be denied when the modification itself materially and |
|
351 | 353 | adversely affects the operation of the network or violates the rules and |
|
352 | 354 | protocols for communication across the network. |
|
353 | 355 | |
|
354 | 356 | Corresponding Source conveyed, and Installation Information provided, |
|
355 | 357 | in accord with this section must be in a format that is publicly |
|
356 | 358 | documented (and with an implementation available to the public in |
|
357 | 359 | source code form), and must require no special password or key for |
|
358 | 360 | unpacking, reading or copying. |
|
359 | 361 | |
|
360 | 362 | 7. Additional Terms. |
|
361 | 363 | |
|
362 | 364 | "Additional permissions" are terms that supplement the terms of this |
|
363 | 365 | License by making exceptions from one or more of its conditions. |
|
364 | 366 | Additional permissions that are applicable to the entire Program shall |
|
365 | 367 | be treated as though they were included in this License, to the extent |
|
366 | 368 | that they are valid under applicable law. If additional permissions |
|
367 | 369 | apply only to part of the Program, that part may be used separately |
|
368 | 370 | under those permissions, but the entire Program remains governed by |
|
369 | 371 | this License without regard to the additional permissions. |
|
370 | 372 | |
|
371 | 373 | When you convey a copy of a covered work, you may at your option |
|
372 | 374 | remove any additional permissions from that copy, or from any part of |
|
373 | 375 | it. (Additional permissions may be written to require their own |
|
374 | 376 | removal in certain cases when you modify the work.) You may place |
|
375 | 377 | additional permissions on material, added by you to a covered work, |
|
376 | 378 | for which you have or can give appropriate copyright permission. |
|
377 | 379 | |
|
378 | 380 | Notwithstanding any other provision of this License, for material you |
|
379 | 381 | add to a covered work, you may (if authorized by the copyright holders of |
|
380 | 382 | that material) supplement the terms of this License with terms: |
|
381 | 383 | |
|
382 | 384 | a) Disclaiming warranty or limiting liability differently from the |
|
383 | 385 | terms of sections 15 and 16 of this License; or |
|
384 | 386 | |
|
385 | 387 | b) Requiring preservation of specified reasonable legal notices or |
|
386 | 388 | author attributions in that material or in the Appropriate Legal |
|
387 | 389 | Notices displayed by works containing it; or |
|
388 | 390 | |
|
389 | 391 | c) Prohibiting misrepresentation of the origin of that material, or |
|
390 | 392 | requiring that modified versions of such material be marked in |
|
391 | 393 | reasonable ways as different from the original version; or |
|
392 | 394 | |
|
393 | 395 | d) Limiting the use for publicity purposes of names of licensors or |
|
394 | 396 | authors of the material; or |
|
395 | 397 | |
|
396 | 398 | e) Declining to grant rights under trademark law for use of some |
|
397 | 399 | trade names, trademarks, or service marks; or |
|
398 | 400 | |
|
399 | 401 | f) Requiring indemnification of licensors and authors of that |
|
400 | 402 | material by anyone who conveys the material (or modified versions of |
|
401 | 403 | it) with contractual assumptions of liability to the recipient, for |
|
402 | 404 | any liability that these contractual assumptions directly impose on |
|
403 | 405 | those licensors and authors. |
|
404 | 406 | |
|
405 | 407 | All other non-permissive additional terms are considered "further |
|
406 | 408 | restrictions" within the meaning of section 10. If the Program as you |
|
407 | 409 | received it, or any part of it, contains a notice stating that it is |
|
408 | 410 | governed by this License along with a term that is a further |
|
409 | 411 | restriction, you may remove that term. If a license document contains |
|
410 | 412 | a further restriction but permits relicensing or conveying under this |
|
411 | 413 | License, you may add to a covered work material governed by the terms |
|
412 | 414 | of that license document, provided that the further restriction does |
|
413 | 415 | not survive such relicensing or conveying. |
|
414 | 416 | |
|
415 | 417 | If you add terms to a covered work in accord with this section, you |
|
416 | 418 | must place, in the relevant source files, a statement of the |
|
417 | 419 | additional terms that apply to those files, or a notice indicating |
|
418 | 420 | where to find the applicable terms. |
|
419 | 421 | |
|
420 | 422 | Additional terms, permissive or non-permissive, may be stated in the |
|
421 | 423 | form of a separately written license, or stated as exceptions; |
|
422 | 424 | the above requirements apply either way. |
|
423 | 425 | |
|
424 | 426 | 8. Termination. |
|
425 | 427 | |
|
426 | 428 | You may not propagate or modify a covered work except as expressly |
|
427 | 429 | provided under this License. Any attempt otherwise to propagate or |
|
428 | 430 | modify it is void, and will automatically terminate your rights under |
|
429 | 431 | this License (including any patent licenses granted under the third |
|
430 | 432 | paragraph of section 11). |
|
431 | 433 | |
|
432 | 434 | However, if you cease all violation of this License, then your |
|
433 | 435 | license from a particular copyright holder is reinstated (a) |
|
434 | 436 | provisionally, unless and until the copyright holder explicitly and |
|
435 | 437 | finally terminates your license, and (b) permanently, if the copyright |
|
436 | 438 | holder fails to notify you of the violation by some reasonable means |
|
437 | 439 | prior to 60 days after the cessation. |
|
438 | 440 | |
|
439 | 441 | Moreover, your license from a particular copyright holder is |
|
440 | 442 | reinstated permanently if the copyright holder notifies you of the |
|
441 | 443 | violation by some reasonable means, this is the first time you have |
|
442 | 444 | received notice of violation of this License (for any work) from that |
|
443 | 445 | copyright holder, and you cure the violation prior to 30 days after |
|
444 | 446 | your receipt of the notice. |
|
445 | 447 | |
|
446 | 448 | Termination of your rights under this section does not terminate the |
|
447 | 449 | licenses of parties who have received copies or rights from you under |
|
448 | 450 | this License. If your rights have been terminated and not permanently |
|
449 | 451 | reinstated, you do not qualify to receive new licenses for the same |
|
450 | 452 | material under section 10. |
|
451 | 453 | |
|
452 | 454 | 9. Acceptance Not Required for Having Copies. |
|
453 | 455 | |
|
454 | 456 | You are not required to accept this License in order to receive or |
|
455 | 457 | run a copy of the Program. Ancillary propagation of a covered work |
|
456 | 458 | occurring solely as a consequence of using peer-to-peer transmission |
|
457 | 459 | to receive a copy likewise does not require acceptance. However, |
|
458 | 460 | nothing other than this License grants you permission to propagate or |
|
459 | 461 | modify any covered work. These actions infringe copyright if you do |
|
460 | 462 | not accept this License. Therefore, by modifying or propagating a |
|
461 | 463 | covered work, you indicate your acceptance of this License to do so. |
|
462 | 464 | |
|
463 | 465 | 10. Automatic Licensing of Downstream Recipients. |
|
464 | 466 | |
|
465 | 467 | Each time you convey a covered work, the recipient automatically |
|
466 | 468 | receives a license from the original licensors, to run, modify and |
|
467 | 469 | propagate that work, subject to this License. You are not responsible |
|
468 | 470 | for enforcing compliance by third parties with this License. |
|
469 | 471 | |
|
470 | 472 | An "entity transaction" is a transaction transferring control of an |
|
471 | 473 | organization, or substantially all assets of one, or subdividing an |
|
472 | 474 | organization, or merging organizations. If propagation of a covered |
|
473 | 475 | work results from an entity transaction, each party to that |
|
474 | 476 | transaction who receives a copy of the work also receives whatever |
|
475 | 477 | licenses to the work the party's predecessor in interest had or could |
|
476 | 478 | give under the previous paragraph, plus a right to possession of the |
|
477 | 479 | Corresponding Source of the work from the predecessor in interest, if |
|
478 | 480 | the predecessor has it or can get it with reasonable efforts. |
|
479 | 481 | |
|
480 | 482 | You may not impose any further restrictions on the exercise of the |
|
481 | 483 | rights granted or affirmed under this License. For example, you may |
|
482 | 484 | not impose a license fee, royalty, or other charge for exercise of |
|
483 | 485 | rights granted under this License, and you may not initiate litigation |
|
484 | 486 | (including a cross-claim or counterclaim in a lawsuit) alleging that |
|
485 | 487 | any patent claim is infringed by making, using, selling, offering for |
|
486 | 488 | sale, or importing the Program or any portion of it. |
|
487 | 489 | |
|
488 | 490 | 11. Patents. |
|
489 | 491 | |
|
490 | 492 | A "contributor" is a copyright holder who authorizes use under this |
|
491 | 493 | License of the Program or a work on which the Program is based. The |
|
492 | 494 | work thus licensed is called the contributor's "contributor version". |
|
493 | 495 | |
|
494 | 496 | A contributor's "essential patent claims" are all patent claims |
|
495 | 497 | owned or controlled by the contributor, whether already acquired or |
|
496 | 498 | hereafter acquired, that would be infringed by some manner, permitted |
|
497 | 499 | by this License, of making, using, or selling its contributor version, |
|
498 | 500 | but do not include claims that would be infringed only as a |
|
499 | 501 | consequence of further modification of the contributor version. For |
|
500 | 502 | purposes of this definition, "control" includes the right to grant |
|
501 | 503 | patent sublicenses in a manner consistent with the requirements of |
|
502 | 504 | this License. |
|
503 | 505 | |
|
504 | 506 | Each contributor grants you a non-exclusive, worldwide, royalty-free |
|
505 | 507 | patent license under the contributor's essential patent claims, to |
|
506 | 508 | make, use, sell, offer for sale, import and otherwise run, modify and |
|
507 | 509 | propagate the contents of its contributor version. |
|
508 | 510 | |
|
509 | 511 | In the following three paragraphs, a "patent license" is any express |
|
510 | 512 | agreement or commitment, however denominated, not to enforce a patent |
|
511 | 513 | (such as an express permission to practice a patent or covenant not to |
|
512 | 514 | sue for patent infringement). To "grant" such a patent license to a |
|
513 | 515 | party means to make such an agreement or commitment not to enforce a |
|
514 | 516 | patent against the party. |
|
515 | 517 | |
|
516 | 518 | If you convey a covered work, knowingly relying on a patent license, |
|
517 | 519 | and the Corresponding Source of the work is not available for anyone |
|
518 | 520 | to copy, free of charge and under the terms of this License, through a |
|
519 | 521 | publicly available network server or other readily accessible means, |
|
520 | 522 | then you must either (1) cause the Corresponding Source to be so |
|
521 | 523 | available, or (2) arrange to deprive yourself of the benefit of the |
|
522 | 524 | patent license for this particular work, or (3) arrange, in a manner |
|
523 | 525 | consistent with the requirements of this License, to extend the patent |
|
524 | 526 | license to downstream recipients. "Knowingly relying" means you have |
|
525 | 527 | actual knowledge that, but for the patent license, your conveying the |
|
526 | 528 | covered work in a country, or your recipient's use of the covered work |
|
527 | 529 | in a country, would infringe one or more identifiable patents in that |
|
528 | 530 | country that you have reason to believe are valid. |
|
529 | 531 | |
|
530 | 532 | If, pursuant to or in connection with a single transaction or |
|
531 | 533 | arrangement, you convey, or propagate by procuring conveyance of, a |
|
532 | 534 | covered work, and grant a patent license to some of the parties |
|
533 | 535 | receiving the covered work authorizing them to use, propagate, modify |
|
534 | 536 | or convey a specific copy of the covered work, then the patent license |
|
535 | 537 | you grant is automatically extended to all recipients of the covered |
|
536 | 538 | work and works based on it. |
|
537 | 539 | |
|
538 | 540 | A patent license is "discriminatory" if it does not include within |
|
539 | 541 | the scope of its coverage, prohibits the exercise of, or is |
|
540 | 542 | conditioned on the non-exercise of one or more of the rights that are |
|
541 | 543 | specifically granted under this License. You may not convey a covered |
|
542 | 544 | work if you are a party to an arrangement with a third party that is |
|
543 | 545 | in the business of distributing software, under which you make payment |
|
544 | 546 | to the third party based on the extent of your activity of conveying |
|
545 | 547 | the work, and under which the third party grants, to any of the |
|
546 | 548 | parties who would receive the covered work from you, a discriminatory |
|
547 | 549 | patent license (a) in connection with copies of the covered work |
|
548 | 550 | conveyed by you (or copies made from those copies), or (b) primarily |
|
549 | 551 | for and in connection with specific products or compilations that |
|
550 | 552 | contain the covered work, unless you entered into that arrangement, |
|
551 | 553 | or that patent license was granted, prior to 28 March 2007. |
|
552 | 554 | |
|
553 | 555 | Nothing in this License shall be construed as excluding or limiting |
|
554 | 556 | any implied license or other defenses to infringement that may |
|
555 | 557 | otherwise be available to you under applicable patent law. |
|
556 | 558 | |
|
557 | 559 | 12. No Surrender of Others' Freedom. |
|
558 | 560 | |
|
559 | 561 | If conditions are imposed on you (whether by court order, agreement or |
|
560 | 562 | otherwise) that contradict the conditions of this License, they do not |
|
561 | 563 | excuse you from the conditions of this License. If you cannot convey a |
|
562 | 564 | covered work so as to satisfy simultaneously your obligations under this |
|
563 | 565 | License and any other pertinent obligations, then as a consequence you may |
|
564 | 566 | not convey it at all. For example, if you agree to terms that obligate you |
|
565 | 567 | to collect a royalty for further conveying from those to whom you convey |
|
566 | 568 | the Program, the only way you could satisfy both those terms and this |
|
567 | 569 | License would be to refrain entirely from conveying the Program. |
|
568 | 570 | |
|
569 | 571 | 13. Remote Network Interaction; Use with the GNU General Public License. |
|
570 | 572 | |
|
571 | 573 | Notwithstanding any other provision of this License, if you modify the |
|
572 | 574 | Program, your modified version must prominently offer all users |
|
573 | 575 | interacting with it remotely through a computer network (if your version |
|
574 | 576 | supports such interaction) an opportunity to receive the Corresponding |
|
575 | 577 | Source of your version by providing access to the Corresponding Source |
|
576 | 578 | from a network server at no charge, through some standard or customary |
|
577 | 579 | means of facilitating copying of software. This Corresponding Source |
|
578 | 580 | shall include the Corresponding Source for any work covered by version 3 |
|
579 | 581 | of the GNU General Public License that is incorporated pursuant to the |
|
580 | 582 | following paragraph. |
|
581 | 583 | |
|
582 | 584 | Notwithstanding any other provision of this License, you have |
|
583 | 585 | permission to link or combine any covered work with a work licensed |
|
584 | 586 | under version 3 of the GNU General Public License into a single |
|
585 | 587 | combined work, and to convey the resulting work. The terms of this |
|
586 | 588 | License will continue to apply to the part which is the covered work, |
|
587 | 589 | but the work with which it is combined will remain governed by version |
|
588 | 590 | 3 of the GNU General Public License. |
|
589 | 591 | |
|
590 | 592 | 14. Revised Versions of this License. |
|
591 | 593 | |
|
592 | 594 | The Free Software Foundation may publish revised and/or new versions of |
|
593 | 595 | the GNU Affero General Public License from time to time. Such new versions |
|
594 | 596 | will be similar in spirit to the present version, but may differ in detail to |
|
595 | 597 | address new problems or concerns. |
|
596 | 598 | |
|
597 | 599 | Each version is given a distinguishing version number. If the |
|
598 | 600 | Program specifies that a certain numbered version of the GNU Affero General |
|
599 | 601 | Public License "or any later version" applies to it, you have the |
|
600 | 602 | option of following the terms and conditions either of that numbered |
|
601 | 603 | version or of any later version published by the Free Software |
|
602 | 604 | Foundation. If the Program does not specify a version number of the |
|
603 | 605 | GNU Affero General Public License, you may choose any version ever published |
|
604 | 606 | by the Free Software Foundation. |
|
605 | 607 | |
|
606 | 608 | If the Program specifies that a proxy can decide which future |
|
607 | 609 | versions of the GNU Affero General Public License can be used, that proxy's |
|
608 | 610 | public statement of acceptance of a version permanently authorizes you |
|
609 | 611 | to choose that version for the Program. |
|
610 | 612 | |
|
611 | 613 | Later license versions may give you additional or different |
|
612 | 614 | permissions. However, no additional obligations are imposed on any |
|
613 | 615 | author or copyright holder as a result of your choosing to follow a |
|
614 | 616 | later version. |
|
615 | 617 | |
|
616 | 618 | 15. Disclaimer of Warranty. |
|
617 | 619 | |
|
618 | 620 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
|
619 | 621 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
|
620 | 622 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
|
621 | 623 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
|
622 | 624 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
623 | 625 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
|
624 | 626 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
|
625 | 627 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
|
626 | 628 | |
|
627 | 629 | 16. Limitation of Liability. |
|
628 | 630 | |
|
629 | 631 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
|
630 | 632 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
|
631 | 633 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
|
632 | 634 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
|
633 | 635 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
|
634 | 636 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
|
635 | 637 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
|
636 | 638 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
|
637 | 639 | SUCH DAMAGES. |
|
638 | 640 | |
|
639 | 641 | 17. Interpretation of Sections 15 and 16. |
|
640 | 642 | |
|
641 | 643 | If the disclaimer of warranty and limitation of liability provided |
|
642 | 644 | above cannot be given local legal effect according to their terms, |
|
643 | 645 | reviewing courts shall apply local law that most closely approximates |
|
644 | 646 | an absolute waiver of all civil liability in connection with the |
|
645 | 647 | Program, unless a warranty or assumption of liability accompanies a |
|
646 | 648 | copy of the Program in return for a fee. |
|
647 | 649 | |
|
648 | 650 | END OF TERMS AND CONDITIONS |
|
649 | 651 | |
|
650 | 652 | How to Apply These Terms to Your New Programs |
|
651 | 653 | |
|
652 | 654 | If you develop a new program, and you want it to be of the greatest |
|
653 | 655 | possible use to the public, the best way to achieve this is to make it |
|
654 | 656 | free software which everyone can redistribute and change under these terms. |
|
655 | 657 | |
|
656 | 658 | To do so, attach the following notices to the program. It is safest |
|
657 | 659 | to attach them to the start of each source file to most effectively |
|
658 | 660 | state the exclusion of warranty; and each file should have at least |
|
659 | 661 | the "copyright" line and a pointer to where the full notice is found. |
|
660 | 662 | |
|
661 | 663 | <one line to give the program's name and a brief idea of what it does.> |
|
662 | 664 | Copyright (C) <year> <name of author> |
|
663 | 665 | |
|
664 | 666 | This program is free software: you can redistribute it and/or modify |
|
665 | 667 | it under the terms of the GNU Affero General Public License as published by |
|
666 | 668 | the Free Software Foundation, either version 3 of the License, or |
|
667 | 669 | (at your option) any later version. |
|
668 | 670 | |
|
669 | 671 | This program is distributed in the hope that it will be useful, |
|
670 | 672 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
671 | 673 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
672 | 674 | GNU Affero General Public License for more details. |
|
673 | 675 | |
|
674 | 676 | You should have received a copy of the GNU Affero General Public License |
|
675 | 677 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
676 | 678 | |
|
677 | 679 | Also add information on how to contact you by electronic and paper mail. |
|
678 | 680 | |
|
679 | 681 | If your software can interact with users remotely through a computer |
|
680 | 682 | network, you should also make sure that it provides a way for users to |
|
681 | 683 | get its source. For example, if your program is a web application, its |
|
682 | 684 | interface could display a "Source" link that leads users to an archive |
|
683 | 685 | of the code. There are many ways you could offer source, and different |
|
684 | 686 | solutions will be better for different programs; see section 13 for the |
|
685 | 687 | specific requirements. |
|
686 | 688 | |
|
687 | 689 | You should also get your employer (if you work as a programmer) or school, |
|
688 | 690 | if any, to sign a "copyright disclaimer" for the program, if necessary. |
|
689 | 691 | For more information on this, and how to apply and follow the GNU AGPL, see |
|
690 | 692 | <http://www.gnu.org/licenses/>. |
@@ -1,48 +1,48 b'' | |||
|
1 | 1 | # top level files |
|
2 | 2 | include test.ini |
|
3 | 3 | include MANIFEST.in |
|
4 | 4 | include README.rst |
|
5 | include CHANGES.rst | |
|
6 | include LICENSE.txt | |
|
7 | ||
|
5 | 8 | include rhodecode/VERSION |
|
6 | 9 | |
|
7 | 10 | # docs |
|
8 | 11 | recursive-include docs * |
|
9 | 12 | |
|
10 | # init.d | |
|
11 |
recursive-include |
|
|
13 | # all config files | |
|
14 | recursive-include configs * | |
|
12 | 15 | |
|
13 | 16 | # translations |
|
14 | 17 | recursive-include rhodecode/i18n * |
|
15 | 18 | |
|
16 | # bin stuff | |
|
17 | recursive-include rhodecode/bin * | |
|
18 | ||
|
19 | 19 | # hook templates |
|
20 | 20 | recursive-include rhodecode/config/hook_templates * |
|
21 | 21 | |
|
22 | 22 | # non-python core stuff |
|
23 | 23 | recursive-include rhodecode *.cfg |
|
24 | 24 | recursive-include rhodecode *.json |
|
25 | 25 | recursive-include rhodecode *.ini_tmpl |
|
26 | 26 | recursive-include rhodecode *.sh |
|
27 | 27 | |
|
28 | 28 | # images, css |
|
29 | 29 | include rhodecode/public/css/*.css |
|
30 | 30 | include rhodecode/public/images/*.* |
|
31 | 31 | |
|
32 | 32 | # sound files |
|
33 | 33 | include rhodecode/public/sounds/*.mp3 |
|
34 | 34 | include rhodecode/public/sounds/*.wav |
|
35 | 35 | |
|
36 | 36 | # fonts |
|
37 | 37 | recursive-include rhodecode/public/fonts/ProximaNova * |
|
38 | 38 | recursive-include rhodecode/public/fonts/RCIcons * |
|
39 | 39 | |
|
40 | 40 | # js |
|
41 | 41 | recursive-include rhodecode/public/js * |
|
42 | 42 | |
|
43 | 43 | # templates |
|
44 | 44 | recursive-include rhodecode/templates * |
|
45 | 45 | |
|
46 | 46 | # skip any tests files |
|
47 | 47 | recursive-exclude rhodecode/tests * |
|
48 | 48 |
@@ -1,47 +1,47 b'' | |||
|
1 | 1 | |
|
2 | 2 | WEBPACK=./node_modules/webpack/bin/webpack.js |
|
3 | 3 | GRUNT=grunt |
|
4 | 4 | NODE_PATH=./node_modules |
|
5 | 5 | FLAKE8=flake8 setup.py pytest_pylons/ rhodecode/ --select=E124 --ignore=E711,E712,E510,E121,E122,E126,E127,E128,E501,F401 --max-line-length=100 --exclude=*rhodecode/lib/dbmigrate/*,*rhodecode/tests/*,*rhodecode/lib/vcs/utils/* |
|
6 | 6 | CI_PREFIX=enterprise |
|
7 | 7 | |
|
8 | 8 | .PHONY: docs docs-clean ci-docs clean test test-clean test-lint test-only |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | docs: |
|
12 | 12 | (cd docs; nix-build default.nix -o result; make clean html) |
|
13 | 13 | |
|
14 | 14 | docs-clean: |
|
15 | 15 | (cd docs; make clean) |
|
16 | 16 | |
|
17 | 17 | ci-docs: docs; |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | clean: test-clean |
|
21 | 21 | find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' \) -exec rm '{}' ';' |
|
22 | 22 | |
|
23 |
test: test-clean test- |
|
|
23 | test: test-clean test-only | |
|
24 | 24 | |
|
25 | 25 | test-clean: |
|
26 | 26 | rm -rf coverage.xml htmlcov junit.xml pylint.log result |
|
27 | 27 | |
|
28 | 28 | test-lint: |
|
29 | 29 | if [ "$$IN_NIX_SHELL" = "1" ]; then \ |
|
30 | 30 | $(FLAKE8); \ |
|
31 | 31 | else \ |
|
32 | 32 | $(FLAKE8) --format=pylint --exit-zero > pylint.log; \ |
|
33 | 33 | fi |
|
34 | 34 | |
|
35 | 35 | test-only: |
|
36 | 36 | PYTHONHASHSEED=random py.test -vv -r xw --cov=rhodecode --cov-report=term-missing --cov-report=html rhodecode/tests/ |
|
37 | 37 | |
|
38 | 38 | web-build: |
|
39 | 39 | NODE_PATH=$(NODE_PATH) $(GRUNT) |
|
40 | 40 | |
|
41 | 41 | web-test: |
|
42 | 42 | @echo "no test for our javascript, yet!" |
|
43 | 43 | |
|
44 | 44 | docs-bootstrap: |
|
45 | 45 | (cd docs; nix-build default.nix -o result) |
|
46 | 46 | @echo "Please go to docs folder and run make html" |
|
47 | 47 |
@@ -1,612 +1,672 b'' | |||
|
1 | ################################################################################ | |
|
1 | ||
|
2 | ||
|
2 | 3 | ################################################################################ |
|
3 | # RhodeCode Enterprise - configuration file # | |
|
4 | # Built-in functions and variables # | |
|
4 | ## RHODECODE ENTERPRISE CONFIGURATION ## | |
|
5 | 5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
6 | # # | |
|
7 | 6 | ################################################################################ |
|
8 | 7 | |
|
9 | 8 | [DEFAULT] |
|
10 | 9 | debug = true |
|
10 | ||
|
11 | 11 | ################################################################################ |
|
12 | ## EMAIL CONFIGURATION ## | |
|
12 | 13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | 14 | ## any error reports after an application crash ## |
|
14 | 15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | 16 | ################################################################################ |
|
16 | #email_to = admin@localhost | |
|
17 | #error_email_from = paste_error@localhost | |
|
17 | ||
|
18 | ## prefix all emails subjects with given prefix, helps filtering out emails | |
|
19 | #email_prefix = [RhodeCode] | |
|
20 | ||
|
21 | ## email FROM address all mails will be sent | |
|
18 | 22 | #app_email_from = rhodecode-noreply@localhost |
|
23 | ||
|
24 | ## Uncomment and replace with the address which should receive any error report | |
|
25 | ## note: using appenlight for error handling doesn't need this to be uncommented | |
|
26 | #email_to = admin@localhost | |
|
27 | ||
|
28 | ## in case of Application errors, sent an error email form | |
|
29 | #error_email_from = rhodecode_error@localhost | |
|
30 | ||
|
31 | ## additional error message to be send in case of server crash | |
|
19 | 32 | #error_message = |
|
20 | #email_prefix = [RhodeCode] | |
|
33 | ||
|
21 | 34 | |
|
22 | 35 | #smtp_server = mail.server.com |
|
23 | 36 | #smtp_username = |
|
24 | 37 | #smtp_password = |
|
25 | 38 | #smtp_port = |
|
26 | 39 | #smtp_use_tls = false |
|
27 | 40 | #smtp_use_ssl = true |
|
28 | 41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
29 | 42 | #smtp_auth = |
|
30 | 43 | |
|
31 | 44 | [server:main] |
|
32 | 45 | ## COMMON ## |
|
33 | 46 | host = 127.0.0.1 |
|
34 | 47 | port = 5000 |
|
35 | 48 | |
|
36 | 49 | ################################## |
|
37 | 50 | ## WAITRESS WSGI SERVER ## |
|
38 | 51 | ## Recommended for Development ## |
|
39 | 52 | ################################## |
|
53 | ||
|
40 | 54 | use = egg:waitress#main |
|
41 | 55 | ## number of worker threads |
|
42 | 56 | threads = 5 |
|
43 | 57 | ## MAX BODY SIZE 100GB |
|
44 | 58 | max_request_body_size = 107374182400 |
|
45 | 59 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
46 | 60 | ## May not work on old windows systems. |
|
47 | 61 | asyncore_use_poll = true |
|
48 | 62 | |
|
49 | 63 | |
|
50 | 64 | ########################## |
|
51 | 65 | ## GUNICORN WSGI SERVER ## |
|
52 | 66 | ########################## |
|
53 | 67 | ## run with gunicorn --log-config <inifile.ini> --paste <inifile.ini> |
|
68 | ||
|
54 | 69 | #use = egg:gunicorn#main |
|
55 | 70 | ## Sets the number of process workers. You must set `instance_id = *` |
|
56 | 71 | ## when this option is set to more than one worker, recommended |
|
57 | 72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers |
|
58 | 73 | ## The `instance_id = *` must be set in the [app:main] section below |
|
59 | 74 | #workers = 2 |
|
60 | 75 | ## number of threads for each of the worker, must be set to 1 for gevent |
|
61 | 76 | ## generally recommened to be at 1 |
|
62 | 77 | #threads = 1 |
|
63 | 78 | ## process name |
|
64 | 79 | #proc_name = rhodecode |
|
65 | 80 | ## type of worker class, one of sync, gevent |
|
66 | 81 | ## recommended for bigger setup is using of of other than sync one |
|
67 | 82 | #worker_class = sync |
|
68 | 83 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
69 | 84 | #worker_connections = 10 |
|
70 | 85 | ## max number of requests that worker will handle before being gracefully |
|
71 | 86 | ## restarted, could prevent memory leaks |
|
72 | 87 | #max_requests = 1000 |
|
73 | 88 | #max_requests_jitter = 30 |
|
74 | 89 | ## amount of time a worker can spend with handling a request before it |
|
75 | 90 | ## gets killed and restarted. Set to 6hrs |
|
76 | 91 | #timeout = 21600 |
|
77 | 92 | |
|
78 | 93 | |
|
79 | 94 | ## prefix middleware for RhodeCode, disables force_https flag. |
|
95 | ## recommended when using proxy setup. | |
|
80 | 96 | ## allows to set RhodeCode under a prefix in server. |
|
81 | 97 | ## eg https://server.com/<prefix>. Enable `filter-with =` option below as well. |
|
82 | #[filter:proxy-prefix] | |
|
83 | #use = egg:PasteDeploy#prefix | |
|
84 | #prefix = /<your-prefix> | |
|
98 | ## optionally set prefix like: `prefix = /<your-prefix>` | |
|
99 | [filter:proxy-prefix] | |
|
100 | use = egg:PasteDeploy#prefix | |
|
101 | prefix = / | |
|
85 | 102 | |
|
86 | 103 | [app:main] |
|
87 | 104 | use = egg:rhodecode-enterprise-ce |
|
88 | ## enable proxy prefix middleware, defined below | |
|
105 | ||
|
106 | ## enable proxy prefix middleware, defined above | |
|
89 | 107 | #filter-with = proxy-prefix |
|
90 | 108 | |
|
91 | 109 | # During development the we want to have the debug toolbar enabled |
|
92 | 110 | pyramid.includes = |
|
93 | 111 | pyramid_debugtoolbar |
|
94 | 112 | rhodecode.utils.debugtoolbar |
|
95 | 113 | rhodecode.lib.middleware.request_wrapper |
|
96 | 114 | |
|
97 | 115 | pyramid.reload_templates = true |
|
98 | 116 | |
|
99 | 117 | debugtoolbar.hosts = 0.0.0.0/0 |
|
100 | 118 | debugtoolbar.exclude_prefixes = |
|
101 | 119 | /css |
|
102 | 120 | /fonts |
|
103 | 121 | /images |
|
104 | 122 | /js |
|
105 | 123 | |
|
106 | 124 | ## RHODECODE PLUGINS ## |
|
107 | 125 | rhodecode.includes = |
|
108 | 126 | rhodecode.api |
|
109 | 127 | |
|
110 | 128 | |
|
111 | 129 | # api prefix url |
|
112 | 130 | rhodecode.api.url = /_admin/api |
|
113 | 131 | |
|
114 | 132 | |
|
115 | 133 | ## END RHODECODE PLUGINS ## |
|
116 | 134 | |
|
117 | 135 | ## encryption key used to encrypt social plugin tokens, |
|
118 | 136 | ## remote_urls with credentials etc, if not set it defaults to |
|
119 | 137 | ## `beaker.session.secret` |
|
120 | 138 | #rhodecode.encrypted_values.secret = |
|
121 | 139 | |
|
122 | 140 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
123 | 141 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
124 | 142 | #rhodecode.encrypted_values.strict = false |
|
125 | 143 | |
|
126 | full_stack = true | |
|
144 | ## return gzipped responses from Rhodecode (static files/application) | |
|
145 | gzip_responses = false | |
|
127 | 146 | |
|
128 | ## Serve static files via RhodeCode, disable to serve them via HTTP server | |
|
129 | static_files = true | |
|
130 | ||
|
131 | # autogenerate javascript routes file on startup | |
|
147 | ## autogenerate javascript routes file on startup | |
|
132 | 148 | generate_js_files = false |
|
133 | 149 | |
|
134 | 150 | ## Optional Languages |
|
135 | 151 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
136 | 152 | lang = en |
|
137 | 153 | |
|
138 | 154 | ## perform a full repository scan on each server start, this should be |
|
139 | 155 | ## set to false after first startup, to allow faster server restarts. |
|
140 | 156 | startup.import_repos = false |
|
141 | 157 | |
|
142 | 158 | ## Uncomment and set this path to use archive download cache. |
|
143 | 159 | ## Once enabled, generated archives will be cached at this location |
|
144 | 160 | ## and served from the cache during subsequent requests for the same archive of |
|
145 | 161 | ## the repository. |
|
146 | 162 | #archive_cache_dir = /tmp/tarballcache |
|
147 | 163 | |
|
148 | 164 | ## change this to unique ID for security |
|
149 | 165 | app_instance_uuid = rc-production |
|
150 | 166 | |
|
151 | 167 | ## cut off limit for large diffs (size in bytes) |
|
152 | 168 | cut_off_limit_diff = 1024000 |
|
153 | 169 | cut_off_limit_file = 256000 |
|
154 | 170 | |
|
155 | 171 | ## use cache version of scm repo everywhere |
|
156 | 172 | vcs_full_cache = true |
|
157 | 173 | |
|
158 | 174 | ## force https in RhodeCode, fixes https redirects, assumes it's always https |
|
159 | 175 | ## Normally this is controlled by proper http flags sent from http server |
|
160 | 176 | force_https = false |
|
161 | 177 | |
|
162 | 178 | ## use Strict-Transport-Security headers |
|
163 | 179 | use_htsts = false |
|
164 | 180 | |
|
165 | 181 | ## number of commits stats will parse on each iteration |
|
166 | 182 | commit_parse_limit = 25 |
|
167 | 183 | |
|
168 | 184 | ## git rev filter option, --all is the default filter, if you need to |
|
169 | 185 | ## hide all refs in changelog switch this to --branches --tags |
|
170 | 186 | git_rev_filter = --branches --tags |
|
171 | 187 | |
|
172 | 188 | # Set to true if your repos are exposed using the dumb protocol |
|
173 | 189 | git_update_server_info = false |
|
174 | 190 | |
|
175 | 191 | ## RSS/ATOM feed options |
|
176 | 192 | rss_cut_off_limit = 256000 |
|
177 | 193 | rss_items_per_page = 10 |
|
178 | 194 | rss_include_diff = false |
|
179 | 195 | |
|
180 | 196 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
181 | 197 | ## url that does rewrites to _admin/gists/<gistid>. |
|
182 | 198 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
183 | 199 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid> |
|
184 | 200 | gist_alias_url = |
|
185 | 201 | |
|
186 | 202 | ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be |
|
187 | 203 | ## used for access. |
|
188 | 204 | ## Adding ?auth_token = <token> to the url authenticates this request as if it |
|
189 | 205 | ## came from the the logged in user who own this authentication token. |
|
190 | 206 | ## |
|
191 | 207 | ## Syntax is <ControllerClass>:<function_pattern>. |
|
192 | 208 | ## To enable access to raw_files put `FilesController:raw`. |
|
193 | 209 | ## To enable access to patches add `ChangesetController:changeset_patch`. |
|
194 | 210 | ## The list should be "," separated and on a single line. |
|
195 | 211 | ## |
|
196 | 212 | ## Recommended controllers to enable: |
|
197 | 213 | # ChangesetController:changeset_patch, |
|
198 | 214 | # ChangesetController:changeset_raw, |
|
199 | 215 | # FilesController:raw, |
|
200 | 216 | # FilesController:archivefile, |
|
201 | 217 | # GistsController:*, |
|
202 | 218 | api_access_controllers_whitelist = |
|
203 | 219 | |
|
204 | 220 | ## default encoding used to convert from and to unicode |
|
205 | 221 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
206 | 222 | default_encoding = UTF-8 |
|
207 | 223 | |
|
208 | 224 | ## instance-id prefix |
|
209 | 225 | ## a prefix key for this instance used for cache invalidation when running |
|
210 | 226 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
211 | 227 | ## all running rhodecode instances. Leave empty if you don't use it |
|
212 | 228 | instance_id = |
|
213 | 229 | |
|
214 | 230 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
215 | 231 | ## of an authentication plugin also if it is disabled by it's settings. |
|
216 | 232 | ## This could be useful if you are unable to log in to the system due to broken |
|
217 | 233 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
218 | 234 | ## module to log in again and fix the settings. |
|
219 | 235 | ## |
|
220 | 236 | ## Available builtin plugin IDs (hash is part of the ID): |
|
221 | 237 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
222 | 238 | ## egg:rhodecode-enterprise-ce#pam |
|
223 | 239 | ## egg:rhodecode-enterprise-ce#ldap |
|
224 | 240 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
225 | 241 | ## egg:rhodecode-enterprise-ce#headers |
|
226 | 242 | ## egg:rhodecode-enterprise-ce#crowd |
|
227 | 243 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
228 | 244 | |
|
229 | 245 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
230 | 246 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
231 | 247 | ## handling that causing a series of failed authentication calls. |
|
232 | 248 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
233 | 249 | ## This will be served instead of default 401 on bad authnetication |
|
234 | 250 | auth_ret_code = |
|
235 | 251 | |
|
236 | 252 | ## use special detection method when serving auth_ret_code, instead of serving |
|
237 | 253 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
238 | 254 | ## and then serve auth_ret_code to clients |
|
239 | 255 | auth_ret_code_detection = false |
|
240 | 256 | |
|
241 | 257 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
242 | 258 | ## codes don't break the transactions while 4XX codes do |
|
243 | 259 | lock_ret_code = 423 |
|
244 | 260 | |
|
245 | 261 | ## allows to change the repository location in settings page |
|
246 | 262 | allow_repo_location_change = true |
|
247 | 263 | |
|
248 | 264 | ## allows to setup custom hooks in settings page |
|
249 | 265 | allow_custom_hooks_settings = true |
|
250 | 266 | |
|
251 | 267 | ## generated license token, goto license page in RhodeCode settings to obtain |
|
252 | 268 | ## new token |
|
253 | 269 | license_token = |
|
254 | 270 | |
|
255 | 271 | ## supervisor connection uri, for managing supervisor and logs. |
|
256 | 272 | supervisor.uri = |
|
257 | 273 | ## supervisord group name/id we only want this RC instance to handle |
|
258 | 274 | supervisor.group_id = dev |
|
259 | 275 | |
|
260 | 276 | ## Display extended labs settings |
|
261 | 277 | labs_settings_active = true |
|
262 | 278 | |
|
263 | 279 | #################################### |
|
264 | 280 | ### CELERY CONFIG #### |
|
265 | 281 | #################################### |
|
266 | 282 | use_celery = false |
|
267 | 283 | broker.host = localhost |
|
268 | 284 | broker.vhost = rabbitmqhost |
|
269 | 285 | broker.port = 5672 |
|
270 | 286 | broker.user = rabbitmq |
|
271 | 287 | broker.password = qweqwe |
|
272 | 288 | |
|
273 | 289 | celery.imports = rhodecode.lib.celerylib.tasks |
|
274 | 290 | |
|
275 | 291 | celery.result.backend = amqp |
|
276 | 292 | celery.result.dburi = amqp:// |
|
277 | 293 | celery.result.serialier = json |
|
278 | 294 | |
|
279 | 295 | #celery.send.task.error.emails = true |
|
280 | 296 | #celery.amqp.task.result.expires = 18000 |
|
281 | 297 | |
|
282 | 298 | celeryd.concurrency = 2 |
|
283 | 299 | #celeryd.log.file = celeryd.log |
|
284 | 300 | celeryd.log.level = debug |
|
285 | 301 | celeryd.max.tasks.per.child = 1 |
|
286 | 302 | |
|
287 | 303 | ## tasks will never be sent to the queue, but executed locally instead. |
|
288 | 304 | celery.always.eager = false |
|
289 | 305 | |
|
290 | 306 | #################################### |
|
291 | 307 | ### BEAKER CACHE #### |
|
292 | 308 | #################################### |
|
293 | 309 | # default cache dir for templates. Putting this into a ramdisk |
|
294 | 310 | ## can boost performance, eg. %(here)s/data_ramdisk |
|
295 | 311 | cache_dir = %(here)s/data |
|
296 | 312 | |
|
297 | 313 | ## locking and default file storage for Beaker. Putting this into a ramdisk |
|
298 | 314 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data |
|
299 | 315 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data |
|
300 | 316 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock |
|
301 | 317 | |
|
302 | 318 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long |
|
303 | 319 | |
|
304 | 320 | beaker.cache.super_short_term.type = memory |
|
305 | 321 | beaker.cache.super_short_term.expire = 10 |
|
306 | 322 | beaker.cache.super_short_term.key_length = 256 |
|
307 | 323 | |
|
308 | 324 | beaker.cache.short_term.type = memory |
|
309 | 325 | beaker.cache.short_term.expire = 60 |
|
310 | 326 | beaker.cache.short_term.key_length = 256 |
|
311 | 327 | |
|
312 | 328 | beaker.cache.long_term.type = memory |
|
313 | 329 | beaker.cache.long_term.expire = 36000 |
|
314 | 330 | beaker.cache.long_term.key_length = 256 |
|
315 | 331 | |
|
316 | 332 | beaker.cache.sql_cache_short.type = memory |
|
317 | 333 | beaker.cache.sql_cache_short.expire = 10 |
|
318 | 334 | beaker.cache.sql_cache_short.key_length = 256 |
|
319 | 335 | |
|
320 | # default is memory cache, configure only if required | |
|
321 | # using multi-node or multi-worker setup | |
|
336 | ## default is memory cache, configure only if required | |
|
337 | ## using multi-node or multi-worker setup | |
|
322 | 338 | #beaker.cache.auth_plugins.type = ext:database |
|
323 | 339 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock |
|
324 | 340 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode |
|
325 | 341 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode |
|
326 | 342 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 |
|
327 | 343 | #beaker.cache.auth_plugins.sa.pool_size = 10 |
|
328 | 344 | #beaker.cache.auth_plugins.sa.max_overflow = 0 |
|
329 | 345 | |
|
330 | 346 | beaker.cache.repo_cache_long.type = memorylru_base |
|
331 | 347 | beaker.cache.repo_cache_long.max_items = 4096 |
|
332 | 348 | beaker.cache.repo_cache_long.expire = 2592000 |
|
333 | 349 | |
|
334 | # default is memorylru_base cache, configure only if required | |
|
335 | # using multi-node or multi-worker setup | |
|
350 | ## default is memorylru_base cache, configure only if required | |
|
351 | ## using multi-node or multi-worker setup | |
|
336 | 352 | #beaker.cache.repo_cache_long.type = ext:memcached |
|
337 | 353 | #beaker.cache.repo_cache_long.url = localhost:11211 |
|
338 | 354 | #beaker.cache.repo_cache_long.expire = 1209600 |
|
339 | 355 | #beaker.cache.repo_cache_long.key_length = 256 |
|
340 | 356 | |
|
341 | 357 | #################################### |
|
342 | 358 | ### BEAKER SESSION #### |
|
343 | 359 | #################################### |
|
344 | 360 | |
|
345 | 361 | ## .session.type is type of storage options for the session, current allowed |
|
346 | 362 | ## types are file, ext:memcached, ext:database, and memory (default). |
|
347 | 363 | beaker.session.type = file |
|
348 | 364 | beaker.session.data_dir = %(here)s/data/sessions/data |
|
349 | 365 | |
|
350 |
## db based session, fast, and allows easy management over logged in users |
|
|
366 | ## db based session, fast, and allows easy management over logged in users | |
|
351 | 367 | #beaker.session.type = ext:database |
|
352 | 368 | #beaker.session.table_name = db_session |
|
353 | 369 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
354 | 370 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
355 | 371 | #beaker.session.sa.pool_recycle = 3600 |
|
356 | 372 | #beaker.session.sa.echo = false |
|
357 | 373 | |
|
358 | 374 | beaker.session.key = rhodecode |
|
359 | 375 | beaker.session.secret = develop-rc-uytcxaz |
|
360 | 376 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
361 | 377 | |
|
362 | 378 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
363 | 379 | ## you must disable beaker.session.secret to use this |
|
364 | 380 | #beaker.session.encrypt_key = <key_for_encryption> |
|
365 | 381 | #beaker.session.validate_key = <validation_key> |
|
366 | 382 | |
|
367 | 383 | ## sets session as invalid(also logging out user) if it haven not been |
|
368 | 384 | ## accessed for given amount of time in seconds |
|
369 | 385 | beaker.session.timeout = 2592000 |
|
370 | 386 | beaker.session.httponly = true |
|
387 | ## Path to use for the cookie. | |
|
371 | 388 | #beaker.session.cookie_path = /<your-prefix> |
|
372 | 389 | |
|
373 | 390 | ## uncomment for https secure cookie |
|
374 | 391 | beaker.session.secure = false |
|
375 | 392 | |
|
376 | 393 | ## auto save the session to not to use .save() |
|
377 | 394 | beaker.session.auto = false |
|
378 | 395 | |
|
379 | 396 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
380 | 397 | ## at browser close |
|
381 | 398 | #beaker.session.cookie_expires = 3600 |
|
382 | 399 | |
|
383 | 400 | ################################### |
|
384 | 401 | ## SEARCH INDEXING CONFIGURATION ## |
|
385 | 402 | ################################### |
|
386 | 403 | ## Full text search indexer is available in rhodecode-tools under |
|
387 | 404 | ## `rhodecode-tools index` command |
|
388 | 405 | |
|
389 | 406 | # WHOOSH Backend, doesn't require additional services to run |
|
390 | 407 | # it works good with few dozen repos |
|
391 | 408 | search.module = rhodecode.lib.index.whoosh |
|
392 | 409 | search.location = %(here)s/data/index |
|
393 | 410 | |
|
411 | ######################################## | |
|
412 | ### CHANNELSTREAM CONFIG #### | |
|
413 | ######################################## | |
|
414 | ## channelstream enables persistent connections and live notification | |
|
415 | ## in the system. It's also used by the chat system | |
|
416 | ||
|
417 | channelstream.enabled = true | |
|
418 | ## location of channelstream server on the backend | |
|
419 | channelstream.server = 127.0.0.1:9800 | |
|
420 | ## location of the channelstream server from outside world | |
|
421 | ## most likely this would be an http server special backend URL, that handles | |
|
422 | ## websocket connections see nginx example for config | |
|
423 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
|
424 | channelstream.secret = secret | |
|
425 | channelstream.history.location = %(here)s/channelstream_history | |
|
426 | ||
|
427 | ||
|
394 | 428 | ################################### |
|
395 | 429 | ## APPENLIGHT CONFIG ## |
|
396 | 430 | ################################### |
|
397 | 431 | |
|
398 | 432 | ## Appenlight is tailored to work with RhodeCode, see |
|
399 | 433 | ## http://appenlight.com for details how to obtain an account |
|
400 | 434 | |
|
401 | 435 | ## appenlight integration enabled |
|
402 | 436 | appenlight = false |
|
403 | 437 | |
|
404 | 438 | appenlight.server_url = https://api.appenlight.com |
|
405 | 439 | appenlight.api_key = YOUR_API_KEY |
|
406 | 440 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
407 | 441 | |
|
408 | 442 | # used for JS client |
|
409 | 443 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
410 | 444 | |
|
411 | 445 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
412 | 446 | |
|
413 | 447 | ## enables 404 error logging (default False) |
|
414 | 448 | appenlight.report_404 = false |
|
415 | 449 | |
|
416 | 450 | ## time in seconds after request is considered being slow (default 1) |
|
417 | 451 | appenlight.slow_request_time = 1 |
|
418 | 452 | |
|
419 | 453 | ## record slow requests in application |
|
420 | 454 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
421 | 455 | appenlight.slow_requests = true |
|
422 | 456 | |
|
423 | 457 | ## enable hooking to application loggers |
|
424 | 458 | appenlight.logging = true |
|
425 | 459 | |
|
426 | 460 | ## minimum log level for log capture |
|
427 | 461 | appenlight.logging.level = WARNING |
|
428 | 462 | |
|
429 | 463 | ## send logs only from erroneous/slow requests |
|
430 | 464 | ## (saves API quota for intensive logging) |
|
431 | 465 | appenlight.logging_on_error = false |
|
432 | 466 | |
|
433 | 467 | ## list of additonal keywords that should be grabbed from environ object |
|
434 | 468 | ## can be string with comma separated list of words in lowercase |
|
435 | 469 | ## (by default client will always send following info: |
|
436 | 470 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
437 | 471 | ## start with HTTP* this list be extended with additional keywords here |
|
438 | 472 | appenlight.environ_keys_whitelist = |
|
439 | 473 | |
|
440 | 474 | ## list of keywords that should be blanked from request object |
|
441 | 475 | ## can be string with comma separated list of words in lowercase |
|
442 | 476 | ## (by default client will always blank keys that contain following words |
|
443 | 477 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
444 | 478 | ## this list be extended with additional keywords set here |
|
445 | 479 | appenlight.request_keys_blacklist = |
|
446 | 480 | |
|
447 | 481 | ## list of namespaces that should be ignores when gathering log entries |
|
448 | 482 | ## can be string with comma separated list of namespaces |
|
449 | 483 | ## (by default the client ignores own entries: appenlight_client.client) |
|
450 | 484 | appenlight.log_namespace_blacklist = |
|
451 | 485 | |
|
452 | 486 | |
|
453 | 487 | ################################################################################ |
|
454 | 488 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
455 | 489 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
456 | 490 | ## execute malicious code after an exception is raised. ## |
|
457 | 491 | ################################################################################ |
|
458 | 492 | #set debug = false |
|
459 | 493 | |
|
460 | 494 | |
|
461 | 495 | ############## |
|
462 | 496 | ## STYLING ## |
|
463 | 497 | ############## |
|
464 | 498 | debug_style = true |
|
465 | 499 | |
|
466 | 500 | ######################################################### |
|
467 | 501 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
468 | 502 | ######################################################### |
|
469 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
|
503 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
|
470 | 504 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
471 | 505 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode |
|
506 | sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 | |
|
472 | 507 | |
|
473 | 508 | # see sqlalchemy docs for other advanced settings |
|
474 | 509 | |
|
475 | 510 | ## print the sql statements to output |
|
476 | 511 | sqlalchemy.db1.echo = false |
|
477 | 512 | ## recycle the connections after this ammount of seconds |
|
478 | 513 | sqlalchemy.db1.pool_recycle = 3600 |
|
479 | 514 | sqlalchemy.db1.convert_unicode = true |
|
480 | 515 | |
|
481 | 516 | ## the number of connections to keep open inside the connection pool. |
|
482 | 517 | ## 0 indicates no limit |
|
483 | 518 | #sqlalchemy.db1.pool_size = 5 |
|
484 | 519 | |
|
485 | 520 | ## the number of connections to allow in connection pool "overflow", that is |
|
486 | 521 | ## connections that can be opened above and beyond the pool_size setting, |
|
487 | 522 | ## which defaults to five. |
|
488 | 523 | #sqlalchemy.db1.max_overflow = 10 |
|
489 | 524 | |
|
490 | 525 | |
|
491 | 526 | ################## |
|
492 | 527 | ### VCS CONFIG ### |
|
493 | 528 | ################## |
|
494 | 529 | vcs.server.enable = true |
|
495 | 530 | vcs.server = localhost:9900 |
|
496 | 531 | |
|
497 | 532 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
498 | 533 | ## Available protocols are: |
|
499 | 534 | ## `pyro4` - using pyro4 server |
|
500 | 535 | ## `http` - using http-rpc backend |
|
501 |
|
|
|
536 | vcs.server.protocol = http | |
|
502 | 537 | |
|
503 | 538 | ## Push/Pull operations protocol, available options are: |
|
504 | 539 | ## `pyro4` - using pyro4 server |
|
505 | 540 | ## `rhodecode.lib.middleware.utils.scm_app_http` - Http based, recommended |
|
506 | 541 | ## `vcsserver.scm_app` - internal app (EE only) |
|
507 |
|
|
|
542 | vcs.scm_app_implementation = rhodecode.lib.middleware.utils.scm_app_http | |
|
508 | 543 | |
|
509 | 544 | ## Push/Pull operations hooks protocol, available options are: |
|
510 | 545 | ## `pyro4` - using pyro4 server |
|
511 | 546 | ## `http` - using http-rpc backend |
|
512 |
|
|
|
547 | vcs.hooks.protocol = http | |
|
513 | 548 | |
|
514 | 549 | vcs.server.log_level = debug |
|
515 | 550 | ## Start VCSServer with this instance as a subprocess, usefull for development |
|
516 | 551 | vcs.start_server = true |
|
552 | ||
|
553 | ## List of enabled VCS backends, available options are: | |
|
554 | ## `hg` - mercurial | |
|
555 | ## `git` - git | |
|
556 | ## `svn` - subversion | |
|
517 | 557 | vcs.backends = hg, git, svn |
|
558 | ||
|
518 | 559 | vcs.connection_timeout = 3600 |
|
519 | 560 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
520 | 561 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible |
|
521 | 562 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
522 | 563 | |
|
564 | ||
|
565 | ############################################################ | |
|
566 | ### Subversion proxy support (mod_dav_svn) ### | |
|
567 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |
|
568 | ############################################################ | |
|
569 | ## Enable or disable the config file generation. | |
|
570 | svn.proxy.generate_config = false | |
|
571 | ## Generate config file with `SVNListParentPath` set to `On`. | |
|
572 | svn.proxy.list_parent_path = true | |
|
573 | ## Set location and file name of generated config file. | |
|
574 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
575 | ## File system path to the directory containing the repositories served by | |
|
576 | ## RhodeCode. | |
|
577 | svn.proxy.parent_path_root = /path/to/repo_store | |
|
578 | ## Used as a prefix to the <Location> block in the generated config file. In | |
|
579 | ## most cases it should be set to `/`. | |
|
580 | svn.proxy.location_root = / | |
|
581 | ||
|
582 | ||
|
523 | 583 | ################################ |
|
524 | 584 | ### LOGGING CONFIGURATION #### |
|
525 | 585 | ################################ |
|
526 | 586 | [loggers] |
|
527 | 587 | keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates |
|
528 | 588 | |
|
529 | 589 | [handlers] |
|
530 | 590 | keys = console, console_sql |
|
531 | 591 | |
|
532 | 592 | [formatters] |
|
533 | 593 | keys = generic, color_formatter, color_formatter_sql |
|
534 | 594 | |
|
535 | 595 | ############# |
|
536 | 596 | ## LOGGERS ## |
|
537 | 597 | ############# |
|
538 | 598 | [logger_root] |
|
539 | 599 | level = NOTSET |
|
540 | 600 | handlers = console |
|
541 | 601 | |
|
542 | 602 | [logger_routes] |
|
543 | 603 | level = DEBUG |
|
544 | 604 | handlers = |
|
545 | 605 | qualname = routes.middleware |
|
546 | 606 | ## "level = DEBUG" logs the route matched and routing variables. |
|
547 | 607 | propagate = 1 |
|
548 | 608 | |
|
549 | 609 | [logger_beaker] |
|
550 | 610 | level = DEBUG |
|
551 | 611 | handlers = |
|
552 | 612 | qualname = beaker.container |
|
553 | 613 | propagate = 1 |
|
554 | 614 | |
|
555 | 615 | [logger_pyro4] |
|
556 | 616 | level = DEBUG |
|
557 | 617 | handlers = |
|
558 | 618 | qualname = Pyro4 |
|
559 | 619 | propagate = 1 |
|
560 | 620 | |
|
561 | 621 | [logger_templates] |
|
562 | 622 | level = INFO |
|
563 | 623 | handlers = |
|
564 | 624 | qualname = pylons.templating |
|
565 | 625 | propagate = 1 |
|
566 | 626 | |
|
567 | 627 | [logger_rhodecode] |
|
568 | 628 | level = DEBUG |
|
569 | 629 | handlers = |
|
570 | 630 | qualname = rhodecode |
|
571 | 631 | propagate = 1 |
|
572 | 632 | |
|
573 | 633 | [logger_sqlalchemy] |
|
574 | 634 | level = INFO |
|
575 | 635 | handlers = console_sql |
|
576 | 636 | qualname = sqlalchemy.engine |
|
577 | 637 | propagate = 0 |
|
578 | 638 | |
|
579 | 639 | ############## |
|
580 | 640 | ## HANDLERS ## |
|
581 | 641 | ############## |
|
582 | 642 | |
|
583 | 643 | [handler_console] |
|
584 | 644 | class = StreamHandler |
|
585 | 645 | args = (sys.stderr,) |
|
586 | 646 | level = DEBUG |
|
587 | 647 | formatter = color_formatter |
|
588 | 648 | |
|
589 | 649 | [handler_console_sql] |
|
590 | 650 | class = StreamHandler |
|
591 | 651 | args = (sys.stderr,) |
|
592 | 652 | level = DEBUG |
|
593 | 653 | formatter = color_formatter_sql |
|
594 | 654 | |
|
595 | 655 | ################ |
|
596 | 656 | ## FORMATTERS ## |
|
597 | 657 | ################ |
|
598 | 658 | |
|
599 | 659 | [formatter_generic] |
|
600 | 660 | class = rhodecode.lib.logging_formatter.Pyro4AwareFormatter |
|
601 | 661 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
602 | 662 | datefmt = %Y-%m-%d %H:%M:%S |
|
603 | 663 | |
|
604 | 664 | [formatter_color_formatter] |
|
605 | 665 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
606 | 666 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
607 | 667 | datefmt = %Y-%m-%d %H:%M:%S |
|
608 | 668 | |
|
609 | 669 | [formatter_color_formatter_sql] |
|
610 | 670 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
611 | 671 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
612 | 672 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,581 +1,641 b'' | |||
|
1 | ################################################################################ | |
|
1 | ||
|
2 | ||
|
2 | 3 | ################################################################################ |
|
3 | # RhodeCode Enterprise - configuration file # | |
|
4 | # Built-in functions and variables # | |
|
4 | ## RHODECODE ENTERPRISE CONFIGURATION ## | |
|
5 | 5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
6 | # # | |
|
7 | 6 | ################################################################################ |
|
8 | 7 | |
|
9 | 8 | [DEFAULT] |
|
10 | 9 | debug = true |
|
10 | ||
|
11 | 11 | ################################################################################ |
|
12 | ## EMAIL CONFIGURATION ## | |
|
12 | 13 | ## Uncomment and replace with the email address which should receive ## |
|
13 | 14 | ## any error reports after an application crash ## |
|
14 | 15 | ## Additionally these settings will be used by the RhodeCode mailing system ## |
|
15 | 16 | ################################################################################ |
|
16 | #email_to = admin@localhost | |
|
17 | #error_email_from = paste_error@localhost | |
|
17 | ||
|
18 | ## prefix all emails subjects with given prefix, helps filtering out emails | |
|
19 | #email_prefix = [RhodeCode] | |
|
20 | ||
|
21 | ## email FROM address all mails will be sent | |
|
18 | 22 | #app_email_from = rhodecode-noreply@localhost |
|
23 | ||
|
24 | ## Uncomment and replace with the address which should receive any error report | |
|
25 | ## note: using appenlight for error handling doesn't need this to be uncommented | |
|
26 | #email_to = admin@localhost | |
|
27 | ||
|
28 | ## in case of Application errors, sent an error email form | |
|
29 | #error_email_from = rhodecode_error@localhost | |
|
30 | ||
|
31 | ## additional error message to be send in case of server crash | |
|
19 | 32 | #error_message = |
|
20 | #email_prefix = [RhodeCode] | |
|
33 | ||
|
21 | 34 | |
|
22 | 35 | #smtp_server = mail.server.com |
|
23 | 36 | #smtp_username = |
|
24 | 37 | #smtp_password = |
|
25 | 38 | #smtp_port = |
|
26 | 39 | #smtp_use_tls = false |
|
27 | 40 | #smtp_use_ssl = true |
|
28 | 41 | ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.) |
|
29 | 42 | #smtp_auth = |
|
30 | 43 | |
|
31 | 44 | [server:main] |
|
32 | 45 | ## COMMON ## |
|
33 | 46 | host = 127.0.0.1 |
|
34 | 47 | port = 5000 |
|
35 | 48 | |
|
36 | 49 | ################################## |
|
37 | 50 | ## WAITRESS WSGI SERVER ## |
|
38 | 51 | ## Recommended for Development ## |
|
39 | 52 | ################################## |
|
53 | ||
|
40 | 54 | #use = egg:waitress#main |
|
41 | 55 | ## number of worker threads |
|
42 | 56 | #threads = 5 |
|
43 | 57 | ## MAX BODY SIZE 100GB |
|
44 | 58 | #max_request_body_size = 107374182400 |
|
45 | 59 | ## Use poll instead of select, fixes file descriptors limits problems. |
|
46 | 60 | ## May not work on old windows systems. |
|
47 | 61 | #asyncore_use_poll = true |
|
48 | 62 | |
|
49 | 63 | |
|
50 | 64 | ########################## |
|
51 | 65 | ## GUNICORN WSGI SERVER ## |
|
52 | 66 | ########################## |
|
53 | 67 | ## run with gunicorn --log-config <inifile.ini> --paste <inifile.ini> |
|
68 | ||
|
54 | 69 | use = egg:gunicorn#main |
|
55 | 70 | ## Sets the number of process workers. You must set `instance_id = *` |
|
56 | 71 | ## when this option is set to more than one worker, recommended |
|
57 | 72 | ## value is (2 * NUMBER_OF_CPUS + 1), eg 2CPU = 5 workers |
|
58 | 73 | ## The `instance_id = *` must be set in the [app:main] section below |
|
59 | 74 | workers = 2 |
|
60 | 75 | ## number of threads for each of the worker, must be set to 1 for gevent |
|
61 | 76 | ## generally recommened to be at 1 |
|
62 | 77 | #threads = 1 |
|
63 | 78 | ## process name |
|
64 | 79 | proc_name = rhodecode |
|
65 | 80 | ## type of worker class, one of sync, gevent |
|
66 | 81 | ## recommended for bigger setup is using of of other than sync one |
|
67 | 82 | worker_class = sync |
|
68 | 83 | ## The maximum number of simultaneous clients. Valid only for Gevent |
|
69 | 84 | #worker_connections = 10 |
|
70 | 85 | ## max number of requests that worker will handle before being gracefully |
|
71 | 86 | ## restarted, could prevent memory leaks |
|
72 | 87 | max_requests = 1000 |
|
73 | 88 | max_requests_jitter = 30 |
|
74 | 89 | ## amount of time a worker can spend with handling a request before it |
|
75 | 90 | ## gets killed and restarted. Set to 6hrs |
|
76 | 91 | timeout = 21600 |
|
77 | 92 | |
|
78 | 93 | |
|
79 | 94 | ## prefix middleware for RhodeCode, disables force_https flag. |
|
95 | ## recommended when using proxy setup. | |
|
80 | 96 | ## allows to set RhodeCode under a prefix in server. |
|
81 | 97 | ## eg https://server.com/<prefix>. Enable `filter-with =` option below as well. |
|
82 | #[filter:proxy-prefix] | |
|
83 | #use = egg:PasteDeploy#prefix | |
|
84 | #prefix = /<your-prefix> | |
|
98 | ## optionally set prefix like: `prefix = /<your-prefix>` | |
|
99 | [filter:proxy-prefix] | |
|
100 | use = egg:PasteDeploy#prefix | |
|
101 | prefix = / | |
|
85 | 102 | |
|
86 | 103 | [app:main] |
|
87 | 104 | use = egg:rhodecode-enterprise-ce |
|
88 | ## enable proxy prefix middleware, defined below | |
|
105 | ||
|
106 | ## enable proxy prefix middleware, defined above | |
|
89 | 107 | #filter-with = proxy-prefix |
|
90 | 108 | |
|
91 | 109 | ## encryption key used to encrypt social plugin tokens, |
|
92 | 110 | ## remote_urls with credentials etc, if not set it defaults to |
|
93 | 111 | ## `beaker.session.secret` |
|
94 | 112 | #rhodecode.encrypted_values.secret = |
|
95 | 113 | |
|
96 | 114 | ## decryption strict mode (enabled by default). It controls if decryption raises |
|
97 | 115 | ## `SignatureVerificationError` in case of wrong key, or damaged encryption data. |
|
98 | 116 | #rhodecode.encrypted_values.strict = false |
|
99 | 117 | |
|
100 | full_stack = true | |
|
118 | ## return gzipped responses from Rhodecode (static files/application) | |
|
119 | gzip_responses = false | |
|
101 | 120 | |
|
102 | ## Serve static files via RhodeCode, disable to serve them via HTTP server | |
|
103 | static_files = true | |
|
104 | ||
|
105 | # autogenerate javascript routes file on startup | |
|
121 | ## autogenerate javascript routes file on startup | |
|
106 | 122 | generate_js_files = false |
|
107 | 123 | |
|
108 | 124 | ## Optional Languages |
|
109 | 125 | ## en(default), be, de, es, fr, it, ja, pl, pt, ru, zh |
|
110 | 126 | lang = en |
|
111 | 127 | |
|
112 | 128 | ## perform a full repository scan on each server start, this should be |
|
113 | 129 | ## set to false after first startup, to allow faster server restarts. |
|
114 | 130 | startup.import_repos = false |
|
115 | 131 | |
|
116 | 132 | ## Uncomment and set this path to use archive download cache. |
|
117 | 133 | ## Once enabled, generated archives will be cached at this location |
|
118 | 134 | ## and served from the cache during subsequent requests for the same archive of |
|
119 | 135 | ## the repository. |
|
120 | 136 | #archive_cache_dir = /tmp/tarballcache |
|
121 | 137 | |
|
122 | 138 | ## change this to unique ID for security |
|
123 | 139 | app_instance_uuid = rc-production |
|
124 | 140 | |
|
125 | 141 | ## cut off limit for large diffs (size in bytes) |
|
126 | 142 | cut_off_limit_diff = 1024000 |
|
127 | 143 | cut_off_limit_file = 256000 |
|
128 | 144 | |
|
129 | 145 | ## use cache version of scm repo everywhere |
|
130 | 146 | vcs_full_cache = true |
|
131 | 147 | |
|
132 | 148 | ## force https in RhodeCode, fixes https redirects, assumes it's always https |
|
133 | 149 | ## Normally this is controlled by proper http flags sent from http server |
|
134 | 150 | force_https = false |
|
135 | 151 | |
|
136 | 152 | ## use Strict-Transport-Security headers |
|
137 | 153 | use_htsts = false |
|
138 | 154 | |
|
139 | 155 | ## number of commits stats will parse on each iteration |
|
140 | 156 | commit_parse_limit = 25 |
|
141 | 157 | |
|
142 | 158 | ## git rev filter option, --all is the default filter, if you need to |
|
143 | 159 | ## hide all refs in changelog switch this to --branches --tags |
|
144 | 160 | git_rev_filter = --branches --tags |
|
145 | 161 | |
|
146 | 162 | # Set to true if your repos are exposed using the dumb protocol |
|
147 | 163 | git_update_server_info = false |
|
148 | 164 | |
|
149 | 165 | ## RSS/ATOM feed options |
|
150 | 166 | rss_cut_off_limit = 256000 |
|
151 | 167 | rss_items_per_page = 10 |
|
152 | 168 | rss_include_diff = false |
|
153 | 169 | |
|
154 | 170 | ## gist URL alias, used to create nicer urls for gist. This should be an |
|
155 | 171 | ## url that does rewrites to _admin/gists/<gistid>. |
|
156 | 172 | ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal |
|
157 | 173 | ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid> |
|
158 | 174 | gist_alias_url = |
|
159 | 175 | |
|
160 | 176 | ## List of controllers (using glob pattern syntax) that AUTH TOKENS could be |
|
161 | 177 | ## used for access. |
|
162 | 178 | ## Adding ?auth_token = <token> to the url authenticates this request as if it |
|
163 | 179 | ## came from the the logged in user who own this authentication token. |
|
164 | 180 | ## |
|
165 | 181 | ## Syntax is <ControllerClass>:<function_pattern>. |
|
166 | 182 | ## To enable access to raw_files put `FilesController:raw`. |
|
167 | 183 | ## To enable access to patches add `ChangesetController:changeset_patch`. |
|
168 | 184 | ## The list should be "," separated and on a single line. |
|
169 | 185 | ## |
|
170 | 186 | ## Recommended controllers to enable: |
|
171 | 187 | # ChangesetController:changeset_patch, |
|
172 | 188 | # ChangesetController:changeset_raw, |
|
173 | 189 | # FilesController:raw, |
|
174 | 190 | # FilesController:archivefile, |
|
175 | 191 | # GistsController:*, |
|
176 | 192 | api_access_controllers_whitelist = |
|
177 | 193 | |
|
178 | 194 | ## default encoding used to convert from and to unicode |
|
179 | 195 | ## can be also a comma separated list of encoding in case of mixed encodings |
|
180 | 196 | default_encoding = UTF-8 |
|
181 | 197 | |
|
182 | 198 | ## instance-id prefix |
|
183 | 199 | ## a prefix key for this instance used for cache invalidation when running |
|
184 | 200 | ## multiple instances of rhodecode, make sure it's globally unique for |
|
185 | 201 | ## all running rhodecode instances. Leave empty if you don't use it |
|
186 | 202 | instance_id = |
|
187 | 203 | |
|
188 | 204 | ## Fallback authentication plugin. Set this to a plugin ID to force the usage |
|
189 | 205 | ## of an authentication plugin also if it is disabled by it's settings. |
|
190 | 206 | ## This could be useful if you are unable to log in to the system due to broken |
|
191 | 207 | ## authentication settings. Then you can enable e.g. the internal rhodecode auth |
|
192 | 208 | ## module to log in again and fix the settings. |
|
193 | 209 | ## |
|
194 | 210 | ## Available builtin plugin IDs (hash is part of the ID): |
|
195 | 211 | ## egg:rhodecode-enterprise-ce#rhodecode |
|
196 | 212 | ## egg:rhodecode-enterprise-ce#pam |
|
197 | 213 | ## egg:rhodecode-enterprise-ce#ldap |
|
198 | 214 | ## egg:rhodecode-enterprise-ce#jasig_cas |
|
199 | 215 | ## egg:rhodecode-enterprise-ce#headers |
|
200 | 216 | ## egg:rhodecode-enterprise-ce#crowd |
|
201 | 217 | #rhodecode.auth_plugin_fallback = egg:rhodecode-enterprise-ce#rhodecode |
|
202 | 218 | |
|
203 | 219 | ## alternative return HTTP header for failed authentication. Default HTTP |
|
204 | 220 | ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with |
|
205 | 221 | ## handling that causing a series of failed authentication calls. |
|
206 | 222 | ## Set this variable to 403 to return HTTPForbidden, or any other HTTP code |
|
207 | 223 | ## This will be served instead of default 401 on bad authnetication |
|
208 | 224 | auth_ret_code = |
|
209 | 225 | |
|
210 | 226 | ## use special detection method when serving auth_ret_code, instead of serving |
|
211 | 227 | ## ret_code directly, use 401 initially (Which triggers credentials prompt) |
|
212 | 228 | ## and then serve auth_ret_code to clients |
|
213 | 229 | auth_ret_code_detection = false |
|
214 | 230 | |
|
215 | 231 | ## locking return code. When repository is locked return this HTTP code. 2XX |
|
216 | 232 | ## codes don't break the transactions while 4XX codes do |
|
217 | 233 | lock_ret_code = 423 |
|
218 | 234 | |
|
219 | 235 | ## allows to change the repository location in settings page |
|
220 | 236 | allow_repo_location_change = true |
|
221 | 237 | |
|
222 | 238 | ## allows to setup custom hooks in settings page |
|
223 | 239 | allow_custom_hooks_settings = true |
|
224 | 240 | |
|
225 | 241 | ## generated license token, goto license page in RhodeCode settings to obtain |
|
226 | 242 | ## new token |
|
227 | 243 | license_token = |
|
228 | 244 | |
|
229 | 245 | ## supervisor connection uri, for managing supervisor and logs. |
|
230 | 246 | supervisor.uri = |
|
231 | 247 | ## supervisord group name/id we only want this RC instance to handle |
|
232 | 248 | supervisor.group_id = prod |
|
233 | 249 | |
|
234 | 250 | ## Display extended labs settings |
|
235 | 251 | labs_settings_active = true |
|
236 | 252 | |
|
237 | 253 | #################################### |
|
238 | 254 | ### CELERY CONFIG #### |
|
239 | 255 | #################################### |
|
240 | 256 | use_celery = false |
|
241 | 257 | broker.host = localhost |
|
242 | 258 | broker.vhost = rabbitmqhost |
|
243 | 259 | broker.port = 5672 |
|
244 | 260 | broker.user = rabbitmq |
|
245 | 261 | broker.password = qweqwe |
|
246 | 262 | |
|
247 | 263 | celery.imports = rhodecode.lib.celerylib.tasks |
|
248 | 264 | |
|
249 | 265 | celery.result.backend = amqp |
|
250 | 266 | celery.result.dburi = amqp:// |
|
251 | 267 | celery.result.serialier = json |
|
252 | 268 | |
|
253 | 269 | #celery.send.task.error.emails = true |
|
254 | 270 | #celery.amqp.task.result.expires = 18000 |
|
255 | 271 | |
|
256 | 272 | celeryd.concurrency = 2 |
|
257 | 273 | #celeryd.log.file = celeryd.log |
|
258 | 274 | celeryd.log.level = debug |
|
259 | 275 | celeryd.max.tasks.per.child = 1 |
|
260 | 276 | |
|
261 | 277 | ## tasks will never be sent to the queue, but executed locally instead. |
|
262 | 278 | celery.always.eager = false |
|
263 | 279 | |
|
264 | 280 | #################################### |
|
265 | 281 | ### BEAKER CACHE #### |
|
266 | 282 | #################################### |
|
267 | 283 | # default cache dir for templates. Putting this into a ramdisk |
|
268 | 284 | ## can boost performance, eg. %(here)s/data_ramdisk |
|
269 | 285 | cache_dir = %(here)s/data |
|
270 | 286 | |
|
271 | 287 | ## locking and default file storage for Beaker. Putting this into a ramdisk |
|
272 | 288 | ## can boost performance, eg. %(here)s/data_ramdisk/cache/beaker_data |
|
273 | 289 | beaker.cache.data_dir = %(here)s/data/cache/beaker_data |
|
274 | 290 | beaker.cache.lock_dir = %(here)s/data/cache/beaker_lock |
|
275 | 291 | |
|
276 | 292 | beaker.cache.regions = super_short_term, short_term, long_term, sql_cache_short, auth_plugins, repo_cache_long |
|
277 | 293 | |
|
278 | 294 | beaker.cache.super_short_term.type = memory |
|
279 | 295 | beaker.cache.super_short_term.expire = 10 |
|
280 | 296 | beaker.cache.super_short_term.key_length = 256 |
|
281 | 297 | |
|
282 | 298 | beaker.cache.short_term.type = memory |
|
283 | 299 | beaker.cache.short_term.expire = 60 |
|
284 | 300 | beaker.cache.short_term.key_length = 256 |
|
285 | 301 | |
|
286 | 302 | beaker.cache.long_term.type = memory |
|
287 | 303 | beaker.cache.long_term.expire = 36000 |
|
288 | 304 | beaker.cache.long_term.key_length = 256 |
|
289 | 305 | |
|
290 | 306 | beaker.cache.sql_cache_short.type = memory |
|
291 | 307 | beaker.cache.sql_cache_short.expire = 10 |
|
292 | 308 | beaker.cache.sql_cache_short.key_length = 256 |
|
293 | 309 | |
|
294 | # default is memory cache, configure only if required | |
|
295 | # using multi-node or multi-worker setup | |
|
310 | ## default is memory cache, configure only if required | |
|
311 | ## using multi-node or multi-worker setup | |
|
296 | 312 | #beaker.cache.auth_plugins.type = ext:database |
|
297 | 313 | #beaker.cache.auth_plugins.lock_dir = %(here)s/data/cache/auth_plugin_lock |
|
298 | 314 | #beaker.cache.auth_plugins.url = postgresql://postgres:secret@localhost/rhodecode |
|
299 | 315 | #beaker.cache.auth_plugins.url = mysql://root:secret@127.0.0.1/rhodecode |
|
300 | 316 | #beaker.cache.auth_plugins.sa.pool_recycle = 3600 |
|
301 | 317 | #beaker.cache.auth_plugins.sa.pool_size = 10 |
|
302 | 318 | #beaker.cache.auth_plugins.sa.max_overflow = 0 |
|
303 | 319 | |
|
304 | 320 | beaker.cache.repo_cache_long.type = memorylru_base |
|
305 | 321 | beaker.cache.repo_cache_long.max_items = 4096 |
|
306 | 322 | beaker.cache.repo_cache_long.expire = 2592000 |
|
307 | 323 | |
|
308 | # default is memorylru_base cache, configure only if required | |
|
309 | # using multi-node or multi-worker setup | |
|
324 | ## default is memorylru_base cache, configure only if required | |
|
325 | ## using multi-node or multi-worker setup | |
|
310 | 326 | #beaker.cache.repo_cache_long.type = ext:memcached |
|
311 | 327 | #beaker.cache.repo_cache_long.url = localhost:11211 |
|
312 | 328 | #beaker.cache.repo_cache_long.expire = 1209600 |
|
313 | 329 | #beaker.cache.repo_cache_long.key_length = 256 |
|
314 | 330 | |
|
315 | 331 | #################################### |
|
316 | 332 | ### BEAKER SESSION #### |
|
317 | 333 | #################################### |
|
318 | 334 | |
|
319 | 335 | ## .session.type is type of storage options for the session, current allowed |
|
320 | 336 | ## types are file, ext:memcached, ext:database, and memory (default). |
|
321 | 337 | beaker.session.type = file |
|
322 | 338 | beaker.session.data_dir = %(here)s/data/sessions/data |
|
323 | 339 | |
|
324 |
## db based session, fast, and allows easy management over logged in users |
|
|
340 | ## db based session, fast, and allows easy management over logged in users | |
|
325 | 341 | #beaker.session.type = ext:database |
|
326 | 342 | #beaker.session.table_name = db_session |
|
327 | 343 | #beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode |
|
328 | 344 | #beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode |
|
329 | 345 | #beaker.session.sa.pool_recycle = 3600 |
|
330 | 346 | #beaker.session.sa.echo = false |
|
331 | 347 | |
|
332 | 348 | beaker.session.key = rhodecode |
|
333 | 349 | beaker.session.secret = production-rc-uytcxaz |
|
334 | 350 | beaker.session.lock_dir = %(here)s/data/sessions/lock |
|
335 | 351 | |
|
336 | 352 | ## Secure encrypted cookie. Requires AES and AES python libraries |
|
337 | 353 | ## you must disable beaker.session.secret to use this |
|
338 | 354 | #beaker.session.encrypt_key = <key_for_encryption> |
|
339 | 355 | #beaker.session.validate_key = <validation_key> |
|
340 | 356 | |
|
341 | 357 | ## sets session as invalid(also logging out user) if it haven not been |
|
342 | 358 | ## accessed for given amount of time in seconds |
|
343 | 359 | beaker.session.timeout = 2592000 |
|
344 | 360 | beaker.session.httponly = true |
|
361 | ## Path to use for the cookie. | |
|
345 | 362 | #beaker.session.cookie_path = /<your-prefix> |
|
346 | 363 | |
|
347 | 364 | ## uncomment for https secure cookie |
|
348 | 365 | beaker.session.secure = false |
|
349 | 366 | |
|
350 | 367 | ## auto save the session to not to use .save() |
|
351 | 368 | beaker.session.auto = false |
|
352 | 369 | |
|
353 | 370 | ## default cookie expiration time in seconds, set to `true` to set expire |
|
354 | 371 | ## at browser close |
|
355 | 372 | #beaker.session.cookie_expires = 3600 |
|
356 | 373 | |
|
357 | 374 | ################################### |
|
358 | 375 | ## SEARCH INDEXING CONFIGURATION ## |
|
359 | 376 | ################################### |
|
360 | 377 | ## Full text search indexer is available in rhodecode-tools under |
|
361 | 378 | ## `rhodecode-tools index` command |
|
362 | 379 | |
|
363 | 380 | # WHOOSH Backend, doesn't require additional services to run |
|
364 | 381 | # it works good with few dozen repos |
|
365 | 382 | search.module = rhodecode.lib.index.whoosh |
|
366 | 383 | search.location = %(here)s/data/index |
|
367 | 384 | |
|
385 | ######################################## | |
|
386 | ### CHANNELSTREAM CONFIG #### | |
|
387 | ######################################## | |
|
388 | ## channelstream enables persistent connections and live notification | |
|
389 | ## in the system. It's also used by the chat system | |
|
390 | ||
|
391 | channelstream.enabled = true | |
|
392 | ## location of channelstream server on the backend | |
|
393 | channelstream.server = 127.0.0.1:9800 | |
|
394 | ## location of the channelstream server from outside world | |
|
395 | ## most likely this would be an http server special backend URL, that handles | |
|
396 | ## websocket connections see nginx example for config | |
|
397 | channelstream.ws_url = ws://rhodecode.yourserver.com/_channelstream | |
|
398 | channelstream.secret = secret | |
|
399 | channelstream.history.location = %(here)s/channelstream_history | |
|
400 | ||
|
401 | ||
|
368 | 402 | ################################### |
|
369 | 403 | ## APPENLIGHT CONFIG ## |
|
370 | 404 | ################################### |
|
371 | 405 | |
|
372 | 406 | ## Appenlight is tailored to work with RhodeCode, see |
|
373 | 407 | ## http://appenlight.com for details how to obtain an account |
|
374 | 408 | |
|
375 | 409 | ## appenlight integration enabled |
|
376 | 410 | appenlight = false |
|
377 | 411 | |
|
378 | 412 | appenlight.server_url = https://api.appenlight.com |
|
379 | 413 | appenlight.api_key = YOUR_API_KEY |
|
380 | 414 | #appenlight.transport_config = https://api.appenlight.com?threaded=1&timeout=5 |
|
381 | 415 | |
|
382 | 416 | # used for JS client |
|
383 | 417 | appenlight.api_public_key = YOUR_API_PUBLIC_KEY |
|
384 | 418 | |
|
385 | 419 | ## TWEAK AMOUNT OF INFO SENT HERE |
|
386 | 420 | |
|
387 | 421 | ## enables 404 error logging (default False) |
|
388 | 422 | appenlight.report_404 = false |
|
389 | 423 | |
|
390 | 424 | ## time in seconds after request is considered being slow (default 1) |
|
391 | 425 | appenlight.slow_request_time = 1 |
|
392 | 426 | |
|
393 | 427 | ## record slow requests in application |
|
394 | 428 | ## (needs to be enabled for slow datastore recording and time tracking) |
|
395 | 429 | appenlight.slow_requests = true |
|
396 | 430 | |
|
397 | 431 | ## enable hooking to application loggers |
|
398 | 432 | appenlight.logging = true |
|
399 | 433 | |
|
400 | 434 | ## minimum log level for log capture |
|
401 | 435 | appenlight.logging.level = WARNING |
|
402 | 436 | |
|
403 | 437 | ## send logs only from erroneous/slow requests |
|
404 | 438 | ## (saves API quota for intensive logging) |
|
405 | 439 | appenlight.logging_on_error = false |
|
406 | 440 | |
|
407 | 441 | ## list of additonal keywords that should be grabbed from environ object |
|
408 | 442 | ## can be string with comma separated list of words in lowercase |
|
409 | 443 | ## (by default client will always send following info: |
|
410 | 444 | ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that |
|
411 | 445 | ## start with HTTP* this list be extended with additional keywords here |
|
412 | 446 | appenlight.environ_keys_whitelist = |
|
413 | 447 | |
|
414 | 448 | ## list of keywords that should be blanked from request object |
|
415 | 449 | ## can be string with comma separated list of words in lowercase |
|
416 | 450 | ## (by default client will always blank keys that contain following words |
|
417 | 451 | ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf' |
|
418 | 452 | ## this list be extended with additional keywords set here |
|
419 | 453 | appenlight.request_keys_blacklist = |
|
420 | 454 | |
|
421 | 455 | ## list of namespaces that should be ignores when gathering log entries |
|
422 | 456 | ## can be string with comma separated list of namespaces |
|
423 | 457 | ## (by default the client ignores own entries: appenlight_client.client) |
|
424 | 458 | appenlight.log_namespace_blacklist = |
|
425 | 459 | |
|
426 | 460 | |
|
427 | 461 | ################################################################################ |
|
428 | 462 | ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ## |
|
429 | 463 | ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## |
|
430 | 464 | ## execute malicious code after an exception is raised. ## |
|
431 | 465 | ################################################################################ |
|
432 | 466 | set debug = false |
|
433 | 467 | |
|
434 | 468 | |
|
435 | 469 | ######################################################### |
|
436 | 470 | ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ### |
|
437 | 471 | ######################################################### |
|
438 | 472 | #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
473 | #sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode | |
|
474 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode | |
|
439 | 475 | sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode |
|
440 | #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode | |
|
441 | 476 | |
|
442 | 477 | # see sqlalchemy docs for other advanced settings |
|
443 | 478 | |
|
444 | 479 | ## print the sql statements to output |
|
445 | 480 | sqlalchemy.db1.echo = false |
|
446 | 481 | ## recycle the connections after this ammount of seconds |
|
447 | 482 | sqlalchemy.db1.pool_recycle = 3600 |
|
448 | 483 | sqlalchemy.db1.convert_unicode = true |
|
449 | 484 | |
|
450 | 485 | ## the number of connections to keep open inside the connection pool. |
|
451 | 486 | ## 0 indicates no limit |
|
452 | 487 | #sqlalchemy.db1.pool_size = 5 |
|
453 | 488 | |
|
454 | 489 | ## the number of connections to allow in connection pool "overflow", that is |
|
455 | 490 | ## connections that can be opened above and beyond the pool_size setting, |
|
456 | 491 | ## which defaults to five. |
|
457 | 492 | #sqlalchemy.db1.max_overflow = 10 |
|
458 | 493 | |
|
459 | 494 | |
|
460 | 495 | ################## |
|
461 | 496 | ### VCS CONFIG ### |
|
462 | 497 | ################## |
|
463 | 498 | vcs.server.enable = true |
|
464 | 499 | vcs.server = localhost:9900 |
|
465 | 500 | |
|
466 | 501 | ## Web server connectivity protocol, responsible for web based VCS operatations |
|
467 | 502 | ## Available protocols are: |
|
468 | 503 | ## `pyro4` - using pyro4 server |
|
469 | 504 | ## `http` - using http-rpc backend |
|
470 | 505 | #vcs.server.protocol = http |
|
471 | 506 | |
|
472 | 507 | ## Push/Pull operations protocol, available options are: |
|
473 | 508 | ## `pyro4` - using pyro4 server |
|
474 | 509 | ## `rhodecode.lib.middleware.utils.scm_app_http` - Http based, recommended |
|
475 | 510 | ## `vcsserver.scm_app` - internal app (EE only) |
|
476 | 511 | #vcs.scm_app_implementation = rhodecode.lib.middleware.utils.scm_app_http |
|
477 | 512 | |
|
478 | 513 | ## Push/Pull operations hooks protocol, available options are: |
|
479 | 514 | ## `pyro4` - using pyro4 server |
|
480 | 515 | ## `http` - using http-rpc backend |
|
481 | 516 | #vcs.hooks.protocol = http |
|
482 | 517 | |
|
483 | 518 | vcs.server.log_level = info |
|
484 | 519 | ## Start VCSServer with this instance as a subprocess, usefull for development |
|
485 | 520 | vcs.start_server = false |
|
521 | ||
|
522 | ## List of enabled VCS backends, available options are: | |
|
523 | ## `hg` - mercurial | |
|
524 | ## `git` - git | |
|
525 | ## `svn` - subversion | |
|
486 | 526 | vcs.backends = hg, git, svn |
|
527 | ||
|
487 | 528 | vcs.connection_timeout = 3600 |
|
488 | 529 | ## Compatibility version when creating SVN repositories. Defaults to newest version when commented out. |
|
489 | 530 | ## Available options are: pre-1.4-compatible, pre-1.5-compatible, pre-1.6-compatible, pre-1.8-compatible |
|
490 | 531 | #vcs.svn.compatible_version = pre-1.8-compatible |
|
491 | 532 | |
|
533 | ||
|
534 | ############################################################ | |
|
535 | ### Subversion proxy support (mod_dav_svn) ### | |
|
536 | ### Maps RhodeCode repo groups into SVN paths for Apache ### | |
|
537 | ############################################################ | |
|
538 | ## Enable or disable the config file generation. | |
|
539 | svn.proxy.generate_config = false | |
|
540 | ## Generate config file with `SVNListParentPath` set to `On`. | |
|
541 | svn.proxy.list_parent_path = true | |
|
542 | ## Set location and file name of generated config file. | |
|
543 | svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf | |
|
544 | ## File system path to the directory containing the repositories served by | |
|
545 | ## RhodeCode. | |
|
546 | svn.proxy.parent_path_root = /path/to/repo_store | |
|
547 | ## Used as a prefix to the <Location> block in the generated config file. In | |
|
548 | ## most cases it should be set to `/`. | |
|
549 | svn.proxy.location_root = / | |
|
550 | ||
|
551 | ||
|
492 | 552 | ################################ |
|
493 | 553 | ### LOGGING CONFIGURATION #### |
|
494 | 554 | ################################ |
|
495 | 555 | [loggers] |
|
496 | 556 | keys = root, routes, rhodecode, sqlalchemy, beaker, pyro4, templates |
|
497 | 557 | |
|
498 | 558 | [handlers] |
|
499 | 559 | keys = console, console_sql |
|
500 | 560 | |
|
501 | 561 | [formatters] |
|
502 | 562 | keys = generic, color_formatter, color_formatter_sql |
|
503 | 563 | |
|
504 | 564 | ############# |
|
505 | 565 | ## LOGGERS ## |
|
506 | 566 | ############# |
|
507 | 567 | [logger_root] |
|
508 | 568 | level = NOTSET |
|
509 | 569 | handlers = console |
|
510 | 570 | |
|
511 | 571 | [logger_routes] |
|
512 | 572 | level = DEBUG |
|
513 | 573 | handlers = |
|
514 | 574 | qualname = routes.middleware |
|
515 | 575 | ## "level = DEBUG" logs the route matched and routing variables. |
|
516 | 576 | propagate = 1 |
|
517 | 577 | |
|
518 | 578 | [logger_beaker] |
|
519 | 579 | level = DEBUG |
|
520 | 580 | handlers = |
|
521 | 581 | qualname = beaker.container |
|
522 | 582 | propagate = 1 |
|
523 | 583 | |
|
524 | 584 | [logger_pyro4] |
|
525 | 585 | level = DEBUG |
|
526 | 586 | handlers = |
|
527 | 587 | qualname = Pyro4 |
|
528 | 588 | propagate = 1 |
|
529 | 589 | |
|
530 | 590 | [logger_templates] |
|
531 | 591 | level = INFO |
|
532 | 592 | handlers = |
|
533 | 593 | qualname = pylons.templating |
|
534 | 594 | propagate = 1 |
|
535 | 595 | |
|
536 | 596 | [logger_rhodecode] |
|
537 | 597 | level = DEBUG |
|
538 | 598 | handlers = |
|
539 | 599 | qualname = rhodecode |
|
540 | 600 | propagate = 1 |
|
541 | 601 | |
|
542 | 602 | [logger_sqlalchemy] |
|
543 | 603 | level = INFO |
|
544 | 604 | handlers = console_sql |
|
545 | 605 | qualname = sqlalchemy.engine |
|
546 | 606 | propagate = 0 |
|
547 | 607 | |
|
548 | 608 | ############## |
|
549 | 609 | ## HANDLERS ## |
|
550 | 610 | ############## |
|
551 | 611 | |
|
552 | 612 | [handler_console] |
|
553 | 613 | class = StreamHandler |
|
554 | 614 | args = (sys.stderr,) |
|
555 | 615 | level = INFO |
|
556 | 616 | formatter = generic |
|
557 | 617 | |
|
558 | 618 | [handler_console_sql] |
|
559 | 619 | class = StreamHandler |
|
560 | 620 | args = (sys.stderr,) |
|
561 | 621 | level = WARN |
|
562 | 622 | formatter = generic |
|
563 | 623 | |
|
564 | 624 | ################ |
|
565 | 625 | ## FORMATTERS ## |
|
566 | 626 | ################ |
|
567 | 627 | |
|
568 | 628 | [formatter_generic] |
|
569 | 629 | class = rhodecode.lib.logging_formatter.Pyro4AwareFormatter |
|
570 | 630 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
571 | 631 | datefmt = %Y-%m-%d %H:%M:%S |
|
572 | 632 | |
|
573 | 633 | [formatter_color_formatter] |
|
574 | 634 | class = rhodecode.lib.logging_formatter.ColorFormatter |
|
575 | 635 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
576 | 636 | datefmt = %Y-%m-%d %H:%M:%S |
|
577 | 637 | |
|
578 | 638 | [formatter_color_formatter_sql] |
|
579 | 639 | class = rhodecode.lib.logging_formatter.ColorFormatterSql |
|
580 | 640 | format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
|
581 | 641 | datefmt = %Y-%m-%d %H:%M:%S |
@@ -1,227 +1,229 b'' | |||
|
1 | 1 | # Nix environment for the community edition |
|
2 | 2 | # |
|
3 | 3 | # This shall be as lean as possible, just producing the Enterprise |
|
4 | 4 | # derivation. For advanced tweaks to pimp up the development environment we use |
|
5 | 5 | # "shell.nix" so that it does not have to clutter this file. |
|
6 | 6 | |
|
7 | 7 | { pkgs ? (import <nixpkgs> {}) |
|
8 | 8 | , pythonPackages ? "python27Packages" |
|
9 | 9 | , pythonExternalOverrides ? self: super: {} |
|
10 | 10 | , doCheck ? true |
|
11 | 11 | }: |
|
12 | 12 | |
|
13 | 13 | let pkgs_ = pkgs; in |
|
14 | 14 | |
|
15 | 15 | let |
|
16 | 16 | pkgs = pkgs_.overridePackages (self: super: { |
|
17 | 17 | # Override subversion derivation to |
|
18 | 18 | # - activate python bindings |
|
19 | 19 | # - set version to 1.8 |
|
20 | 20 | subversion = super.subversion18.override { |
|
21 | 21 | httpSupport = true; |
|
22 | 22 | pythonBindings = true; |
|
23 | 23 | python = self.python27Packages.python; |
|
24 | 24 | }; |
|
25 | 25 | }); |
|
26 | 26 | |
|
27 | 27 | inherit (pkgs.lib) fix extends; |
|
28 | 28 | |
|
29 | 29 | basePythonPackages = with builtins; if isAttrs pythonPackages |
|
30 | 30 | then pythonPackages |
|
31 | 31 | else getAttr pythonPackages pkgs; |
|
32 | 32 | |
|
33 | 33 | elem = builtins.elem; |
|
34 | 34 | basename = path: with pkgs.lib; last (splitString "/" path); |
|
35 | 35 | startsWith = prefix: full: let |
|
36 | 36 | actualPrefix = builtins.substring 0 (builtins.stringLength prefix) full; |
|
37 | 37 | in actualPrefix == prefix; |
|
38 | 38 | |
|
39 | 39 | src-filter = path: type: with pkgs.lib; |
|
40 | 40 | let |
|
41 | 41 | ext = last (splitString "." path); |
|
42 | 42 | in |
|
43 | 43 | !elem (basename path) [ |
|
44 | 44 | ".git" ".hg" "__pycache__" ".eggs" "node_modules" |
|
45 | 45 | "build" "data" "tmp"] && |
|
46 | 46 | !elem ext ["egg-info" "pyc"] && |
|
47 | 47 | !startsWith "result" path; |
|
48 | 48 | |
|
49 | 49 | sources = pkgs.config.rc.sources or {}; |
|
50 | 50 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; |
|
51 | 51 | |
|
52 | 52 | # Load the generated node packages |
|
53 | 53 | nodePackages = pkgs.callPackage "${pkgs.path}/pkgs/top-level/node-packages.nix" rec { |
|
54 | 54 | self = nodePackages; |
|
55 | 55 | generated = pkgs.callPackage ./pkgs/node-packages.nix { inherit self; }; |
|
56 | 56 | }; |
|
57 | 57 | |
|
58 | 58 | # TODO: Should be taken automatically out of the generates packages. |
|
59 | 59 | # apps.nix has one solution for this, although I'd prefer to have the deps |
|
60 | 60 | # from package.json mapped in here. |
|
61 | 61 | nodeDependencies = with nodePackages; [ |
|
62 | 62 | grunt |
|
63 | 63 | grunt-contrib-concat |
|
64 | 64 | grunt-contrib-jshint |
|
65 | 65 | grunt-contrib-less |
|
66 | 66 | grunt-contrib-watch |
|
67 | 67 | jshint |
|
68 | 68 | ]; |
|
69 | 69 | |
|
70 | 70 | pythonGeneratedPackages = self: basePythonPackages.override (a: { |
|
71 | 71 | inherit self; |
|
72 | 72 | }) |
|
73 | 73 | // (scopedImport { |
|
74 | 74 | self = self; |
|
75 | 75 | super = basePythonPackages; |
|
76 | 76 | inherit pkgs; |
|
77 | 77 | inherit (pkgs) fetchurl fetchgit; |
|
78 | 78 | } ./pkgs/python-packages.nix); |
|
79 | 79 | |
|
80 | 80 | pythonOverrides = import ./pkgs/python-packages-overrides.nix { |
|
81 | 81 | inherit |
|
82 | 82 | basePythonPackages |
|
83 | 83 | pkgs; |
|
84 | 84 | }; |
|
85 | 85 | |
|
86 | 86 | pythonLocalOverrides = self: super: { |
|
87 | 87 | rhodecode-enterprise-ce = |
|
88 | 88 | let |
|
89 | 89 | version = builtins.readFile ./rhodecode/VERSION; |
|
90 | 90 | linkNodeModules = '' |
|
91 | 91 | echo "Link node packages" |
|
92 | 92 | # TODO: check if this adds stuff as a dependency, closure size |
|
93 | 93 | rm -fr node_modules |
|
94 | 94 | mkdir -p node_modules |
|
95 | 95 | ${pkgs.lib.concatMapStrings (dep: '' |
|
96 | 96 | ln -sfv ${dep}/lib/node_modules/${dep.pkgName} node_modules/ |
|
97 | 97 | '') nodeDependencies} |
|
98 | 98 | echo "DONE: Link node packages" |
|
99 | 99 | ''; |
|
100 | 100 | in super.rhodecode-enterprise-ce.override (attrs: { |
|
101 | 101 | |
|
102 | 102 | inherit |
|
103 | 103 | doCheck |
|
104 | 104 | version; |
|
105 | 105 | name = "rhodecode-enterprise-ce-${version}"; |
|
106 | 106 | releaseName = "RhodeCodeEnterpriseCE-${version}"; |
|
107 | 107 | src = rhodecode-enterprise-ce-src; |
|
108 | 108 | |
|
109 | 109 | buildInputs = |
|
110 | 110 | attrs.buildInputs ++ |
|
111 | 111 | (with self; [ |
|
112 | 112 | pkgs.nodePackages.grunt-cli |
|
113 | 113 | pkgs.subversion |
|
114 | 114 | pytest-catchlog |
|
115 | 115 | rhodecode-testdata |
|
116 | 116 | ]); |
|
117 | 117 | |
|
118 | 118 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ (with self; [ |
|
119 | 119 | rhodecode-tools |
|
120 | 120 | ]); |
|
121 | 121 | |
|
122 | 122 | # TODO: johbo: Make a nicer way to expose the parts. Maybe |
|
123 | 123 | # pkgs/default.nix? |
|
124 | 124 | passthru = { |
|
125 | 125 | inherit |
|
126 | pythonLocalOverrides | |
|
127 |
myPythonPackagesUnfix |
|
|
126 | linkNodeModules | |
|
127 | myPythonPackagesUnfix | |
|
128 | pythonLocalOverrides; | |
|
128 | 129 | pythonPackages = self; |
|
129 | 130 | }; |
|
130 | 131 | |
|
131 | 132 | LC_ALL = "en_US.UTF-8"; |
|
132 | 133 | LOCALE_ARCHIVE = |
|
133 | 134 | if pkgs.stdenv ? glibc |
|
134 | 135 | then "${pkgs.glibcLocales}/lib/locale/locale-archive" |
|
135 | 136 | else ""; |
|
136 | 137 | |
|
137 | 138 | # Somewhat snappier setup of the development environment |
|
138 | 139 | # TODO: move into shell.nix |
|
139 | 140 | # TODO: think of supporting a stable path again, so that multiple shells |
|
140 | 141 | # can share it. |
|
141 | 142 | shellHook = '' |
|
142 | 143 | tmp_path=$(mktemp -d) |
|
143 | 144 | export PATH="$tmp_path/bin:$PATH" |
|
144 | 145 | export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH" |
|
145 | 146 | mkdir -p $tmp_path/${self.python.sitePackages} |
|
146 | 147 | python setup.py develop --prefix $tmp_path --allow-hosts "" |
|
147 | 148 | '' + linkNodeModules; |
|
148 | 149 | |
|
149 | 150 | preCheck = '' |
|
150 | 151 | export PATH="$out/bin:$PATH" |
|
151 | 152 | ''; |
|
152 | 153 | |
|
153 | 154 | postCheck = '' |
|
154 | 155 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/pytest_pylons |
|
155 | 156 | rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests |
|
156 | 157 | ''; |
|
157 | 158 | |
|
158 | 159 | preBuild = linkNodeModules + '' |
|
159 | 160 | grunt |
|
160 | 161 | rm -fr node_modules |
|
161 | 162 | ''; |
|
162 | 163 | |
|
163 | 164 | postInstall = '' |
|
164 | 165 | # python based programs need to be wrapped |
|
165 | 166 | ln -s ${self.supervisor}/bin/supervisor* $out/bin/ |
|
166 | 167 | ln -s ${self.gunicorn}/bin/gunicorn $out/bin/ |
|
167 | 168 | ln -s ${self.PasteScript}/bin/paster $out/bin/ |
|
169 | ln -s ${self.channelstream}/bin/channelstream $out/bin/ | |
|
168 | 170 | ln -s ${self.pyramid}/bin/* $out/bin/ #*/ |
|
169 | 171 | |
|
170 | 172 | # rhodecode-tools |
|
171 | 173 | # TODO: johbo: re-think this. Do the tools import anything from enterprise? |
|
172 | 174 | ln -s ${self.rhodecode-tools}/bin/rhodecode-* $out/bin/ |
|
173 | 175 | |
|
174 | 176 | # note that condition should be restricted when adding further tools |
|
175 | 177 | for file in $out/bin/*; do #*/ |
|
176 | 178 | wrapProgram $file \ |
|
177 | 179 | --prefix PYTHONPATH : $PYTHONPATH \ |
|
178 | 180 | --prefix PATH : $PATH \ |
|
179 | 181 | --set PYTHONHASHSEED random |
|
180 | 182 | done |
|
181 | 183 | |
|
182 | 184 | mkdir $out/etc |
|
183 | 185 | cp configs/production.ini $out/etc |
|
184 | 186 | |
|
185 | 187 | echo "Writing meta information for rccontrol to nix-support/rccontrol" |
|
186 | 188 | mkdir -p $out/nix-support/rccontrol |
|
187 | 189 | cp -v rhodecode/VERSION $out/nix-support/rccontrol/version |
|
188 | 190 | echo "DONE: Meta information for rccontrol written" |
|
189 | 191 | |
|
190 | 192 | # TODO: johbo: Make part of ac-tests |
|
191 | 193 | if [ ! -f rhodecode/public/js/scripts.js ]; then |
|
192 | 194 | echo "Missing scripts.js" |
|
193 | 195 | exit 1 |
|
194 | 196 | fi |
|
195 | 197 | if [ ! -f rhodecode/public/css/style.css ]; then |
|
196 | 198 | echo "Missing style.css" |
|
197 | 199 | exit 1 |
|
198 | 200 | fi |
|
199 | 201 | ''; |
|
200 | 202 | |
|
201 | 203 | }); |
|
202 | 204 | |
|
203 | 205 | rhodecode-testdata = import "${rhodecode-testdata-src}/default.nix" { |
|
204 | 206 | inherit |
|
205 | 207 | doCheck |
|
206 | 208 | pkgs |
|
207 | 209 | pythonPackages; |
|
208 | 210 | }; |
|
209 | 211 | |
|
210 | 212 | }; |
|
211 | 213 | |
|
212 | 214 | rhodecode-testdata-src = sources.rhodecode-testdata or ( |
|
213 | 215 | pkgs.fetchhg { |
|
214 | 216 | url = "https://code.rhodecode.com/upstream/rc_testdata"; |
|
215 | 217 | rev = "v0.8.0"; |
|
216 | 218 | sha256 = "0hy1ba134rq2f9si85yx7j4qhc9ky0hjzdk553s3q026i7km809m"; |
|
217 | 219 | }); |
|
218 | 220 | |
|
219 | 221 | # Apply all overrides and fix the final package set |
|
220 | 222 | myPythonPackagesUnfix = |
|
221 | 223 | (extends pythonExternalOverrides |
|
222 | 224 | (extends pythonLocalOverrides |
|
223 | 225 | (extends pythonOverrides |
|
224 | 226 | pythonGeneratedPackages))); |
|
225 | 227 | myPythonPackages = (fix myPythonPackagesUnfix); |
|
226 | 228 | |
|
227 | 229 | in myPythonPackages.rhodecode-enterprise-ce |
@@ -1,33 +1,33 b'' | |||
|
1 | 1 | Apache Reverse Proxy |
|
2 | 2 | ^^^^^^^^^^^^^^^^^^^^ |
|
3 | 3 | |
|
4 | 4 | Here is a sample configuration file for using Apache as a reverse proxy. |
|
5 | 5 | |
|
6 | 6 | .. code-block:: apache |
|
7 | 7 | |
|
8 | 8 | <VirtualHost *:80> |
|
9 | 9 | ServerName hg.myserver.com |
|
10 | 10 | ServerAlias hg.myserver.com |
|
11 | 11 | |
|
12 |
## uncomment |
|
|
13 | ## Apache requires static_files = false in .ini file | |
|
14 | #DocumentRoot /path/to/rhodecode/installation/public | |
|
12 | ## uncomment to serve static files by Apache | |
|
13 | ## ProxyPass /_static/rhodecode ! | |
|
14 | ## Alias /_static/rhodecode /path/to/.rccontrol/enterprise-1/static | |
|
15 | 15 | |
|
16 | 16 | <Proxy *> |
|
17 | 17 | Order allow,deny |
|
18 | 18 | Allow from all |
|
19 | 19 | </Proxy> |
|
20 | 20 | |
|
21 | 21 | ## Important ! |
|
22 | 22 | ## Directive to properly generate url (clone url) for pylons |
|
23 | 23 | ProxyPreserveHost On |
|
24 | 24 | |
|
25 | 25 | ## RhodeCode instance running |
|
26 | 26 | ProxyPass / http://127.0.0.1:10002/ |
|
27 | 27 | ProxyPassReverse / http://127.0.0.1:10002/ |
|
28 | 28 | |
|
29 | 29 | ## to enable https use line below |
|
30 | 30 | #SetEnvIf X-Url-Scheme https HTTPS=1 |
|
31 | 31 | |
|
32 | 32 | </VirtualHost> |
|
33 | 33 |
@@ -1,32 +1,33 b'' | |||
|
1 | 1 | .. _apache-sub-ref: |
|
2 | 2 | |
|
3 | 3 | Apache URL Prefix Configuration |
|
4 | 4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
5 | 5 | |
|
6 | 6 | Use the following example to configure Apache to use a URL prefix. |
|
7 | 7 | |
|
8 | 8 | .. code-block:: apache |
|
9 | 9 | |
|
10 | 10 | <Location /<someprefix> > # Change <someprefix> into your chosen prefix |
|
11 | 11 | ProxyPass http://127.0.0.1:5000/<someprefix> |
|
12 | 12 | ProxyPassReverse http://127.0.0.1:5000/<someprefix> |
|
13 | 13 | SetEnvIf X-Url-Scheme https HTTPS=1 |
|
14 | 14 | </Location> |
|
15 | 15 | |
|
16 | 16 | In addition to the regular Apache setup you will need to add the following |
|
17 | 17 | lines into the ``rhodecode.ini`` file. |
|
18 | 18 | |
|
19 | * Above ``[app:main]`` section of the ``rhodecode.ini`` file add the | |
|
20 | following section if it doesn't exist yet. | |
|
21 | ||
|
22 | .. code-block:: ini | |
|
23 | ||
|
24 | [filter:proxy-prefix] | |
|
25 | use = egg:PasteDeploy#prefix | |
|
26 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix | |
|
27 | ||
|
19 | 28 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the |
|
20 | 29 | following line. |
|
21 | 30 | |
|
22 | 31 | .. code-block:: ini |
|
23 | 32 | |
|
24 | 33 | filter-with = proxy-prefix |
|
25 | ||
|
26 | * At the end of the ``rhodecode.ini`` file add the following section. | |
|
27 | ||
|
28 | .. code-block:: ini | |
|
29 | ||
|
30 | [filter:proxy-prefix] | |
|
31 | use = egg:PasteDeploy#prefix | |
|
32 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix |
@@ -1,127 +1,127 b'' | |||
|
1 | 1 | .. _backup-ref: |
|
2 | 2 | |
|
3 | 3 | Backup and Restore |
|
4 | 4 | ================== |
|
5 | 5 | |
|
6 | 6 | *“The condition of any backup is unknown until a restore is attempted.”* |
|
7 | 7 | `Schrödinger's Backup`_ |
|
8 | 8 | |
|
9 | 9 | To snapshot an instance of |RCE|, and save its settings, you need to backup the |
|
10 | 10 | following parts of the system at the same time. |
|
11 | 11 | |
|
12 | 12 | * The |repos| managed by the instance. |
|
13 | 13 | * The |RCE| database. |
|
14 | 14 | * Any configuration files or extensions that you've configured. |
|
15 | 15 | |
|
16 | 16 | .. important:: |
|
17 | 17 | |
|
18 | 18 | Ideally you should script all of these functions so that it creates a |
|
19 | 19 | backup snapshot of your system at a particular timestamp and then run that |
|
20 | 20 | script regularly. |
|
21 | 21 | |
|
22 | 22 | Backup Details |
|
23 | 23 | -------------- |
|
24 | 24 | |
|
25 | 25 | To backup the relevant parts of |RCE| required to restore your system, use |
|
26 | 26 | the information in this section to identify what is important to you. |
|
27 | 27 | |
|
28 | 28 | Repository Backup |
|
29 | 29 | ^^^^^^^^^^^^^^^^^ |
|
30 | 30 | |
|
31 | 31 | To back up your |repos|, use the API to get a list of all |repos| managed, |
|
32 | 32 | and then clone them to your backup location. |
|
33 | 33 | |
|
34 | 34 | Use the ``get_repos`` method to list all your managed |repos|, |
|
35 | 35 | and use the ``clone_uri`` information that is returned. See the :ref:`api` |
|
36 | 36 | for more information. |
|
37 | 37 | |
|
38 | 38 | .. important:: |
|
39 | 39 | |
|
40 | 40 | This will not work for |svn| |repos|. Currently the only way to back up |
|
41 | 41 | your |svn| |repos| is to make a copy of them. |
|
42 | 42 | |
|
43 | 43 | It is also important to note, that you can only restore the |svn| |repos| |
|
44 | 44 | using the same version as they were saved with. |
|
45 | 45 | |
|
46 | 46 | Database Backup |
|
47 | 47 | ^^^^^^^^^^^^^^^ |
|
48 | 48 | |
|
49 | 49 | The instance database contains all the |RCE| permissions settings, |
|
50 | 50 | and user management information. To backup your database, |
|
51 | 51 | export it using the following appropriate example, and then move it to your |
|
52 | 52 | backup location: |
|
53 | 53 | |
|
54 | 54 | .. code-block:: bash |
|
55 | 55 | |
|
56 | 56 | # For MySQL DBs |
|
57 | 57 | $ mysqldump -u <uname> -p <pass> db_name > mysql-db-backup |
|
58 | 58 | |
|
59 | 59 | # For PostgreSQL DBs |
|
60 | 60 | $ pg_dump dbname > postgresql-db-backup |
|
61 | 61 | |
|
62 | 62 | # For SQLlite |
|
63 | 63 | $ sqlite3 rhodecode.db ‘.dump’ > sqlite-db-backup |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | The default |RCE| SQLite database location is |
|
67 | 67 | :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.db` |
|
68 | 68 | |
|
69 | 69 | If running MySQL or PostgreSQL databases, you will have configured these |
|
70 | 70 | separately, for more information see :ref:`rhodecode-database-ref` |
|
71 | 71 | |
|
72 | 72 | Configuration File Backup |
|
73 | 73 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
74 | 74 | |
|
75 | 75 | Depending on your setup, you could have a number of configuration files that |
|
76 | 76 | should be backed up. You may have some, or all of the configuration files |
|
77 | 77 | listed in the :ref:`config-rce-files` section. Ideally you should back these |
|
78 | 78 | up at the same time as the database and |repos|. |
|
79 | 79 | |
|
80 | 80 | Gist Backup |
|
81 | 81 | ^^^^^^^^^^^ |
|
82 | 82 | |
|
83 | 83 | To backup the gists on your |RCE| instance you can use the ``get_users`` and |
|
84 | 84 | ``get_gists`` API methods to fetch the gists for each user on the instance. |
|
85 | 85 | |
|
86 | 86 | Extension Backups |
|
87 | 87 | ^^^^^^^^^^^^^^^^^ |
|
88 | 88 | |
|
89 | 89 | You should also backup any extensions added in the |
|
90 | 90 | :file:`home/{user}/.rccontrol/{instance-id}/rcextensions` directory. |
|
91 | 91 | |
|
92 | 92 | Full-text Search Backup |
|
93 | 93 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
94 | 94 | |
|
95 | 95 | You may also have full text search set up, but the index can be rebuild from |
|
96 | 96 | re-imported |repos| if necessary. You will most likely want to backup your |
|
97 | 97 | :file:`mapping.ini` file if you've configured that. For more information, see |
|
98 | 98 | the :ref:`indexing-ref` section. |
|
99 | 99 | |
|
100 | 100 | Restoration Steps |
|
101 | 101 | ----------------- |
|
102 | 102 | |
|
103 | 103 | To restore an instance of |RCE| from its backed up components, use the |
|
104 | 104 | following steps. |
|
105 | 105 | |
|
106 | 106 | 1. Install a new instance of |RCE|. |
|
107 | 107 | 2. Once installed, configure the instance to use the backed up |
|
108 | 108 | :file:`rhodecode.ini` file. Ensure this file points to the backed up |
|
109 | 109 | database, see the :ref:`config-database` section. |
|
110 | 110 | 3. Restart |RCE| and remap and rescan your |repos|, see the |
|
111 | 111 | :ref:`remap-rescan` section. |
|
112 | 112 | |
|
113 | 113 | Post Restoration Steps |
|
114 | 114 | ^^^^^^^^^^^^^^^^^^^^^^ |
|
115 | 115 | |
|
116 | 116 | Once you have restored your |RCE| instance to basic functionality, you can |
|
117 | 117 | then work on restoring any specific setup changes you had made. |
|
118 | 118 | |
|
119 | 119 | * To recreate the |RCE| index, use the backed up :file:`mapping.ini` file if |
|
120 | 120 | you had made changes and rerun the indexer. See the |
|
121 | 121 | :ref:`indexing-ref` section for details. |
|
122 | 122 | * To reconfigure any extensions, copy the backed up extensions into the |
|
123 | 123 | :file:`/home/{user}/.rccontrol/{instance-id}/rcextensions` and also specify |
|
124 |
any custom hooks if necessary. See the :ref:` |
|
|
124 | any custom hooks if necessary. See the :ref:`extensions-hooks-ref` section for | |
|
125 | 125 | details. |
|
126 | 126 | |
|
127 | 127 | .. _Schrödinger's Backup: http://novabackup.novastor.com/blog/schrodingers-backup-good-bad-backup/ |
@@ -1,72 +1,120 b'' | |||
|
1 | 1 | Nginx Configuration Example |
|
2 | 2 | --------------------------- |
|
3 | 3 | |
|
4 | 4 | Use the following example to configure Nginx as a your web server. |
|
5 | 5 | |
|
6 | 6 | .. code-block:: nginx |
|
7 | 7 | |
|
8 | log_format log_custom '$remote_addr - $remote_user [$time_local] ' | |
|
9 | '"$request" $status $body_bytes_sent ' | |
|
10 | '"$http_referer" "$http_user_agent" ' | |
|
11 | '$request_time $upstream_response_time $pipe'; | |
|
12 | ||
|
8 | 13 | upstream rc { |
|
9 | 14 | |
|
10 | 15 | server 127.0.0.1:10002; |
|
11 | 16 | |
|
12 | 17 | # add more instances for load balancing |
|
13 | 18 | # server 127.0.0.1:10003; |
|
14 | 19 | # server 127.0.0.1:10004; |
|
15 | 20 | } |
|
16 | 21 | |
|
17 | ## gist alias | |
|
22 | ## gist alias server, for serving nicer GIST urls | |
|
18 | 23 | |
|
19 | 24 | server { |
|
20 | 25 | listen 443; |
|
21 | 26 | server_name gist.myserver.com; |
|
22 | access_log /var/log/nginx/gist.access.log; | |
|
27 | access_log /var/log/nginx/gist.access.log log_custom; | |
|
23 | 28 | error_log /var/log/nginx/gist.error.log; |
|
24 | 29 | |
|
25 | 30 | ssl on; |
|
26 | 31 | ssl_certificate gist.rhodecode.myserver.com.crt; |
|
27 | 32 | ssl_certificate_key gist.rhodecode.myserver.com.key; |
|
28 | 33 | |
|
29 | 34 | ssl_session_timeout 5m; |
|
30 | 35 | |
|
31 |
ssl_protocols |
|
|
32 | ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; | |
|
36 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
|
33 | 37 | ssl_prefer_server_ciphers on; |
|
38 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
|
39 | ||
|
34 | 40 | add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; |
|
35 | 41 | |
|
36 | 42 | # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits |
|
37 | ssl_dhparam /etc/nginx/ssl/dhparam.pem; | |
|
43 | #ssl_dhparam /etc/nginx/ssl/dhparam.pem; | |
|
38 | 44 | |
|
39 | 45 | rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1; |
|
40 | 46 | rewrite (.*) https://rhodecode.myserver.com/_admin/gists; |
|
41 | 47 | } |
|
42 | 48 | |
|
49 | ## HTTP to HTTPS rewrite | |
|
43 | 50 | server { |
|
44 |
listen |
|
|
51 | listen 80; | |
|
45 | 52 | server_name rhodecode.myserver.com; |
|
46 | access_log /var/log/nginx/rhodecode.access.log; | |
|
47 | error_log /var/log/nginx/rhodecode.error.log; | |
|
53 | ||
|
54 | if ($http_host = rhodecode.myserver.com) { | |
|
55 | rewrite (.*) https://rhodecode.myserver.com$1 permanent; | |
|
56 | } | |
|
57 | } | |
|
58 | ||
|
59 | ## MAIN SSL enabled server | |
|
60 | server { | |
|
61 | listen 443 ssl; | |
|
62 | server_name rhodecode.myserver.com; | |
|
63 | ||
|
64 | access_log /var/log/nginx/rhodecode.access.log log_custom; | |
|
65 | error_log /var/log/nginx/rhodecode.error.log; | |
|
48 | 66 | |
|
49 | 67 | ssl on; |
|
50 | 68 | ssl_certificate rhodecode.myserver.com.crt; |
|
51 | 69 | ssl_certificate_key rhodecode.myserver.com.key; |
|
52 | 70 | |
|
53 | 71 | ssl_session_timeout 5m; |
|
54 | 72 | |
|
55 |
ssl_protocols |
|
|
56 | ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; | |
|
73 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
|
57 | 74 | ssl_prefer_server_ciphers on; |
|
75 | ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
|
76 | ||
|
77 | # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits | |
|
78 | #ssl_dhparam /etc/nginx/ssl/dhparam.pem; | |
|
79 | ||
|
80 | include /etc/nginx/proxy.conf; | |
|
81 | ||
|
82 | ## serve static files by nginx, recommended | |
|
83 | # location /_static/rhodecode { | |
|
84 | # alias /path/to/.rccontrol/enterprise-1/static; | |
|
85 | # } | |
|
58 | 86 | |
|
59 | ## uncomment root directive if you want to serve static files by nginx | |
|
60 | ## requires static_files = false in .ini file | |
|
61 | # root /path/to/rhodecode/installation/public; | |
|
87 | ## channel stream live components | |
|
88 | location /_channelstream { | |
|
89 | rewrite /_channelstream/(.*) /$1 break; | |
|
90 | proxy_pass http://127.0.0.1:9800; | |
|
62 | 91 |
|
|
63 | include /etc/nginx/proxy.conf; | |
|
92 | proxy_connect_timeout 10; | |
|
93 | proxy_send_timeout 10m; | |
|
94 | proxy_read_timeout 10m; | |
|
95 | tcp_nodelay off; | |
|
96 | proxy_set_header Host $host; | |
|
97 | proxy_set_header X-Real-IP $remote_addr; | |
|
98 | proxy_set_header X-Url-Scheme $scheme; | |
|
99 | proxy_set_header X-Forwarded-Proto $scheme; | |
|
100 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
|
101 | gzip off; | |
|
102 | proxy_http_version 1.1; | |
|
103 | proxy_set_header Upgrade $http_upgrade; | |
|
104 | proxy_set_header Connection "upgrade"; | |
|
105 | } | |
|
64 | 106 | |
|
65 | 107 | location / { |
|
66 | 108 | try_files $uri @rhode; |
|
67 | 109 | } |
|
68 | 110 | |
|
69 | location @rhode { | |
|
70 | proxy_pass http://rc; | |
|
71 | } | |
|
72 | } | |
|
111 | location @rhode { | |
|
112 | proxy_pass http://rc; | |
|
113 | } | |
|
114 | ||
|
115 | ## custom 502 error page | |
|
116 | error_page 502 /502.html; | |
|
117 | location = /502.html { | |
|
118 | root /path/to/.rccontrol/enterprise-1/static; | |
|
119 | } | |
|
120 | } No newline at end of file |
@@ -1,33 +1,36 b'' | |||
|
1 | 1 | .. _nginx_url-pre: |
|
2 | 2 | |
|
3 | 3 | Nginx URL Prefix Configuration |
|
4 | 4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
5 | 5 | |
|
6 | 6 | Use the following example to configure Nginx to use a URL prefix. |
|
7 | 7 | |
|
8 | 8 | .. code-block:: nginx |
|
9 | 9 | |
|
10 | 10 | location /foo { |
|
11 | 11 | rewrite /foo(.*) /$1 break; |
|
12 | 12 | proxy_pass http://localhost:3200; |
|
13 | 13 | proxy_redirect off; |
|
14 | 14 | proxy_set_header Host $host; |
|
15 | 15 | } |
|
16 | 16 | |
|
17 | 17 | In addition to the Nginx configuration you will need to add the following |
|
18 | lines into the ``rhodecode.ini`` file. | |
|
18 | lines (if they not exist) into the ``rhodecode.ini`` file. | |
|
19 | ||
|
20 | * Above ``[app:main]`` section of the ``rhodecode.ini`` file add the | |
|
21 | following section if it doesn't exist yet. | |
|
22 | ||
|
23 | .. code-block:: ini | |
|
24 | ||
|
25 | [filter:proxy-prefix] | |
|
26 | use = egg:PasteDeploy#prefix | |
|
27 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix | |
|
19 | 28 |
|
|
20 | 29 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the |
|
21 | 30 | following line. |
|
22 | 31 | |
|
23 | 32 | .. code-block:: ini |
|
24 | 33 | |
|
25 | 34 | filter-with = proxy-prefix |
|
26 | 35 | |
|
27 | * At the end of the ``rhodecode.ini`` file add the following section. | |
|
28 | 36 |
|
|
29 | .. code-block:: ini | |
|
30 | ||
|
31 | [filter:proxy-prefix] | |
|
32 | use = egg:PasteDeploy#prefix | |
|
33 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix |
@@ -1,68 +1,68 b'' | |||
|
1 | 1 | .. _repo-xtra: |
|
2 | 2 | |
|
3 | 3 | Repository Extra Fields |
|
4 | 4 | ======================= |
|
5 | 5 | |
|
6 | 6 | Extra fields attached to a |repo| allow you to configure additional actions for |
|
7 | 7 | |RCX|. To install and read more about |RCX|, see the :ref:`install-rcx` section. |
|
8 | 8 | |
|
9 | 9 | Enabling Extra Fields |
|
10 | 10 | --------------------- |
|
11 | 11 | |
|
12 | 12 | To enable extra fields on |repos|, use the following steps: |
|
13 | 13 | |
|
14 | 14 | 1. Go to the :menuselection:`Admin --> Settings --> Visual` page. |
|
15 | 15 | 2. Check the :guilabel:`Use repository extra fields` box. |
|
16 | 16 | 3. Save your changes. |
|
17 | 17 | |
|
18 | 18 | |
|
19 | 19 | Configuring Extra Fields |
|
20 | 20 | ------------------------ |
|
21 | 21 | |
|
22 | 22 | To configure extra fields per repository, use the following steps: |
|
23 | 23 | |
|
24 | 24 | 1. Go to :menuselection:`Admin --> Repositories` and select :guilabel:`Edit` |
|
25 | 25 | beside the |repo| to which you wish to add extra fields. |
|
26 | 26 | 2. On the |repo| settings page, select the :guilabel:`Extra fields` tab. |
|
27 | 27 | |
|
28 | 28 | .. image:: ../images/extra-repo-fields.png |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | Example Usage |
|
32 | 32 | ------------- |
|
33 | 33 | |
|
34 | 34 | To use the extra fields in an extension, see the example below. For more |
|
35 |
information and examples, see the :ref:` |
|
|
35 | information and examples, see the :ref:`extensions-hooks-ref` section. | |
|
36 | 36 | |
|
37 | 37 | .. code-block:: python |
|
38 | 38 | |
|
39 | 39 | call = load_extension('http_notify.py') |
|
40 | 40 | if call: |
|
41 | 41 | url = 'http://default.url' # <url for post data> |
|
42 | 42 | |
|
43 | 43 | # possibly extract the URL from extra fields |
|
44 | 44 | call = load_extension('extra_fields.py') |
|
45 | 45 | if call: |
|
46 | 46 | repo_extra_fields = call(**kwargs) |
|
47 | 47 | # now update if we have extra fields, they have precedence |
|
48 | 48 | # this way users can store any configuration inside the database per |
|
49 | 49 | # repo |
|
50 | 50 | for key, data in repo_extra_fields.items(): |
|
51 | 51 | kwargs[key] = data['field_value'] |
|
52 | 52 | |
|
53 | 53 | # an endpoint url data will be sent to, fetched from extra fields |
|
54 | 54 | # if exists, or fallback to default |
|
55 | 55 | kwargs['URL'] = kwargs.pop('webhook_url', None) or url |
|
56 | 56 | |
|
57 | 57 | # fetch pushed commits, from commit_ids list |
|
58 | 58 | call = load_extension('extract_commits.py') |
|
59 | 59 | extracted_commits = {} |
|
60 | 60 | if call: |
|
61 | 61 | extracted_commits = call(**kwargs) |
|
62 | 62 | # store the commits for the next call chain |
|
63 | 63 | kwargs['COMMITS'] = extracted_commits |
|
64 | 64 | |
|
65 | 65 | # set additional keys and values to be sent via POST to given URL |
|
66 | 66 | kwargs['caller_type'] = 'rhodecode' |
|
67 | 67 | kwargs['date'] = time.time() # import time before |
|
68 | 68 | call(**kwargs) |
@@ -1,95 +1,95 b'' | |||
|
1 | 1 | .. _rhodecode-reset-ref: |
|
2 | 2 | |
|
3 | 3 | Settings Management |
|
4 | 4 | ------------------- |
|
5 | 5 | |
|
6 | 6 | All |RCE| settings can be set from the user interface, but in the event that |
|
7 | 7 | it somehow becomes unavailable you can use ``ishell`` inside your |RCE| |
|
8 | 8 | ``virtualenv`` to carry out emergency measures. |
|
9 | 9 | |
|
10 | 10 | .. warning:: |
|
11 | 11 | |
|
12 | 12 | Logging into the |RCE| database with ``iShell`` should only be done by an |
|
13 | 13 | experienced and knowledgeable database administrator. |
|
14 | 14 | |
|
15 | 15 | Reset Admin Account Privileges |
|
16 | 16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
17 | 17 | |
|
18 | 18 | If you accidentally remove your admin privileges from the admin account you |
|
19 | 19 | can restore them using ``ishell``. Use the following example to reset your |
|
20 | 20 | account permissions. |
|
21 | 21 | |
|
22 | 22 | .. code-block:: bash |
|
23 | 23 | |
|
24 | 24 | # Open iShell from the terminal |
|
25 | 25 | $ .rccontrol/enterprise-5/profile/bin/paster \ |
|
26 | 26 | ishell .rccontrol/enterprise-5/rhodecode.ini |
|
27 | 27 | |
|
28 | 28 | .. code-block:: mysql |
|
29 | 29 | |
|
30 | 30 | # Use this example to change user permissions |
|
31 | 31 | In [1]: adminuser = User.get_by_username('username') |
|
32 | 32 | In [2]: adminuser.admin = True |
|
33 | In [3]: Session.add(adminuser);Session().commit() | |
|
33 | In [3]: Session().add(adminuser);Session().commit() | |
|
34 | 34 | In [4]: exit() |
|
35 | 35 | |
|
36 | 36 | Set to read global ``.hgrc`` file |
|
37 | 37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
38 | 38 | |
|
39 | 39 | By default, |RCE| does not read global ``hgrc`` files in |
|
40 | 40 | ``/etc/mercurial/hgrc`` or ``/etc/mercurial/hgrc.d`` because it |
|
41 | 41 | can lead to issues. This is set in the ``rhodecode_ui`` table for which |
|
42 | 42 | there is no UI. If you need to edit this you can |
|
43 | 43 | manually change the settings using SQL statements with ``ishell``. Use the |
|
44 | 44 | following example to make changes to this table. |
|
45 | 45 | |
|
46 | 46 | .. code-block:: bash |
|
47 | 47 | |
|
48 | 48 | # Open iShell from the terminal |
|
49 | 49 | $ .rccontrol/enterprise-5/profile/bin/paster \ |
|
50 | 50 | ishell.rccontrol/enterprise-5/rhodecode.ini |
|
51 | 51 | |
|
52 | 52 | .. code-block:: mysql |
|
53 | 53 | |
|
54 | 54 | # Use this example to enable global .hgrc access |
|
55 | 55 | In [4]: new_option = RhodeCodeUi() |
|
56 | 56 | In [5]: new_option.ui_section='web' |
|
57 | 57 | In [6]: new_option.ui_key='allow_push' |
|
58 | 58 | In [7]: new_option.ui_value='*' |
|
59 | 59 | In [8]: Session().add(new_option);Session().commit() |
|
60 | 60 | |
|
61 | 61 | Manually Reset Password |
|
62 | 62 | ^^^^^^^^^^^^^^^^^^^^^^^ |
|
63 | 63 | |
|
64 | 64 | If you need to manually reset a user password, use the following steps. |
|
65 | 65 | |
|
66 | 66 | 1. Navigate to your |RCE| install location. |
|
67 | 67 | 2. Run the interactive ``ishell`` prompt. |
|
68 | 68 | 3. Set a new password. |
|
69 | 69 | |
|
70 | 70 | Use the following code example to carry out these steps. |
|
71 | 71 | |
|
72 | 72 | .. code-block:: bash |
|
73 | 73 | |
|
74 | 74 | # starts the ishell interactive prompt |
|
75 | 75 | $ .rccontrol/enterprise-5/profile/bin/paster \ |
|
76 | 76 | ishell .rccontrol/enterprise-5/rhodecode.ini |
|
77 | 77 | |
|
78 | 78 | .. code-block:: mysql |
|
79 | 79 | |
|
80 | 80 | from rhodecode.lib.auth import generate_auth_token |
|
81 | 81 | from rhodecode.lib.auth import get_crypt_password |
|
82 | 82 | |
|
83 | 83 | # Enter the user name whose password you wish to change |
|
84 | 84 | my_user = 'USERNAME' |
|
85 | 85 | u = User.get_by_username(my_user) |
|
86 | 86 | |
|
87 | 87 | # If this fails then the user does not exist |
|
88 | 88 | u.auth_token = generate_auth_token(my_user) |
|
89 | 89 | |
|
90 | 90 | # Set the new password |
|
91 | 91 | u.password = get_crypt_password('PASSWORD') |
|
92 | 92 | |
|
93 | 93 | Session().add(u) |
|
94 | 94 | Session().commit() |
|
95 | 95 | exit |
@@ -1,84 +1,84 b'' | |||
|
1 | 1 | .. _svn-http: |
|
2 | 2 | |
|
3 | 3 | |svn| With Write Over HTTP |
|
4 | 4 | -------------------------- |
|
5 | 5 | |
|
6 | 6 | To use |svn| with write access, the currently supported method is over HTTP. |
|
7 | 7 | This requires you to configure your local machine so that it can access your |
|
8 | 8 | |RCE| instance. |
|
9 | 9 | |
|
10 | 10 | Prerequisites |
|
11 | 11 | ^^^^^^^^^^^^^ |
|
12 | 12 | |
|
13 | 13 | - Enable lab setting on your |RCE| instance, see :ref:`lab-settings`. |
|
14 | 14 | - You need to install the following tools on your local machine: ``Apache`` and |
|
15 | 15 | ``mod_dav_svn``. Use the following Ubuntu as an example. |
|
16 | 16 | |
|
17 | 17 | .. code-block:: bash |
|
18 | 18 | |
|
19 | 19 | $ sudo apt-get install apache2 libapache2-mod-svn |
|
20 | 20 | |
|
21 | 21 | Once installed you need to enable ``dav_svn``: |
|
22 | 22 | |
|
23 | 23 | .. code-block:: bash |
|
24 | 24 | |
|
25 | 25 | $ sudo a2enmod dav_svn |
|
26 | 26 | |
|
27 | 27 | Configuring Apache Setup |
|
28 | 28 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
|
29 | 29 | |
|
30 | 30 | .. tip:: |
|
31 | 31 | |
|
32 | 32 | It is recommended to run Apache on a port other than 80, due to possible |
|
33 | 33 | conflicts with other HTTP servers like nginx. To do this, set the |
|
34 | 34 | ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example |
|
35 | 35 | ``Listen 8090`` |
|
36 | 36 | |
|
37 | 37 | It is also recommended to run apache as the same user as |RCE|, otherwise |
|
38 | 38 | permission issues could occur. To do this edit the ``/etc/apache2/envvars`` |
|
39 | 39 | |
|
40 | 40 | .. code-block:: apache |
|
41 | 41 | |
|
42 | 42 | export APACHE_RUN_USER=ubuntu |
|
43 | 43 | export APACHE_RUN_GROUP=ubuntu |
|
44 | 44 | |
|
45 | 45 | 1. To configure Apache, create and edit a virtual hosts file, for example |
|
46 | 46 | :file:`/etc/apache2/sites-available/default.conf`, or create another |
|
47 | 47 | virtual hosts file and add a location section inside the |
|
48 | 48 | ``<VirtualHost>`` section. |
|
49 | 49 | |
|
50 | 50 | .. code-block:: apache |
|
51 | 51 | |
|
52 | 52 | <Location /> |
|
53 | 53 | DAV svn |
|
54 | 54 | # Must be explicit path, relative not supported |
|
55 | 55 | SVNParentPath /PATH/TO/REPOSITORIES |
|
56 | 56 | SVNListParentPath On |
|
57 | 57 | Allow from all |
|
58 | 58 | Order allow,deny |
|
59 | 59 | </Location> |
|
60 | 60 | |
|
61 | 61 | .. note:: |
|
62 | 62 | |
|
63 | 63 | Once configured, check that you can see the list of repositories on your |
|
64 | 64 | |RCE| instance. |
|
65 | 65 | |
|
66 | 66 | 2. Go to the :menuselection:`Admin --> Settings --> Labs` page, and |
|
67 | 67 | enable :guilabel:`Proxy Subversion HTTP requests`, and specify the |
|
68 | 68 | :guilabel:`Subversion HTTP Server URL`. |
|
69 | 69 | |
|
70 | 70 | Using |svn| |
|
71 | 71 | ^^^^^^^^^^^ |
|
72 | 72 | |
|
73 | 73 | Once |svn| has been enabled on your instance, you can use it using the |
|
74 | 74 | following examples. For more |svn| information, see the `Subversion Red Book`_ |
|
75 | 75 | |
|
76 | 76 | .. code-block:: bash |
|
77 | 77 | |
|
78 | 78 | # To clone a repository |
|
79 |
svn c |
|
|
79 | svn checkout http://my-svn-server.example.com/my-svn-repo | |
|
80 | 80 | |
|
81 | 81 | # svn commit |
|
82 | 82 | svn commit |
|
83 | 83 | |
|
84 | 84 | .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn |
This diff has been collapsed as it changes many lines, (2637 lines changed) Show them Hide them | |||
@@ -1,2824 +1,207 b'' | |||
|
1 | 1 | .. _api: |
|
2 | 2 | |
|
3 | 3 | API Documentation |
|
4 | 4 | ================= |
|
5 | 5 | |
|
6 | 6 | The |RCE| API uses a single scheme for calling all API methods. The API is |
|
7 | 7 | implemented with JSON protocol in both directions. To send API requests to |
|
8 | 8 | your instance of |RCE|, use the following URL format |
|
9 | 9 | ``<your_server>/_admin`` |
|
10 | 10 | |
|
11 | 11 | .. note:: |
|
12 | 12 | |
|
13 | 13 | To use the API, you should configure the :file:`~/.rhoderc` file with |
|
14 | 14 | access details per instance. For more information, see |
|
15 | 15 | :ref:`config-rhoderc`. |
|
16 | 16 | |
|
17 | 17 | |
|
18 | 18 | API ACCESS FOR WEB VIEWS |
|
19 | 19 | ------------------------ |
|
20 | 20 | |
|
21 | 21 | API access can also be turned on for each web view in |RCE| that is |
|
22 | 22 | decorated with a `@LoginRequired` decorator. To enable API access, change |
|
23 | 23 | the standard login decorator to `@LoginRequired(api_access=True)`. |
|
24 | 24 | |
|
25 | 25 | From |RCM| version 1.7.0 you can configure a white list |
|
26 | 26 | of views that have API access enabled by default. To enable these, |
|
27 | 27 | edit the |RCM| configuration ``.ini`` file. The default location is: |
|
28 | 28 | |
|
29 | 29 | * |RCM| Pre-2.2.7 :file:`root/rhodecode/data/production.ini` |
|
30 | 30 | * |RCM| 3.0 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` |
|
31 | 31 | |
|
32 | 32 | To configure the white list, edit this section of the file. In this |
|
33 | 33 | configuration example, API access is granted to the patch/diff raw file and |
|
34 | 34 | archive. |
|
35 | 35 | |
|
36 | 36 | .. code-block:: ini |
|
37 | 37 | |
|
38 | 38 | ## List of controllers (using glob syntax) that AUTH TOKENS could be used for access. |
|
39 | 39 | ## Adding ?auth_token = <token> to the url authenticates this request as if it |
|
40 | 40 | ## came from the the logged in user who own this authentication token. |
|
41 | 41 | ## |
|
42 | 42 | ## Syntax is <ControllerClass>:<function_pattern>. |
|
43 | 43 | ## The list should be "," separated and on a single line. |
|
44 | 44 | ## |
|
45 | 45 | api_access_controllers_whitelist = ChangesetController:changeset_patch,ChangesetController:changeset_raw,ilesController:raw,FilesController:archivefile, |
|
46 | 46 | |
|
47 | 47 | After this change, a |RCE| view can be accessed without login by adding a |
|
48 | 48 | GET parameter ``?auth_token=<auth_token>`` to a url. For example to |
|
49 | 49 | access the raw diff. |
|
50 | 50 | |
|
51 | 51 | .. code-block:: html |
|
52 | 52 | |
|
53 | 53 | http://<server>/<repo>/changeset-diff/<sha>?auth_token=<auth_token> |
|
54 | 54 | |
|
55 | 55 | By default this is only enabled on RSS/ATOM feed views. Exposing raw diffs is a |
|
56 | 56 | good way to integrate with 3rd party services like code review, or build farms |
|
57 | 57 | that could download archives. |
|
58 | 58 | |
|
59 | 59 | API ACCESS |
|
60 | 60 | ---------- |
|
61 | 61 | |
|
62 | 62 | All clients are required to send JSON-RPC spec JSON data. |
|
63 | 63 | |
|
64 | 64 | .. code-block:: bash |
|
65 | 65 | |
|
66 | 66 | { |
|
67 | 67 | "id:"<id>", |
|
68 | 68 | "auth_token":"<auth_token>", |
|
69 | 69 | "method":"<method_name>", |
|
70 | 70 | "args":{"<arg_key>":"<arg_val>"} |
|
71 | 71 | } |
|
72 | 72 | |
|
73 | 73 | Example call for auto pulling from remote repositories using curl: |
|
74 | 74 | |
|
75 | 75 | .. code-block:: bash |
|
76 | 76 | |
|
77 | 77 | curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1, |
|
78 | 78 | "auth_token":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull", "args":{"repo":"CPython"}}' |
|
79 | 79 | |
|
80 | 80 | Provide those parameters: |
|
81 | 81 | - **id** A value of any type, which is used to match the response with the |
|
82 | 82 | request that it is replying to. |
|
83 | 83 | - **auth_token** for access and permission validation. |
|
84 | 84 | - **method** is name of method to call |
|
85 | 85 | - **args** is an ``key:value`` list of arguments to pass to method |
|
86 | 86 | |
|
87 | 87 | .. note:: |
|
88 | 88 | |
|
89 | 89 | To get your |authtoken|, from the |RCE| interface, |
|
90 | 90 | go to: |
|
91 | 91 | :menuselection:`username --> My account --> Auth tokens` |
|
92 | 92 | |
|
93 | 93 | For security reasons you should always create a dedicated |authtoken| for |
|
94 | 94 | API use only. |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | The |RCE| API will always return a JSON-RPC response: |
|
98 | 98 | |
|
99 | 99 | .. code-block:: bash |
|
100 | 100 | |
|
101 | 101 | { |
|
102 | 102 | "id": <id>, # matching id sent by request |
|
103 | 103 | "result": "<result>"|null, # JSON formatted result, null if any errors |
|
104 | 104 | "error": "null"|<error_message> # JSON formatted error (if any) |
|
105 | 105 | } |
|
106 | 106 | |
|
107 | 107 | All responses from API will be with `HTTP/1.0 200 OK` status code. |
|
108 | 108 | If there is an error when calling the API, the *error* key will contain a |
|
109 | 109 | failure description and the *result* will be `null`. |
|
110 | 110 | |
|
111 | 111 | API CLIENT |
|
112 | 112 | ---------- |
|
113 | 113 | |
|
114 | 114 | To install the |RCE| API, see :ref:`install-tools`. To configure the API per |
|
115 | 115 | instance, see the :ref:`rc-tools` section as you need to configure a |
|
116 | 116 | :file:`~/.rhoderc` file with your |authtokens|. |
|
117 | 117 | |
|
118 | 118 | Once you have set up your instance API access, use the following examples to |
|
119 | 119 | get started. |
|
120 | 120 | |
|
121 | 121 | .. code-block:: bash |
|
122 | 122 | |
|
123 | 123 | # Getting the 'rhodecode' repository |
|
124 | 124 | # from a RhodeCode Enterprise instance |
|
125 | 125 | rhodecode-api --instance-name=enterprise-1 get_repo repoid:rhodecode |
|
126 | 126 | |
|
127 | 127 | Calling method get_repo => http://127.0.0.1:5000 |
|
128 | 128 | Server response |
|
129 | 129 | { |
|
130 | 130 | <json data> |
|
131 | 131 | } |
|
132 | 132 | |
|
133 | 133 | # Creating a new mercurial repository called 'brand-new' |
|
134 | 134 | # with a description 'Repo-description' |
|
135 | 135 | rhodecode-api --instance-name=enterprise-1 create_repo repo_name:brand-new repo_type:hg description:Repo-description |
|
136 | 136 | { |
|
137 | 137 | "error": null, |
|
138 | 138 | "id": 1110, |
|
139 | 139 | "result": { |
|
140 | 140 | "msg": "Created new repository `brand-new`", |
|
141 | 141 | "success": true, |
|
142 | 142 | "task": null |
|
143 | 143 | } |
|
144 | 144 | } |
|
145 | 145 | |
|
146 | 146 | A broken example, what not to do. |
|
147 | 147 | |
|
148 | 148 | .. code-block:: bash |
|
149 | 149 | |
|
150 | 150 | # A call missing the required arguments |
|
151 | 151 | # and not specifying the instance |
|
152 | 152 | rhodecode-api get_repo |
|
153 | 153 | |
|
154 | 154 | Calling method get_repo => http://127.0.0.1:5000 |
|
155 | 155 | Server response |
|
156 | 156 | "Missing non optional `repoid` arg in JSON DATA" |
|
157 | 157 | |
|
158 | 158 | You can specify pure JSON using the ``--format`` parameter. |
|
159 | 159 | |
|
160 | 160 | .. code-block:: bash |
|
161 | 161 | |
|
162 | 162 | rhodecode-api --format=json get_repo repoid:rhodecode |
|
163 | 163 | |
|
164 | 164 | In such case only output that this function shows is pure JSON, we can use that |
|
165 | 165 | and pipe output to some json formatter. |
|
166 | 166 | |
|
167 | 167 | If output is in pure JSON format, you can pipe output to a JSON formatter. |
|
168 | 168 | |
|
169 | 169 | .. code-block:: bash |
|
170 | 170 | |
|
171 | 171 | rhodecode-api --instance-name=enterprise-1 --format=json get_repo repoid:rhodecode | python -m json.tool |
|
172 | 172 | |
|
173 | 173 | API METHODS |
|
174 | 174 | ----------- |
|
175 | 175 | |
|
176 | 176 | Each method by default required following arguments. |
|
177 | 177 | |
|
178 | 178 | .. code-block:: bash |
|
179 | 179 | |
|
180 | 180 | id : "<id_for_response>" |
|
181 | 181 | auth_token : "<auth_token>" |
|
182 | 182 | method : "<method name>" |
|
183 | 183 | args : {} |
|
184 | 184 | |
|
185 | 185 | Use each **param** from docs and put it in args, Optional parameters |
|
186 | 186 | are not required in args. |
|
187 | 187 | |
|
188 | 188 | .. code-block:: bash |
|
189 | 189 | |
|
190 | 190 | args: {"repoid": "rhodecode"} |
|
191 | 191 | |
|
192 | 192 | .. Note: From this point on things are generated by the script in |
|
193 | 193 | `scripts/fabfile.py`. To change things below, update the docstrings in the |
|
194 | 194 | ApiController. |
|
195 | 195 | |
|
196 | 196 | .. --- API DEFS MARKER --- |
|
197 | ||
|
198 | pull | |
|
199 | ---- | |
|
200 | ||
|
201 | .. py:function:: pull(apiuser, repoid) | |
|
202 | ||
|
203 | Triggers a pull on the given repository from a remote location. You | |
|
204 | can use this to keep remote repositories up-to-date. | |
|
205 | ||
|
206 | This command can only be run using an |authtoken| with admin | |
|
207 | rights to the specified repository. For more information, | |
|
208 | see :ref:`config-token-ref`. | |
|
209 | ||
|
210 | This command takes the following options: | |
|
211 | ||
|
212 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
213 | :type apiuser: AuthUser | |
|
214 | :param repoid: The repository name or repository ID. | |
|
215 | :type repoid: str or int | |
|
216 | ||
|
217 | Example output: | |
|
218 | ||
|
219 | .. code-block:: bash | |
|
220 | ||
|
221 | id : <id_given_in_input> | |
|
222 | result : { | |
|
223 | "msg": "Pulled from `<repository name>`" | |
|
224 | "repository": "<repository name>" | |
|
225 | } | |
|
226 | error : null | |
|
227 | ||
|
228 | Example error output: | |
|
229 | ||
|
230 | .. code-block:: bash | |
|
231 | ||
|
232 | id : <id_given_in_input> | |
|
233 | result : null | |
|
234 | error : { | |
|
235 | "Unable to pull changes from `<reponame>`" | |
|
236 | } | |
|
237 | ||
|
238 | ||
|
239 | strip | |
|
240 | ----- | |
|
241 | ||
|
242 | .. py:function:: strip(apiuser, repoid, revision, branch) | |
|
243 | ||
|
244 | Strips the given revision from the specified repository. | |
|
245 | ||
|
246 | * This will remove the revision and all of its decendants. | |
|
247 | ||
|
248 | This command can only be run using an |authtoken| with admin rights to | |
|
249 | the specified repository. | |
|
250 | ||
|
251 | This command takes the following options: | |
|
252 | ||
|
253 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
254 | :type apiuser: AuthUser | |
|
255 | :param repoid: The repository name or repository ID. | |
|
256 | :type repoid: str or int | |
|
257 | :param revision: The revision you wish to strip. | |
|
258 | :type revision: str | |
|
259 | :param branch: The branch from which to strip the revision. | |
|
260 | :type branch: str | |
|
261 | ||
|
262 | Example output: | |
|
263 | ||
|
264 | .. code-block:: bash | |
|
265 | ||
|
266 | id : <id_given_in_input> | |
|
267 | result : { | |
|
268 | "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'" | |
|
269 | "repository": "<repository name>" | |
|
270 | } | |
|
271 | error : null | |
|
272 | ||
|
273 | Example error output: | |
|
274 | ||
|
275 | .. code-block:: bash | |
|
276 | ||
|
277 | id : <id_given_in_input> | |
|
278 | result : null | |
|
279 | error : { | |
|
280 | "Unable to strip commit <commit_hash> from repo `<repository name>`" | |
|
281 | } | |
|
282 | ||
|
283 | ||
|
284 | rescan_repos | |
|
285 | ------------ | |
|
286 | ||
|
287 | .. py:function:: rescan_repos(apiuser, remove_obsolete=<Optional:False>) | |
|
288 | ||
|
289 | Triggers a rescan of the specified repositories. | |
|
290 | ||
|
291 | * If the ``remove_obsolete`` option is set, it also deletes repositories | |
|
292 | that are found in the database but not on the file system, so called | |
|
293 | "clean zombies". | |
|
294 | ||
|
295 | This command can only be run using an |authtoken| with admin rights to | |
|
296 | the specified repository. | |
|
297 | ||
|
298 | This command takes the following options: | |
|
299 | ||
|
300 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
301 | :type apiuser: AuthUser | |
|
302 | :param remove_obsolete: Deletes repositories from the database that | |
|
303 | are not found on the filesystem. | |
|
304 | :type remove_obsolete: Optional(``True`` | ``False``) | |
|
305 | ||
|
306 | Example output: | |
|
307 | ||
|
308 | .. code-block:: bash | |
|
309 | ||
|
310 | id : <id_given_in_input> | |
|
311 | result : { | |
|
312 | 'added': [<added repository name>,...] | |
|
313 | 'removed': [<removed repository name>,...] | |
|
314 | } | |
|
315 | error : null | |
|
316 | ||
|
317 | Example error output: | |
|
318 | ||
|
319 | .. code-block:: bash | |
|
320 | ||
|
321 | id : <id_given_in_input> | |
|
322 | result : null | |
|
323 | error : { | |
|
324 | 'Error occurred during rescan repositories action' | |
|
325 | } | |
|
326 | ||
|
327 | ||
|
328 | invalidate_cache | |
|
329 | ---------------- | |
|
330 | ||
|
331 | .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>) | |
|
332 | ||
|
333 | Invalidates the cache for the specified repository. | |
|
334 | ||
|
335 | This command can only be run using an |authtoken| with admin rights to | |
|
336 | the specified repository. | |
|
337 | ||
|
338 | This command takes the following options: | |
|
339 | ||
|
340 | :param apiuser: This is filled automatically from |authtoken|. | |
|
341 | :type apiuser: AuthUser | |
|
342 | :param repoid: Sets the repository name or repository ID. | |
|
343 | :type repoid: str or int | |
|
344 | :param delete_keys: This deletes the invalidated keys instead of | |
|
345 | just flagging them. | |
|
346 | :type delete_keys: Optional(``True`` | ``False``) | |
|
347 | ||
|
348 | Example output: | |
|
349 | ||
|
350 | .. code-block:: bash | |
|
351 | ||
|
352 | id : <id_given_in_input> | |
|
353 | result : { | |
|
354 | 'msg': Cache for repository `<repository name>` was invalidated, | |
|
355 | 'repository': <repository name> | |
|
356 | } | |
|
357 | error : null | |
|
358 | ||
|
359 | Example error output: | |
|
360 | ||
|
361 | .. code-block:: bash | |
|
362 | ||
|
363 | id : <id_given_in_input> | |
|
364 | result : null | |
|
365 | error : { | |
|
366 | 'Error occurred during cache invalidation action' | |
|
367 | } | |
|
368 | ||
|
369 | ||
|
370 | lock | |
|
371 | ---- | |
|
372 | ||
|
373 | .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
374 | ||
|
375 | Sets the lock state of the specified |repo| by the given user. | |
|
376 | From more information, see :ref:`repo-locking`. | |
|
377 | ||
|
378 | * If the ``userid`` option is not set, the repository is locked to the | |
|
379 | user who called the method. | |
|
380 | * If the ``locked`` parameter is not set, the current lock state of the | |
|
381 | repository is displayed. | |
|
382 | ||
|
383 | This command can only be run using an |authtoken| with admin rights to | |
|
384 | the specified repository. | |
|
385 | ||
|
386 | This command takes the following options: | |
|
387 | ||
|
388 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
389 | :type apiuser: AuthUser | |
|
390 | :param repoid: Sets the repository name or repository ID. | |
|
391 | :type repoid: str or int | |
|
392 | :param locked: Sets the lock state. | |
|
393 | :type locked: Optional(``True`` | ``False``) | |
|
394 | :param userid: Set the repository lock to this user. | |
|
395 | :type userid: Optional(str or int) | |
|
396 | ||
|
397 | Example error output: | |
|
398 | ||
|
399 | .. code-block:: bash | |
|
400 | ||
|
401 | id : <id_given_in_input> | |
|
402 | result : { | |
|
403 | 'repo': '<reponame>', | |
|
404 | 'locked': <bool: lock state>, | |
|
405 | 'locked_since': <int: lock timestamp>, | |
|
406 | 'locked_by': <username of person who made the lock>, | |
|
407 | 'lock_reason': <str: reason for locking>, | |
|
408 | 'lock_state_changed': <bool: True if lock state has been changed in this request>, | |
|
409 | 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.' | |
|
410 | or | |
|
411 | 'msg': 'Repo `<repository name>` not locked.' | |
|
412 | or | |
|
413 | 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`' | |
|
414 | } | |
|
415 | error : null | |
|
416 | ||
|
417 | Example error output: | |
|
418 | ||
|
419 | .. code-block:: bash | |
|
420 | ||
|
421 | id : <id_given_in_input> | |
|
422 | result : null | |
|
423 | error : { | |
|
424 | 'Error occurred locking repository `<reponame>` | |
|
425 | } | |
|
426 | ||
|
427 | ||
|
428 | get_locks | |
|
429 | --------- | |
|
430 | ||
|
431 | .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
432 | ||
|
433 | Displays all repositories locked by the specified user. | |
|
434 | ||
|
435 | * If this command is run by a non-admin user, it returns | |
|
436 | a list of |repos| locked by that user. | |
|
437 | ||
|
438 | This command takes the following options: | |
|
439 | ||
|
440 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
441 | :type apiuser: AuthUser | |
|
442 | :param userid: Sets the userid whose list of locked |repos| will be | |
|
443 | displayed. | |
|
444 | :type userid: Optional(str or int) | |
|
445 | ||
|
446 | Example output: | |
|
447 | ||
|
448 | .. code-block:: bash | |
|
449 | ||
|
450 | id : <id_given_in_input> | |
|
451 | result : { | |
|
452 | [repo_object, repo_object,...] | |
|
453 | } | |
|
454 | error : null | |
|
455 | ||
|
456 | ||
|
457 | get_ip | |
|
458 | ------ | |
|
459 | ||
|
460 | .. py:function:: get_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
461 | ||
|
462 | Displays the IP Address as seen from the |RCE| server. | |
|
463 | ||
|
464 | * This command displays the IP Address, as well as all the defined IP | |
|
465 | addresses for the specified user. If the ``userid`` is not set, the | |
|
466 | data returned is for the user calling the method. | |
|
467 | ||
|
468 | This command can only be run using an |authtoken| with admin rights to | |
|
469 | the specified repository. | |
|
470 | ||
|
471 | This command takes the following options: | |
|
472 | ||
|
473 | :param apiuser: This is filled automatically from |authtoken|. | |
|
474 | :type apiuser: AuthUser | |
|
475 | :param userid: Sets the userid for which associated IP Address data | |
|
476 | is returned. | |
|
477 | :type userid: Optional(str or int) | |
|
478 | ||
|
479 | Example output: | |
|
480 | ||
|
481 | .. code-block:: bash | |
|
482 | ||
|
483 | id : <id_given_in_input> | |
|
484 | result : { | |
|
485 | "server_ip_addr": "<ip_from_clien>", | |
|
486 | "user_ips": [ | |
|
487 | { | |
|
488 | "ip_addr": "<ip_with_mask>", | |
|
489 | "ip_range": ["<start_ip>", "<end_ip>"], | |
|
490 | }, | |
|
491 | ... | |
|
492 | ] | |
|
493 | } | |
|
494 | ||
|
495 | ||
|
496 | show_ip | |
|
497 | ------- | |
|
498 | ||
|
499 | .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
500 | ||
|
501 | Displays the IP Address as seen from the |RCE| server. | |
|
502 | ||
|
503 | * This command displays the IP Address, as well as all the defined IP | |
|
504 | addresses for the specified user. If the ``userid`` is not set, the | |
|
505 | data returned is for the user calling the method. | |
|
506 | ||
|
507 | This command can only be run using an |authtoken| with admin rights to | |
|
508 | the specified repository. | |
|
509 | ||
|
510 | This command takes the following options: | |
|
511 | ||
|
512 | :param apiuser: This is filled automatically from |authtoken|. | |
|
513 | :type apiuser: AuthUser | |
|
514 | :param userid: Sets the userid for which associated IP Address data | |
|
515 | is returned. | |
|
516 | :type userid: Optional(str or int) | |
|
517 | ||
|
518 | Example output: | |
|
519 | ||
|
520 | .. code-block:: bash | |
|
521 | ||
|
522 | id : <id_given_in_input> | |
|
523 | result : { | |
|
524 | "server_ip_addr": "<ip_from_clien>", | |
|
525 | "user_ips": [ | |
|
526 | { | |
|
527 | "ip_addr": "<ip_with_mask>", | |
|
528 | "ip_range": ["<start_ip>", "<end_ip>"], | |
|
529 | }, | |
|
530 | ... | |
|
531 | ] | |
|
532 | } | |
|
533 | ||
|
534 | ||
|
535 | get_license_info | |
|
536 | ---------------- | |
|
537 | ||
|
538 | .. py:function:: get_license_info(apiuser) | |
|
539 | ||
|
540 | Returns the |RCE| license information. | |
|
541 | ||
|
542 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
543 | :type apiuser: AuthUser | |
|
544 | ||
|
545 | Example output: | |
|
546 | ||
|
547 | .. code-block:: bash | |
|
548 | ||
|
549 | id : <id_given_in_input> | |
|
550 | result : { | |
|
551 | 'rhodecode_version': <rhodecode version>, | |
|
552 | 'token': <license token>, | |
|
553 | 'issued_to': <license owner>, | |
|
554 | 'issued_on': <license issue date>, | |
|
555 | 'expires_on': <license expiration date>, | |
|
556 | 'type': <license type>, | |
|
557 | 'users_limit': <license users limit>, | |
|
558 | 'key': <license key> | |
|
559 | } | |
|
560 | error : null | |
|
561 | ||
|
562 | ||
|
563 | set_license_key | |
|
564 | --------------- | |
|
565 | ||
|
566 | .. py:function:: set_license_key(apiuser, key) | |
|
567 | ||
|
568 | Sets the |RCE| license key. | |
|
569 | ||
|
570 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
571 | :type apiuser: AuthUser | |
|
572 | :param key: This is the license key to be set. | |
|
573 | :type key: str | |
|
574 | ||
|
575 | Example output: | |
|
576 | ||
|
577 | .. code-block:: bash | |
|
578 | ||
|
579 | id : <id_given_in_input> | |
|
580 | result: { | |
|
581 | "msg" : "updated license information", | |
|
582 | "key": <key> | |
|
583 | } | |
|
584 | error: null | |
|
585 | ||
|
586 | Example error output: | |
|
587 | ||
|
588 | .. code-block:: bash | |
|
589 | ||
|
590 | id : <id_given_in_input> | |
|
591 | result : null | |
|
592 | error : { | |
|
593 | "license key is not valid" | |
|
594 | or | |
|
595 | "trial licenses cannot be uploaded" | |
|
596 | or | |
|
597 | "error occurred while updating license" | |
|
598 | } | |
|
599 | ||
|
600 | ||
|
601 | get_server_info | |
|
602 | --------------- | |
|
603 | ||
|
604 | .. py:function:: get_server_info(apiuser) | |
|
605 | ||
|
606 | Returns the |RCE| server information. | |
|
607 | ||
|
608 | This includes the running version of |RCE| and all installed | |
|
609 | packages. This command takes the following options: | |
|
610 | ||
|
611 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
612 | :type apiuser: AuthUser | |
|
613 | ||
|
614 | Example output: | |
|
615 | ||
|
616 | .. code-block:: bash | |
|
617 | ||
|
618 | id : <id_given_in_input> | |
|
619 | result : { | |
|
620 | 'modules': [<module name>,...] | |
|
621 | 'py_version': <python version>, | |
|
622 | 'platform': <platform type>, | |
|
623 | 'rhodecode_version': <rhodecode version> | |
|
624 | } | |
|
625 | error : null | |
|
626 | ||
|
627 | ||
|
628 | get_user | |
|
629 | -------- | |
|
630 | ||
|
631 | .. py:function:: get_user(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
632 | ||
|
633 | Returns the information associated with a username or userid. | |
|
634 | ||
|
635 | * If the ``userid`` is not set, this command returns the information | |
|
636 | for the ``userid`` calling the method. | |
|
637 | ||
|
638 | .. note:: | |
|
639 | ||
|
640 | Normal users may only run this command against their ``userid``. For | |
|
641 | full privileges you must run this command using an |authtoken| with | |
|
642 | admin rights. | |
|
643 | ||
|
644 | This command takes the following options: | |
|
645 | ||
|
646 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
647 | :type apiuser: AuthUser | |
|
648 | :param userid: Sets the userid for which data will be returned. | |
|
649 | :type userid: Optional(str or int) | |
|
650 | ||
|
651 | Example output: | |
|
652 | ||
|
653 | .. code-block:: bash | |
|
654 | ||
|
655 | { | |
|
656 | "error": null, | |
|
657 | "id": <id>, | |
|
658 | "result": { | |
|
659 | "active": true, | |
|
660 | "admin": false, | |
|
661 | "api_key": "api-key", | |
|
662 | "api_keys": [ list of keys ], | |
|
663 | "email": "user@example.com", | |
|
664 | "emails": [ | |
|
665 | "user@example.com" | |
|
666 | ], | |
|
667 | "extern_name": "rhodecode", | |
|
668 | "extern_type": "rhodecode", | |
|
669 | "firstname": "username", | |
|
670 | "ip_addresses": [], | |
|
671 | "language": null, | |
|
672 | "last_login": "Timestamp", | |
|
673 | "lastname": "surnae", | |
|
674 | "permissions": { | |
|
675 | "global": [ | |
|
676 | "hg.inherit_default_perms.true", | |
|
677 | "usergroup.read", | |
|
678 | "hg.repogroup.create.false", | |
|
679 | "hg.create.none", | |
|
680 | "hg.extern_activate.manual", | |
|
681 | "hg.create.write_on_repogroup.false", | |
|
682 | "hg.usergroup.create.false", | |
|
683 | "group.none", | |
|
684 | "repository.none", | |
|
685 | "hg.register.none", | |
|
686 | "hg.fork.repository" | |
|
687 | ], | |
|
688 | "repositories": { "username/example": "repository.write"}, | |
|
689 | "repositories_groups": { "user-group/repo": "group.none" }, | |
|
690 | "user_groups": { "user_group_name": "usergroup.read" } | |
|
691 | }, | |
|
692 | "user_id": 32, | |
|
693 | "username": "username" | |
|
694 | } | |
|
695 | } | |
|
696 | ||
|
697 | ||
|
698 | get_users | |
|
699 | --------- | |
|
700 | ||
|
701 | .. py:function:: get_users(apiuser) | |
|
702 | ||
|
703 | Lists all users in the |RCE| user database. | |
|
704 | ||
|
705 | This command can only be run using an |authtoken| with admin rights to | |
|
706 | the specified repository. | |
|
707 | ||
|
708 | This command takes the following options: | |
|
709 | ||
|
710 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
711 | :type apiuser: AuthUser | |
|
712 | ||
|
713 | Example output: | |
|
714 | ||
|
715 | .. code-block:: bash | |
|
716 | ||
|
717 | id : <id_given_in_input> | |
|
718 | result: [<user_object>, ...] | |
|
719 | error: null | |
|
720 | ||
|
721 | ||
|
722 | create_user | |
|
723 | ----------- | |
|
724 | ||
|
725 | .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>) | |
|
726 | ||
|
727 | Creates a new user and returns the new user object. | |
|
728 | ||
|
729 | This command can only be run using an |authtoken| with admin rights to | |
|
730 | the specified repository. | |
|
731 | ||
|
732 | This command takes the following options: | |
|
733 | ||
|
734 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
735 | :type apiuser: AuthUser | |
|
736 | :param username: Set the new username. | |
|
737 | :type username: str or int | |
|
738 | :param email: Set the user email address. | |
|
739 | :type email: str | |
|
740 | :param password: Set the new user password. | |
|
741 | :type password: Optional(str) | |
|
742 | :param firstname: Set the new user firstname. | |
|
743 | :type firstname: Optional(str) | |
|
744 | :param lastname: Set the new user surname. | |
|
745 | :type lastname: Optional(str) | |
|
746 | :param active: Set the user as active. | |
|
747 | :type active: Optional(``True`` | ``False``) | |
|
748 | :param admin: Give the new user admin rights. | |
|
749 | :type admin: Optional(``True`` | ``False``) | |
|
750 | :param extern_name: Set the authentication plugin name. | |
|
751 | Using LDAP this is filled with LDAP UID. | |
|
752 | :type extern_name: Optional(str) | |
|
753 | :param extern_type: Set the new user authentication plugin. | |
|
754 | :type extern_type: Optional(str) | |
|
755 | :param force_password_change: Force the new user to change password | |
|
756 | on next login. | |
|
757 | :type force_password_change: Optional(``True`` | ``False``) | |
|
758 | ||
|
759 | Example output: | |
|
760 | ||
|
761 | .. code-block:: bash | |
|
762 | ||
|
763 | id : <id_given_in_input> | |
|
764 | result: { | |
|
765 | "msg" : "created new user `<username>`", | |
|
766 | "user": <user_obj> | |
|
767 | } | |
|
768 | error: null | |
|
769 | ||
|
770 | Example error output: | |
|
771 | ||
|
772 | .. code-block:: bash | |
|
773 | ||
|
774 | id : <id_given_in_input> | |
|
775 | result : null | |
|
776 | error : { | |
|
777 | "user `<username>` already exist" | |
|
778 | or | |
|
779 | "email `<email>` already exist" | |
|
780 | or | |
|
781 | "failed to create user `<username>`" | |
|
782 | } | |
|
783 | ||
|
784 | ||
|
785 | update_user | |
|
786 | ----------- | |
|
787 | ||
|
788 | .. py:function:: update_user(apiuser, userid, username=<Optional:None>, email=<Optional:None>, password=<Optional:None>, firstname=<Optional:None>, lastname=<Optional:None>, active=<Optional:None>, admin=<Optional:None>, extern_type=<Optional:None>, extern_name=<Optional:None>) | |
|
789 | ||
|
790 | Updates the details for the specified user, if that user exists. | |
|
791 | ||
|
792 | This command can only be run using an |authtoken| with admin rights to | |
|
793 | the specified repository. | |
|
794 | ||
|
795 | This command takes the following options: | |
|
796 | ||
|
797 | :param apiuser: This is filled automatically from |authtoken|. | |
|
798 | :type apiuser: AuthUser | |
|
799 | :param userid: Set the ``userid`` to update. | |
|
800 | :type userid: str or int | |
|
801 | :param username: Set the new username. | |
|
802 | :type username: str or int | |
|
803 | :param email: Set the new email. | |
|
804 | :type email: str | |
|
805 | :param password: Set the new password. | |
|
806 | :type password: Optional(str) | |
|
807 | :param firstname: Set the new first name. | |
|
808 | :type firstname: Optional(str) | |
|
809 | :param lastname: Set the new surname. | |
|
810 | :type lastname: Optional(str) | |
|
811 | :param active: Set the new user as active. | |
|
812 | :type active: Optional(``True`` | ``False``) | |
|
813 | :param admin: Give the user admin rights. | |
|
814 | :type admin: Optional(``True`` | ``False``) | |
|
815 | :param extern_name: Set the authentication plugin user name. | |
|
816 | Using LDAP this is filled with LDAP UID. | |
|
817 | :type extern_name: Optional(str) | |
|
818 | :param extern_type: Set the authentication plugin type. | |
|
819 | :type extern_type: Optional(str) | |
|
820 | ||
|
821 | ||
|
822 | Example output: | |
|
823 | ||
|
824 | .. code-block:: bash | |
|
825 | ||
|
826 | id : <id_given_in_input> | |
|
827 | result: { | |
|
828 | "msg" : "updated user ID:<userid> <username>", | |
|
829 | "user": <user_object>, | |
|
830 | } | |
|
831 | error: null | |
|
832 | ||
|
833 | Example error output: | |
|
834 | ||
|
835 | .. code-block:: bash | |
|
836 | ||
|
837 | id : <id_given_in_input> | |
|
838 | result : null | |
|
839 | error : { | |
|
840 | "failed to update user `<username>`" | |
|
841 | } | |
|
842 | ||
|
843 | ||
|
844 | delete_user | |
|
845 | ----------- | |
|
846 | ||
|
847 | .. py:function:: delete_user(apiuser, userid) | |
|
848 | ||
|
849 | Deletes the specified user from the |RCE| user database. | |
|
850 | ||
|
851 | This command can only be run using an |authtoken| with admin rights to | |
|
852 | the specified repository. | |
|
853 | ||
|
854 | .. important:: | |
|
855 | ||
|
856 | Ensure all open pull requests and open code review | |
|
857 | requests to this user are close. | |
|
858 | ||
|
859 | Also ensure all repositories, or repository groups owned by this | |
|
860 | user are reassigned before deletion. | |
|
861 | ||
|
862 | This command takes the following options: | |
|
863 | ||
|
864 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
865 | :type apiuser: AuthUser | |
|
866 | :param userid: Set the user to delete. | |
|
867 | :type userid: str or int | |
|
868 | ||
|
869 | Example output: | |
|
870 | ||
|
871 | .. code-block:: bash | |
|
872 | ||
|
873 | id : <id_given_in_input> | |
|
874 | result: { | |
|
875 | "msg" : "deleted user ID:<userid> <username>", | |
|
876 | "user": null | |
|
877 | } | |
|
878 | error: null | |
|
879 | ||
|
880 | Example error output: | |
|
881 | ||
|
882 | .. code-block:: bash | |
|
883 | ||
|
884 | id : <id_given_in_input> | |
|
885 | result : null | |
|
886 | error : { | |
|
887 | "failed to delete user ID:<userid> <username>" | |
|
888 | } | |
|
889 | ||
|
890 | ||
|
891 | get_user_group | |
|
892 | -------------- | |
|
893 | ||
|
894 | .. py:function:: get_user_group(apiuser, usergroupid) | |
|
895 | ||
|
896 | Returns the data of an existing user group. | |
|
897 | ||
|
898 | This command can only be run using an |authtoken| with admin rights to | |
|
899 | the specified repository. | |
|
900 | ||
|
901 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
902 | :type apiuser: AuthUser | |
|
903 | :param usergroupid: Set the user group from which to return data. | |
|
904 | :type usergroupid: str or int | |
|
905 | ||
|
906 | Example error output: | |
|
907 | ||
|
908 | .. code-block:: bash | |
|
909 | ||
|
910 | { | |
|
911 | "error": null, | |
|
912 | "id": <id>, | |
|
913 | "result": { | |
|
914 | "active": true, | |
|
915 | "group_description": "group description", | |
|
916 | "group_name": "group name", | |
|
917 | "members": [ | |
|
918 | { | |
|
919 | "name": "owner-name", | |
|
920 | "origin": "owner", | |
|
921 | "permission": "usergroup.admin", | |
|
922 | "type": "user" | |
|
923 | }, | |
|
924 | { | |
|
925 | { | |
|
926 | "name": "user name", | |
|
927 | "origin": "permission", | |
|
928 | "permission": "usergroup.admin", | |
|
929 | "type": "user" | |
|
930 | }, | |
|
931 | { | |
|
932 | "name": "user group name", | |
|
933 | "origin": "permission", | |
|
934 | "permission": "usergroup.write", | |
|
935 | "type": "user_group" | |
|
936 | } | |
|
937 | ], | |
|
938 | "owner": "owner name", | |
|
939 | "users": [], | |
|
940 | "users_group_id": 2 | |
|
941 | } | |
|
942 | } | |
|
943 | ||
|
944 | ||
|
945 | get_user_groups | |
|
946 | --------------- | |
|
947 | ||
|
948 | .. py:function:: get_user_groups(apiuser) | |
|
949 | ||
|
950 | Lists all the existing user groups within RhodeCode. | |
|
951 | ||
|
952 | This command can only be run using an |authtoken| with admin rights to | |
|
953 | the specified repository. | |
|
954 | ||
|
955 | This command takes the following options: | |
|
956 | ||
|
957 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
958 | :type apiuser: AuthUser | |
|
959 | ||
|
960 | Example error output: | |
|
961 | ||
|
962 | .. code-block:: bash | |
|
963 | ||
|
964 | id : <id_given_in_input> | |
|
965 | result : [<user_group_obj>,...] | |
|
966 | error : null | |
|
967 | ||
|
968 | ||
|
969 | create_user_group | |
|
970 | ----------------- | |
|
971 | ||
|
972 | .. py:function:: create_user_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, active=<Optional:True>) | |
|
973 | ||
|
974 | Creates a new user group. | |
|
975 | ||
|
976 | This command can only be run using an |authtoken| with admin rights to | |
|
977 | the specified repository. | |
|
978 | ||
|
979 | This command takes the following options: | |
|
980 | ||
|
981 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
982 | :type apiuser: AuthUser | |
|
983 | :param group_name: Set the name of the new user group. | |
|
984 | :type group_name: str | |
|
985 | :param description: Give a description of the new user group. | |
|
986 | :type description: str | |
|
987 | :param owner: Set the owner of the new user group. | |
|
988 | If not set, the owner is the |authtoken| user. | |
|
989 | :type owner: Optional(str or int) | |
|
990 | :param active: Set this group as active. | |
|
991 | :type active: Optional(``True`` | ``False``) | |
|
992 | ||
|
993 | Example output: | |
|
994 | ||
|
995 | .. code-block:: bash | |
|
996 | ||
|
997 | id : <id_given_in_input> | |
|
998 | result: { | |
|
999 | "msg": "created new user group `<groupname>`", | |
|
1000 | "user_group": <user_group_object> | |
|
1001 | } | |
|
1002 | error: null | |
|
1003 | ||
|
1004 | Example error output: | |
|
1005 | ||
|
1006 | .. code-block:: bash | |
|
1007 | ||
|
1008 | id : <id_given_in_input> | |
|
1009 | result : null | |
|
1010 | error : { | |
|
1011 | "user group `<group name>` already exist" | |
|
1012 | or | |
|
1013 | "failed to create group `<group name>`" | |
|
1014 | } | |
|
1015 | ||
|
1016 | ||
|
1017 | update_user_group | |
|
1018 | ----------------- | |
|
1019 | ||
|
1020 | .. py:function:: update_user_group(apiuser, usergroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:None>, active=<Optional:True>) | |
|
1021 | ||
|
1022 | Updates the specified `user group` with the details provided. | |
|
1023 | ||
|
1024 | This command can only be run using an |authtoken| with admin rights to | |
|
1025 | the specified repository. | |
|
1026 | ||
|
1027 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1028 | :type apiuser: AuthUser | |
|
1029 | :param usergroupid: Set the id of the `user group` to update. | |
|
1030 | :type usergroupid: str or int | |
|
1031 | :param group_name: Set the new name the `user group` | |
|
1032 | :type group_name: str | |
|
1033 | :param description: Give a description for the `user group` | |
|
1034 | :type description: str | |
|
1035 | :param owner: Set the owner of the `user group`. | |
|
1036 | :type owner: Optional(str or int) | |
|
1037 | :param active: Set the group as active. | |
|
1038 | :type active: Optional(``True`` | ``False``) | |
|
1039 | ||
|
1040 | Example output: | |
|
1041 | ||
|
1042 | .. code-block:: bash | |
|
1043 | ||
|
1044 | id : <id_given_in_input> | |
|
1045 | result : { | |
|
1046 | "msg": 'updated user group ID:<user group id> <user group name>', | |
|
1047 | "user_group": <user_group_object> | |
|
1048 | } | |
|
1049 | error : null | |
|
1050 | ||
|
1051 | Example error output: | |
|
1052 | ||
|
1053 | .. code-block:: bash | |
|
1054 | ||
|
1055 | id : <id_given_in_input> | |
|
1056 | result : null | |
|
1057 | error : { | |
|
1058 | "failed to update user group `<user group name>`" | |
|
1059 | } | |
|
1060 | ||
|
1061 | ||
|
1062 | delete_user_group | |
|
1063 | ----------------- | |
|
1064 | ||
|
1065 | .. py:function:: delete_user_group(apiuser, usergroupid) | |
|
1066 | ||
|
1067 | Deletes the specified `user group`. | |
|
1068 | ||
|
1069 | This command can only be run using an |authtoken| with admin rights to | |
|
1070 | the specified repository. | |
|
1071 | ||
|
1072 | This command takes the following options: | |
|
1073 | ||
|
1074 | :param apiuser: filled automatically from apikey | |
|
1075 | :type apiuser: AuthUser | |
|
1076 | :param usergroupid: | |
|
1077 | :type usergroupid: int | |
|
1078 | ||
|
1079 | Example output: | |
|
1080 | ||
|
1081 | .. code-block:: bash | |
|
1082 | ||
|
1083 | id : <id_given_in_input> | |
|
1084 | result : { | |
|
1085 | "msg": "deleted user group ID:<user_group_id> <user_group_name>" | |
|
1086 | } | |
|
1087 | error : null | |
|
1088 | ||
|
1089 | Example error output: | |
|
1090 | ||
|
1091 | .. code-block:: bash | |
|
1092 | ||
|
1093 | id : <id_given_in_input> | |
|
1094 | result : null | |
|
1095 | error : { | |
|
1096 | "failed to delete user group ID:<user_group_id> <user_group_name>" | |
|
1097 | or | |
|
1098 | "RepoGroup assigned to <repo_groups_list>" | |
|
1099 | } | |
|
1100 | ||
|
1101 | ||
|
1102 | add_user_to_user_group | |
|
1103 | ---------------------- | |
|
1104 | ||
|
1105 | .. py:function:: add_user_to_user_group(apiuser, usergroupid, userid) | |
|
1106 | ||
|
1107 | Adds a user to a `user group`. If the user already exists in the group | |
|
1108 | this command will return false. | |
|
1109 | ||
|
1110 | This command can only be run using an |authtoken| with admin rights to | |
|
1111 | the specified user group. | |
|
1112 | ||
|
1113 | This command takes the following options: | |
|
1114 | ||
|
1115 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1116 | :type apiuser: AuthUser | |
|
1117 | :param usergroupid: Set the name of the `user group` to which a | |
|
1118 | user will be added. | |
|
1119 | :type usergroupid: int | |
|
1120 | :param userid: Set the `user_id` of the user to add to the group. | |
|
1121 | :type userid: int | |
|
1122 | ||
|
1123 | Example output: | |
|
1124 | ||
|
1125 | .. code-block:: bash | |
|
1126 | ||
|
1127 | id : <id_given_in_input> | |
|
1128 | result : { | |
|
1129 | "success": True|False # depends on if member is in group | |
|
1130 | "msg": "added member `<username>` to user group `<groupname>` | | |
|
1131 | User is already in that group" | |
|
1132 | ||
|
1133 | } | |
|
1134 | error : null | |
|
1135 | ||
|
1136 | Example error output: | |
|
1137 | ||
|
1138 | .. code-block:: bash | |
|
1139 | ||
|
1140 | id : <id_given_in_input> | |
|
1141 | result : null | |
|
1142 | error : { | |
|
1143 | "failed to add member to user group `<user_group_name>`" | |
|
1144 | } | |
|
1145 | ||
|
1146 | ||
|
1147 | remove_user_from_user_group | |
|
1148 | --------------------------- | |
|
1149 | ||
|
1150 | .. py:function:: remove_user_from_user_group(apiuser, usergroupid, userid) | |
|
1151 | ||
|
1152 | Removes a user from a user group. | |
|
1153 | ||
|
1154 | * If the specified user is not in the group, this command will return | |
|
1155 | `false`. | |
|
1156 | ||
|
1157 | This command can only be run using an |authtoken| with admin rights to | |
|
1158 | the specified user group. | |
|
1159 | ||
|
1160 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1161 | :type apiuser: AuthUser | |
|
1162 | :param usergroupid: Sets the user group name. | |
|
1163 | :type usergroupid: str or int | |
|
1164 | :param userid: The user you wish to remove from |RCE|. | |
|
1165 | :type userid: str or int | |
|
1166 | ||
|
1167 | Example output: | |
|
1168 | ||
|
1169 | .. code-block:: bash | |
|
1170 | ||
|
1171 | id : <id_given_in_input> | |
|
1172 | result: { | |
|
1173 | "success": True|False, # depends on if member is in group | |
|
1174 | "msg": "removed member <username> from user group <groupname> | | |
|
1175 | User wasn't in group" | |
|
1176 | } | |
|
1177 | error: null | |
|
1178 | ||
|
1179 | ||
|
1180 | grant_user_permission_to_user_group | |
|
1181 | ----------------------------------- | |
|
1182 | ||
|
1183 | .. py:function:: grant_user_permission_to_user_group(apiuser, usergroupid, userid, perm) | |
|
1184 | ||
|
1185 | Set permissions for a user in a user group. | |
|
1186 | ||
|
1187 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1188 | :type apiuser: AuthUser | |
|
1189 | :param usergroupid: Set the user group to edit permissions on. | |
|
1190 | :type usergroupid: str or int | |
|
1191 | :param userid: Set the user from whom you wish to set permissions. | |
|
1192 | :type userid: str | |
|
1193 | :param perm: (usergroup.(none|read|write|admin)) | |
|
1194 | :type perm: str | |
|
1195 | ||
|
1196 | Example output: | |
|
1197 | ||
|
1198 | .. code-block:: bash | |
|
1199 | ||
|
1200 | id : <id_given_in_input> | |
|
1201 | result : { | |
|
1202 | "msg": "Granted perm: `<perm_name>` for user: `<username>` in user group: `<user_group_name>`", | |
|
1203 | "success": true | |
|
1204 | } | |
|
1205 | error : null | |
|
1206 | ||
|
1207 | ||
|
1208 | revoke_user_permission_from_user_group | |
|
1209 | -------------------------------------- | |
|
1210 | ||
|
1211 | .. py:function:: revoke_user_permission_from_user_group(apiuser, usergroupid, userid) | |
|
1212 | ||
|
1213 | Revoke a users permissions in a user group. | |
|
1214 | ||
|
1215 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1216 | :type apiuser: AuthUser | |
|
1217 | :param usergroupid: Set the user group from which to revoke the user | |
|
1218 | permissions. | |
|
1219 | :type: usergroupid: str or int | |
|
1220 | :param userid: Set the userid of the user whose permissions will be | |
|
1221 | revoked. | |
|
1222 | :type userid: str | |
|
1223 | ||
|
1224 | Example output: | |
|
1225 | ||
|
1226 | .. code-block:: bash | |
|
1227 | ||
|
1228 | id : <id_given_in_input> | |
|
1229 | result : { | |
|
1230 | "msg": "Revoked perm for user: `<username>` in user group: `<user_group_name>`", | |
|
1231 | "success": true | |
|
1232 | } | |
|
1233 | error : null | |
|
1234 | ||
|
1235 | ||
|
1236 | grant_user_group_permission_to_user_group | |
|
1237 | ----------------------------------------- | |
|
1238 | ||
|
1239 | .. py:function:: grant_user_group_permission_to_user_group(apiuser, usergroupid, sourceusergroupid, perm) | |
|
1240 | ||
|
1241 | Give one user group permissions to another user group. | |
|
1242 | ||
|
1243 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1244 | :type apiuser: AuthUser | |
|
1245 | :param usergroupid: Set the user group on which to edit permissions. | |
|
1246 | :type usergroupid: str or int | |
|
1247 | :param sourceusergroupid: Set the source user group to which | |
|
1248 | access/permissions will be granted. | |
|
1249 | :type sourceusergroupid: str or int | |
|
1250 | :param perm: (usergroup.(none|read|write|admin)) | |
|
1251 | :type perm: str | |
|
1252 | ||
|
1253 | Example output: | |
|
1254 | ||
|
1255 | .. code-block:: bash | |
|
1256 | ||
|
1257 | id : <id_given_in_input> | |
|
1258 | result : { | |
|
1259 | "msg": "Granted perm: `<perm_name>` for user group: `<source_user_group_name>` in user group: `<user_group_name>`", | |
|
1260 | "success": true | |
|
1261 | } | |
|
1262 | error : null | |
|
1263 | ||
|
1264 | ||
|
1265 | revoke_user_group_permission_from_user_group | |
|
1266 | -------------------------------------------- | |
|
1267 | ||
|
1268 | .. py:function:: revoke_user_group_permission_from_user_group(apiuser, usergroupid, sourceusergroupid) | |
|
1269 | ||
|
1270 | Revoke the permissions that one user group has to another. | |
|
1271 | ||
|
1272 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1273 | :type apiuser: AuthUser | |
|
1274 | :param usergroupid: Set the user group on which to edit permissions. | |
|
1275 | :type usergroupid: str or int | |
|
1276 | :param sourceusergroupid: Set the user group from which permissions | |
|
1277 | are revoked. | |
|
1278 | :type sourceusergroupid: str or int | |
|
1279 | ||
|
1280 | Example output: | |
|
1281 | ||
|
1282 | .. code-block:: bash | |
|
1283 | ||
|
1284 | id : <id_given_in_input> | |
|
1285 | result : { | |
|
1286 | "msg": "Revoked perm for user group: `<user_group_name>` in user group: `<target_user_group_name>`", | |
|
1287 | "success": true | |
|
1288 | } | |
|
1289 | error : null | |
|
1290 | ||
|
1291 | ||
|
1292 | get_pull_request | |
|
1293 | ---------------- | |
|
1294 | ||
|
1295 | .. py:function:: get_pull_request(apiuser, repoid, pullrequestid) | |
|
1296 | ||
|
1297 | Get a pull request based on the given ID. | |
|
1298 | ||
|
1299 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1300 | :type apiuser: AuthUser | |
|
1301 | :param repoid: Repository name or repository ID from where the pull | |
|
1302 | request was opened. | |
|
1303 | :type repoid: str or int | |
|
1304 | :param pullrequestid: ID of the requested pull request. | |
|
1305 | :type pullrequestid: int | |
|
1306 | ||
|
1307 | Example output: | |
|
1308 | ||
|
1309 | .. code-block:: bash | |
|
1310 | ||
|
1311 | "id": <id_given_in_input>, | |
|
1312 | "result": | |
|
1313 | { | |
|
1314 | "pull_request_id": "<pull_request_id>", | |
|
1315 | "url": "<url>", | |
|
1316 | "title": "<title>", | |
|
1317 | "description": "<description>", | |
|
1318 | "status" : "<status>", | |
|
1319 | "created_on": "<date_time_created>", | |
|
1320 | "updated_on": "<date_time_updated>", | |
|
1321 | "commit_ids": [ | |
|
1322 | ... | |
|
1323 | "<commit_id>", | |
|
1324 | "<commit_id>", | |
|
1325 | ... | |
|
1326 | ], | |
|
1327 | "review_status": "<review_status>", | |
|
1328 | "mergeable": { | |
|
1329 | "status": "<bool>", | |
|
1330 | "message": "<message>", | |
|
1331 | }, | |
|
1332 | "source": { | |
|
1333 | "clone_url": "<clone_url>", | |
|
1334 | "repository": "<repository_name>", | |
|
1335 | "reference": | |
|
1336 | { | |
|
1337 | "name": "<name>", | |
|
1338 | "type": "<type>", | |
|
1339 | "commit_id": "<commit_id>", | |
|
1340 | } | |
|
1341 | }, | |
|
1342 | "target": { | |
|
1343 | "clone_url": "<clone_url>", | |
|
1344 | "repository": "<repository_name>", | |
|
1345 | "reference": | |
|
1346 | { | |
|
1347 | "name": "<name>", | |
|
1348 | "type": "<type>", | |
|
1349 | "commit_id": "<commit_id>", | |
|
1350 | } | |
|
1351 | }, | |
|
1352 | "author": <user_obj>, | |
|
1353 | "reviewers": [ | |
|
1354 | ... | |
|
1355 | { | |
|
1356 | "user": "<user_obj>", | |
|
1357 | "review_status": "<review_status>", | |
|
1358 | } | |
|
1359 | ... | |
|
1360 | ] | |
|
1361 | }, | |
|
1362 | "error": null | |
|
1363 | ||
|
1364 | ||
|
1365 | get_pull_requests | |
|
1366 | ----------------- | |
|
1367 | ||
|
1368 | .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>) | |
|
1369 | ||
|
1370 | Get all pull requests from the repository specified in `repoid`. | |
|
1371 | ||
|
1372 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1373 | :type apiuser: AuthUser | |
|
1374 | :param repoid: Repository name or repository ID. | |
|
1375 | :type repoid: str or int | |
|
1376 | :param status: Only return pull requests with the specified status. | |
|
1377 | Valid options are. | |
|
1378 | * ``new`` (default) | |
|
1379 | * ``open`` | |
|
1380 | * ``closed`` | |
|
1381 | :type status: str | |
|
1382 | ||
|
1383 | Example output: | |
|
1384 | ||
|
1385 | .. code-block:: bash | |
|
1386 | ||
|
1387 | "id": <id_given_in_input>, | |
|
1388 | "result": | |
|
1389 | [ | |
|
1390 | ... | |
|
1391 | { | |
|
1392 | "pull_request_id": "<pull_request_id>", | |
|
1393 | "url": "<url>", | |
|
1394 | "title" : "<title>", | |
|
1395 | "description": "<description>", | |
|
1396 | "status": "<status>", | |
|
1397 | "created_on": "<date_time_created>", | |
|
1398 | "updated_on": "<date_time_updated>", | |
|
1399 | "commit_ids": [ | |
|
1400 | ... | |
|
1401 | "<commit_id>", | |
|
1402 | "<commit_id>", | |
|
1403 | ... | |
|
1404 | ], | |
|
1405 | "review_status": "<review_status>", | |
|
1406 | "mergeable": { | |
|
1407 | "status": "<bool>", | |
|
1408 | "message: "<message>", | |
|
1409 | }, | |
|
1410 | "source": { | |
|
1411 | "clone_url": "<clone_url>", | |
|
1412 | "reference": | |
|
1413 | { | |
|
1414 | "name": "<name>", | |
|
1415 | "type": "<type>", | |
|
1416 | "commit_id": "<commit_id>", | |
|
1417 | } | |
|
1418 | }, | |
|
1419 | "target": { | |
|
1420 | "clone_url": "<clone_url>", | |
|
1421 | "reference": | |
|
1422 | { | |
|
1423 | "name": "<name>", | |
|
1424 | "type": "<type>", | |
|
1425 | "commit_id": "<commit_id>", | |
|
1426 | } | |
|
1427 | }, | |
|
1428 | "author": <user_obj>, | |
|
1429 | "reviewers": [ | |
|
1430 | ... | |
|
1431 | { | |
|
1432 | "user": "<user_obj>", | |
|
1433 | "review_status": "<review_status>", | |
|
1434 | } | |
|
1435 | ... | |
|
1436 | ] | |
|
1437 | } | |
|
1438 | ... | |
|
1439 | ], | |
|
1440 | "error": null | |
|
1441 | ||
|
1442 | ||
|
1443 | merge_pull_request | |
|
1444 | ------------------ | |
|
1445 | ||
|
1446 | .. py:function:: merge_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
1447 | ||
|
1448 | Merge the pull request specified by `pullrequestid` into its target | |
|
1449 | repository. | |
|
1450 | ||
|
1451 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1452 | :type apiuser: AuthUser | |
|
1453 | :param repoid: The Repository name or repository ID of the | |
|
1454 | target repository to which the |pr| is to be merged. | |
|
1455 | :type repoid: str or int | |
|
1456 | :param pullrequestid: ID of the pull request which shall be merged. | |
|
1457 | :type pullrequestid: int | |
|
1458 | :param userid: Merge the pull request as this user. | |
|
1459 | :type userid: Optional(str or int) | |
|
1460 | ||
|
1461 | Example output: | |
|
1462 | ||
|
1463 | .. code-block:: bash | |
|
1464 | ||
|
1465 | "id": <id_given_in_input>, | |
|
1466 | "result": | |
|
1467 | { | |
|
1468 | "executed": "<bool>", | |
|
1469 | "failure_reason": "<int>", | |
|
1470 | "merge_commit_id": "<merge_commit_id>", | |
|
1471 | "possible": "<bool>" | |
|
1472 | }, | |
|
1473 | "error": null | |
|
1474 | ||
|
1475 | ||
|
1476 | close_pull_request | |
|
1477 | ------------------ | |
|
1478 | ||
|
1479 | .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
1480 | ||
|
1481 | Close the pull request specified by `pullrequestid`. | |
|
1482 | ||
|
1483 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1484 | :type apiuser: AuthUser | |
|
1485 | :param repoid: Repository name or repository ID to which the pull | |
|
1486 | request belongs. | |
|
1487 | :type repoid: str or int | |
|
1488 | :param pullrequestid: ID of the pull request to be closed. | |
|
1489 | :type pullrequestid: int | |
|
1490 | :param userid: Close the pull request as this user. | |
|
1491 | :type userid: Optional(str or int) | |
|
1492 | ||
|
1493 | Example output: | |
|
1494 | ||
|
1495 | .. code-block:: bash | |
|
1496 | ||
|
1497 | "id": <id_given_in_input>, | |
|
1498 | "result": | |
|
1499 | { | |
|
1500 | "pull_request_id": "<int>", | |
|
1501 | "closed": "<bool>" | |
|
1502 | }, | |
|
1503 | "error": null | |
|
1504 | ||
|
1505 | ||
|
1506 | comment_pull_request | |
|
1507 | -------------------- | |
|
1508 | ||
|
1509 | .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, status=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
197 | .. toctree:: | |
|
1510 | 198 | |
|
1511 | Comment on the pull request specified with the `pullrequestid`, | |
|
1512 | in the |repo| specified by the `repoid`, and optionally change the | |
|
1513 | review status. | |
|
1514 | ||
|
1515 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1516 | :type apiuser: AuthUser | |
|
1517 | :param repoid: The repository name or repository ID. | |
|
1518 | :type repoid: str or int | |
|
1519 | :param pullrequestid: The pull request ID. | |
|
1520 | :type pullrequestid: int | |
|
1521 | :param message: The text content of the comment. | |
|
1522 | :type message: str | |
|
1523 | :param status: (**Optional**) Set the approval status of the pull | |
|
1524 | request. Valid options are: | |
|
1525 | * not_reviewed | |
|
1526 | * approved | |
|
1527 | * rejected | |
|
1528 | * under_review | |
|
1529 | :type status: str | |
|
1530 | :param userid: Comment on the pull request as this user | |
|
1531 | :type userid: Optional(str or int) | |
|
1532 | ||
|
1533 | Example output: | |
|
1534 | ||
|
1535 | .. code-block:: bash | |
|
1536 | ||
|
1537 | id : <id_given_in_input> | |
|
1538 | result : | |
|
1539 | { | |
|
1540 | "pull_request_id": "<Integer>", | |
|
1541 | "comment_id": "<Integer>" | |
|
1542 | } | |
|
1543 | error : null | |
|
1544 | ||
|
1545 | ||
|
1546 | create_pull_request | |
|
1547 | ------------------- | |
|
1548 | ||
|
1549 | .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, title, description=<Optional:''>, reviewers=<Optional:None>) | |
|
1550 | ||
|
1551 | Creates a new pull request. | |
|
1552 | ||
|
1553 | Accepts refs in the following formats: | |
|
1554 | ||
|
1555 | * branch:<branch_name>:<sha> | |
|
1556 | * branch:<branch_name> | |
|
1557 | * bookmark:<bookmark_name>:<sha> (Mercurial only) | |
|
1558 | * bookmark:<bookmark_name> (Mercurial only) | |
|
1559 | ||
|
1560 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1561 | :type apiuser: AuthUser | |
|
1562 | :param source_repo: Set the source repository name. | |
|
1563 | :type source_repo: str | |
|
1564 | :param target_repo: Set the target repository name. | |
|
1565 | :type target_repo: str | |
|
1566 | :param source_ref: Set the source ref name. | |
|
1567 | :type source_ref: str | |
|
1568 | :param target_ref: Set the target ref name. | |
|
1569 | :type target_ref: str | |
|
1570 | :param title: Set the pull request title. | |
|
1571 | :type title: str | |
|
1572 | :param description: Set the pull request description. | |
|
1573 | :type description: Optional(str) | |
|
1574 | :param reviewers: Set the new pull request reviewers list. | |
|
1575 | :type reviewers: Optional(list) | |
|
1576 | ||
|
1577 | ||
|
1578 | update_pull_request | |
|
1579 | ------------------- | |
|
1580 | ||
|
1581 | .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>, close_pull_request=<Optional:None>) | |
|
1582 | ||
|
1583 | Updates a pull request. | |
|
1584 | ||
|
1585 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1586 | :type apiuser: AuthUser | |
|
1587 | :param repoid: The repository name or repository ID. | |
|
1588 | :type repoid: str or int | |
|
1589 | :param pullrequestid: The pull request ID. | |
|
1590 | :type pullrequestid: int | |
|
1591 | :param title: Set the pull request title. | |
|
1592 | :type title: str | |
|
1593 | :param description: Update pull request description. | |
|
1594 | :type description: Optional(str) | |
|
1595 | :param reviewers: Update pull request reviewers list with new value. | |
|
1596 | :type reviewers: Optional(list) | |
|
1597 | :param update_commits: Trigger update of commits for this pull request | |
|
1598 | :type: update_commits: Optional(bool) | |
|
1599 | :param close_pull_request: Close this pull request with rejected state | |
|
1600 | :type: close_pull_request: Optional(bool) | |
|
1601 | ||
|
1602 | Example output: | |
|
1603 | ||
|
1604 | .. code-block:: bash | |
|
1605 | ||
|
1606 | id : <id_given_in_input> | |
|
1607 | result : | |
|
1608 | { | |
|
1609 | "msg": "Updated pull request `63`", | |
|
1610 | "pull_request": <pull_request_object>, | |
|
1611 | "updated_reviewers": { | |
|
1612 | "added": [ | |
|
1613 | "username" | |
|
1614 | ], | |
|
1615 | "removed": [] | |
|
1616 | }, | |
|
1617 | "updated_commits": { | |
|
1618 | "added": [ | |
|
1619 | "<sha1_hash>" | |
|
1620 | ], | |
|
1621 | "common": [ | |
|
1622 | "<sha1_hash>", | |
|
1623 | "<sha1_hash>", | |
|
1624 | ], | |
|
1625 | "removed": [] | |
|
1626 | } | |
|
1627 | } | |
|
1628 | error : null | |
|
1629 | ||
|
1630 | ||
|
1631 | get_repo | |
|
1632 | -------- | |
|
1633 | ||
|
1634 | .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>) | |
|
1635 | ||
|
1636 | Gets an existing repository by its name or repository_id. | |
|
1637 | ||
|
1638 | The members section so the output returns users groups or users | |
|
1639 | associated with that repository. | |
|
1640 | ||
|
1641 | This command can only be run using an |authtoken| with admin rights, | |
|
1642 | or users with at least read rights to the |repo|. | |
|
1643 | ||
|
1644 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1645 | :type apiuser: AuthUser | |
|
1646 | :param repoid: The repository name or repository id. | |
|
1647 | :type repoid: str or int | |
|
1648 | :param cache: use the cached value for last changeset | |
|
1649 | :type: cache: Optional(bool) | |
|
1650 | ||
|
1651 | Example output: | |
|
1652 | ||
|
1653 | .. code-block:: bash | |
|
1654 | ||
|
1655 | { | |
|
1656 | "error": null, | |
|
1657 | "id": <repo_id>, | |
|
1658 | "result": { | |
|
1659 | "clone_uri": null, | |
|
1660 | "created_on": "timestamp", | |
|
1661 | "description": "repo description", | |
|
1662 | "enable_downloads": false, | |
|
1663 | "enable_locking": false, | |
|
1664 | "enable_statistics": false, | |
|
1665 | "followers": [ | |
|
1666 | { | |
|
1667 | "active": true, | |
|
1668 | "admin": false, | |
|
1669 | "api_key": "****************************************", | |
|
1670 | "api_keys": [ | |
|
1671 | "****************************************" | |
|
1672 | ], | |
|
1673 | "email": "user@example.com", | |
|
1674 | "emails": [ | |
|
1675 | "user@example.com" | |
|
1676 | ], | |
|
1677 | "extern_name": "rhodecode", | |
|
1678 | "extern_type": "rhodecode", | |
|
1679 | "firstname": "username", | |
|
1680 | "ip_addresses": [], | |
|
1681 | "language": null, | |
|
1682 | "last_login": "2015-09-16T17:16:35.854", | |
|
1683 | "lastname": "surname", | |
|
1684 | "user_id": <user_id>, | |
|
1685 | "username": "name" | |
|
1686 | } | |
|
1687 | ], | |
|
1688 | "fork_of": "parent-repo", | |
|
1689 | "landing_rev": [ | |
|
1690 | "rev", | |
|
1691 | "tip" | |
|
1692 | ], | |
|
1693 | "last_changeset": { | |
|
1694 | "author": "User <user@example.com>", | |
|
1695 | "branch": "default", | |
|
1696 | "date": "timestamp", | |
|
1697 | "message": "last commit message", | |
|
1698 | "parents": [ | |
|
1699 | { | |
|
1700 | "raw_id": "commit-id" | |
|
1701 | } | |
|
1702 | ], | |
|
1703 | "raw_id": "commit-id", | |
|
1704 | "revision": <revision number>, | |
|
1705 | "short_id": "short id" | |
|
1706 | }, | |
|
1707 | "lock_reason": null, | |
|
1708 | "locked_by": null, | |
|
1709 | "locked_date": null, | |
|
1710 | "members": [ | |
|
1711 | { | |
|
1712 | "name": "super-admin-name", | |
|
1713 | "origin": "super-admin", | |
|
1714 | "permission": "repository.admin", | |
|
1715 | "type": "user" | |
|
1716 | }, | |
|
1717 | { | |
|
1718 | "name": "owner-name", | |
|
1719 | "origin": "owner", | |
|
1720 | "permission": "repository.admin", | |
|
1721 | "type": "user" | |
|
1722 | }, | |
|
1723 | { | |
|
1724 | "name": "user-group-name", | |
|
1725 | "origin": "permission", | |
|
1726 | "permission": "repository.write", | |
|
1727 | "type": "user_group" | |
|
1728 | } | |
|
1729 | ], | |
|
1730 | "owner": "owner-name", | |
|
1731 | "permissions": [ | |
|
1732 | { | |
|
1733 | "name": "super-admin-name", | |
|
1734 | "origin": "super-admin", | |
|
1735 | "permission": "repository.admin", | |
|
1736 | "type": "user" | |
|
1737 | }, | |
|
1738 | { | |
|
1739 | "name": "owner-name", | |
|
1740 | "origin": "owner", | |
|
1741 | "permission": "repository.admin", | |
|
1742 | "type": "user" | |
|
1743 | }, | |
|
1744 | { | |
|
1745 | "name": "user-group-name", | |
|
1746 | "origin": "permission", | |
|
1747 | "permission": "repository.write", | |
|
1748 | "type": "user_group" | |
|
1749 | } | |
|
1750 | ], | |
|
1751 | "private": true, | |
|
1752 | "repo_id": 676, | |
|
1753 | "repo_name": "user-group/repo-name", | |
|
1754 | "repo_type": "hg" | |
|
1755 | } | |
|
1756 | } | |
|
1757 | ||
|
1758 | ||
|
1759 | get_repos | |
|
1760 | --------- | |
|
1761 | ||
|
1762 | .. py:function:: get_repos(apiuser) | |
|
1763 | ||
|
1764 | Lists all existing repositories. | |
|
1765 | ||
|
1766 | This command can only be run using an |authtoken| with admin rights, | |
|
1767 | or users with at least read rights to |repos|. | |
|
1768 | ||
|
1769 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1770 | :type apiuser: AuthUser | |
|
1771 | ||
|
1772 | Example output: | |
|
1773 | ||
|
1774 | .. code-block:: bash | |
|
1775 | ||
|
1776 | id : <id_given_in_input> | |
|
1777 | result: [ | |
|
1778 | { | |
|
1779 | "repo_id" : "<repo_id>", | |
|
1780 | "repo_name" : "<reponame>" | |
|
1781 | "repo_type" : "<repo_type>", | |
|
1782 | "clone_uri" : "<clone_uri>", | |
|
1783 | "private": : "<bool>", | |
|
1784 | "created_on" : "<datetimecreated>", | |
|
1785 | "description" : "<description>", | |
|
1786 | "landing_rev": "<landing_rev>", | |
|
1787 | "owner": "<repo_owner>", | |
|
1788 | "fork_of": "<name_of_fork_parent>", | |
|
1789 | "enable_downloads": "<bool>", | |
|
1790 | "enable_locking": "<bool>", | |
|
1791 | "enable_statistics": "<bool>", | |
|
1792 | }, | |
|
1793 | ... | |
|
1794 | ] | |
|
1795 | error: null | |
|
1796 | ||
|
1797 | ||
|
1798 | get_repo_changeset | |
|
1799 | ------------------ | |
|
1800 | ||
|
1801 | .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>) | |
|
1802 | ||
|
1803 | Returns information about a changeset. | |
|
1804 | ||
|
1805 | Additionally parameters define the amount of details returned by | |
|
1806 | this function. | |
|
1807 | ||
|
1808 | This command can only be run using an |authtoken| with admin rights, | |
|
1809 | or users with at least read rights to the |repo|. | |
|
1810 | ||
|
1811 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1812 | :type apiuser: AuthUser | |
|
1813 | :param repoid: The repository name or repository id | |
|
1814 | :type repoid: str or int | |
|
1815 | :param revision: revision for which listing should be done | |
|
1816 | :type revision: str | |
|
1817 | :param details: details can be 'basic|extended|full' full gives diff | |
|
1818 | info details like the diff itself, and number of changed files etc. | |
|
1819 | :type details: Optional(str) | |
|
1820 | ||
|
1821 | ||
|
1822 | get_repo_changesets | |
|
1823 | ------------------- | |
|
1824 | ||
|
1825 | .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>) | |
|
1826 | ||
|
1827 | Returns a set of changesets limited by the number of commits starting | |
|
1828 | from the `start_rev` option. | |
|
1829 | ||
|
1830 | Additional parameters define the amount of details returned by this | |
|
1831 | function. | |
|
1832 | ||
|
1833 | This command can only be run using an |authtoken| with admin rights, | |
|
1834 | or users with at least read rights to |repos|. | |
|
1835 | ||
|
1836 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1837 | :type apiuser: AuthUser | |
|
1838 | :param repoid: The repository name or repository ID. | |
|
1839 | :type repoid: str or int | |
|
1840 | :param start_rev: The starting revision from where to get changesets. | |
|
1841 | :type start_rev: str | |
|
1842 | :param limit: Limit the number of changesets to this amount | |
|
1843 | :type limit: str or int | |
|
1844 | :param details: Set the level of detail returned. Valid option are: | |
|
1845 | ``basic``, ``extended`` and ``full``. | |
|
1846 | :type details: Optional(str) | |
|
1847 | ||
|
1848 | .. note:: | |
|
1849 | ||
|
1850 | Setting the parameter `details` to the value ``full`` is extensive | |
|
1851 | and returns details like the diff itself, and the number | |
|
1852 | of changed files. | |
|
1853 | ||
|
1854 | ||
|
1855 | get_repo_nodes | |
|
1856 | -------------- | |
|
1857 | ||
|
1858 | .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>) | |
|
1859 | ||
|
1860 | Returns a list of nodes and children in a flat list for a given | |
|
1861 | path at given revision. | |
|
1862 | ||
|
1863 | It's possible to specify ret_type to show only `files` or `dirs`. | |
|
1864 | ||
|
1865 | This command can only be run using an |authtoken| with admin rights, | |
|
1866 | or users with at least read rights to |repos|. | |
|
1867 | ||
|
1868 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1869 | :type apiuser: AuthUser | |
|
1870 | :param repoid: The repository name or repository ID. | |
|
1871 | :type repoid: str or int | |
|
1872 | :param revision: The revision for which listing should be done. | |
|
1873 | :type revision: str | |
|
1874 | :param root_path: The path from which to start displaying. | |
|
1875 | :type root_path: str | |
|
1876 | :param ret_type: Set the return type. Valid options are | |
|
1877 | ``all`` (default), ``files`` and ``dirs``. | |
|
1878 | :type ret_type: Optional(str) | |
|
1879 | :param details: Returns extended information about nodes, such as | |
|
1880 | md5, binary, and or content. The valid options are ``basic`` and | |
|
1881 | ``full``. | |
|
1882 | :type details: Optional(str) | |
|
1883 | ||
|
1884 | Example output: | |
|
1885 | ||
|
1886 | .. code-block:: bash | |
|
1887 | ||
|
1888 | id : <id_given_in_input> | |
|
1889 | result: [ | |
|
1890 | { | |
|
1891 | "name" : "<name>" | |
|
1892 | "type" : "<type>", | |
|
1893 | "binary": "<true|false>" (only in extended mode) | |
|
1894 | "md5" : "<md5 of file content>" (only in extended mode) | |
|
1895 | }, | |
|
1896 | ... | |
|
1897 | ] | |
|
1898 | error: null | |
|
1899 | ||
|
1900 | ||
|
1901 | create_repo | |
|
1902 | ----------- | |
|
1903 | ||
|
1904 | .. py:function:: create_repo(apiuser, repo_name, repo_type, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, copy_permissions=<Optional:False>) | |
|
1905 | ||
|
1906 | Creates a repository. | |
|
1907 | ||
|
1908 | * If the repository name contains "/", all the required repository | |
|
1909 | groups will be created. | |
|
1910 | ||
|
1911 | For example "foo/bar/baz" will create |repo| groups "foo" and "bar" | |
|
1912 | (with "foo" as parent). It will also create the "baz" repository | |
|
1913 | with "bar" as |repo| group. | |
|
1914 | ||
|
1915 | This command can only be run using an |authtoken| with at least | |
|
1916 | write permissions to the |repo|. | |
|
1917 | ||
|
1918 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1919 | :type apiuser: AuthUser | |
|
1920 | :param repo_name: Set the repository name. | |
|
1921 | :type repo_name: str | |
|
1922 | :param repo_type: Set the repository type; 'hg','git', or 'svn'. | |
|
1923 | :type repo_type: str | |
|
1924 | :param owner: user_id or username | |
|
1925 | :type owner: Optional(str) | |
|
1926 | :param description: Set the repository description. | |
|
1927 | :type description: Optional(str) | |
|
1928 | :param private: | |
|
1929 | :type private: bool | |
|
1930 | :param clone_uri: | |
|
1931 | :type clone_uri: str | |
|
1932 | :param landing_rev: <rev_type>:<rev> | |
|
1933 | :type landing_rev: str | |
|
1934 | :param enable_locking: | |
|
1935 | :type enable_locking: bool | |
|
1936 | :param enable_downloads: | |
|
1937 | :type enable_downloads: bool | |
|
1938 | :param enable_statistics: | |
|
1939 | :type enable_statistics: bool | |
|
1940 | :param copy_permissions: Copy permission from group in which the | |
|
1941 | repository is being created. | |
|
1942 | :type copy_permissions: bool | |
|
1943 | ||
|
1944 | ||
|
1945 | Example output: | |
|
1946 | ||
|
1947 | .. code-block:: bash | |
|
1948 | ||
|
1949 | id : <id_given_in_input> | |
|
1950 | result: { | |
|
1951 | "msg": "Created new repository `<reponame>`", | |
|
1952 | "success": true, | |
|
1953 | "task": "<celery task id or None if done sync>" | |
|
1954 | } | |
|
1955 | error: null | |
|
1956 | ||
|
1957 | ||
|
1958 | Example error output: | |
|
1959 | ||
|
1960 | .. code-block:: bash | |
|
1961 | ||
|
1962 | id : <id_given_in_input> | |
|
1963 | result : null | |
|
1964 | error : { | |
|
1965 | 'failed to create repository `<repo_name>` | |
|
1966 | } | |
|
1967 | ||
|
1968 | ||
|
1969 | add_field_to_repo | |
|
1970 | ----------------- | |
|
1971 | ||
|
1972 | .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>) | |
|
1973 | ||
|
1974 | Adds an extra field to a repository. | |
|
1975 | ||
|
1976 | This command can only be run using an |authtoken| with at least | |
|
1977 | write permissions to the |repo|. | |
|
1978 | ||
|
1979 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
1980 | :type apiuser: AuthUser | |
|
1981 | :param repoid: Set the repository name or repository id. | |
|
1982 | :type repoid: str or int | |
|
1983 | :param key: Create a unique field key for this repository. | |
|
1984 | :type key: str | |
|
1985 | :param label: | |
|
1986 | :type label: Optional(str) | |
|
1987 | :param description: | |
|
1988 | :type description: Optional(str) | |
|
1989 | ||
|
1990 | ||
|
1991 | remove_field_from_repo | |
|
1992 | ---------------------- | |
|
1993 | ||
|
1994 | .. py:function:: remove_field_from_repo(apiuser, repoid, key) | |
|
1995 | ||
|
1996 | Removes an extra field from a repository. | |
|
1997 | ||
|
1998 | This command can only be run using an |authtoken| with at least | |
|
1999 | write permissions to the |repo|. | |
|
2000 | ||
|
2001 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2002 | :type apiuser: AuthUser | |
|
2003 | :param repoid: Set the repository name or repository ID. | |
|
2004 | :type repoid: str or int | |
|
2005 | :param key: Set the unique field key for this repository. | |
|
2006 | :type key: str | |
|
2007 | ||
|
2008 | ||
|
2009 | update_repo | |
|
2010 | ----------- | |
|
2011 | ||
|
2012 | .. py:function:: update_repo(apiuser, repoid, name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, group=<Optional:None>, fork_of=<Optional:None>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>) | |
|
2013 | ||
|
2014 | Updates a repository with the given information. | |
|
2015 | ||
|
2016 | This command can only be run using an |authtoken| with at least | |
|
2017 | write permissions to the |repo|. | |
|
2018 | ||
|
2019 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2020 | :type apiuser: AuthUser | |
|
2021 | :param repoid: repository name or repository ID. | |
|
2022 | :type repoid: str or int | |
|
2023 | :param name: Update the |repo| name. | |
|
2024 | :type name: str | |
|
2025 | :param owner: Set the |repo| owner. | |
|
2026 | :type owner: str | |
|
2027 | :param group: Set the |repo| group the |repo| belongs to. | |
|
2028 | :type group: str | |
|
2029 | :param fork_of: Set the master |repo| name. | |
|
2030 | :type fork_of: str | |
|
2031 | :param description: Update the |repo| description. | |
|
2032 | :type description: str | |
|
2033 | :param private: Set the |repo| as private. (True | False) | |
|
2034 | :type private: bool | |
|
2035 | :param clone_uri: Update the |repo| clone URI. | |
|
2036 | :type clone_uri: str | |
|
2037 | :param landing_rev: Set the |repo| landing revision. Default is | |
|
2038 | ``tip``. | |
|
2039 | :type landing_rev: str | |
|
2040 | :param enable_statistics: Enable statistics on the |repo|, | |
|
2041 | (True | False). | |
|
2042 | :type enable_statistics: bool | |
|
2043 | :param enable_locking: Enable |repo| locking. | |
|
2044 | :type enable_locking: bool | |
|
2045 | :param enable_downloads: Enable downloads from the |repo|, | |
|
2046 | (True | False). | |
|
2047 | :type enable_downloads: bool | |
|
2048 | :param fields: Add extra fields to the |repo|. Use the following | |
|
2049 | example format: ``field_key=field_val,field_key2=fieldval2``. | |
|
2050 | Escape ', ' with \, | |
|
2051 | :type fields: str | |
|
2052 | ||
|
2053 | ||
|
2054 | fork_repo | |
|
2055 | --------- | |
|
2056 | ||
|
2057 | .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, copy_permissions=<Optional:False>, private=<Optional:False>, landing_rev=<Optional:'rev:tip'>) | |
|
2058 | ||
|
2059 | Creates a fork of the specified |repo|. | |
|
2060 | ||
|
2061 | * If using |RCE| with Celery this will immediately return a success | |
|
2062 | message, even though the fork will be created asynchronously. | |
|
2063 | ||
|
2064 | This command can only be run using an |authtoken| with fork | |
|
2065 | permissions on the |repo|. | |
|
2066 | ||
|
2067 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2068 | :type apiuser: AuthUser | |
|
2069 | :param repoid: Set repository name or repository ID. | |
|
2070 | :type repoid: str or int | |
|
2071 | :param fork_name: Set the fork name. | |
|
2072 | :type fork_name: str | |
|
2073 | :param owner: Set the fork owner. | |
|
2074 | :type owner: str | |
|
2075 | :param description: Set the fork descripton. | |
|
2076 | :type description: str | |
|
2077 | :param copy_permissions: Copy permissions from parent |repo|. The | |
|
2078 | default is False. | |
|
2079 | :type copy_permissions: bool | |
|
2080 | :param private: Make the fork private. The default is False. | |
|
2081 | :type private: bool | |
|
2082 | :param landing_rev: Set the landing revision. The default is tip. | |
|
2083 | ||
|
2084 | Example output: | |
|
2085 | ||
|
2086 | .. code-block:: bash | |
|
2087 | ||
|
2088 | id : <id_for_response> | |
|
2089 | api_key : "<api_key>" | |
|
2090 | args: { | |
|
2091 | "repoid" : "<reponame or repo_id>", | |
|
2092 | "fork_name": "<forkname>", | |
|
2093 | "owner": "<username or user_id = Optional(=apiuser)>", | |
|
2094 | "description": "<description>", | |
|
2095 | "copy_permissions": "<bool>", | |
|
2096 | "private": "<bool>", | |
|
2097 | "landing_rev": "<landing_rev>" | |
|
2098 | } | |
|
2099 | ||
|
2100 | Example error output: | |
|
2101 | ||
|
2102 | .. code-block:: bash | |
|
2103 | ||
|
2104 | id : <id_given_in_input> | |
|
2105 | result: { | |
|
2106 | "msg": "Created fork of `<reponame>` as `<forkname>`", | |
|
2107 | "success": true, | |
|
2108 | "task": "<celery task id or None if done sync>" | |
|
2109 | } | |
|
2110 | error: null | |
|
2111 | ||
|
2112 | ||
|
2113 | delete_repo | |
|
2114 | ----------- | |
|
2115 | ||
|
2116 | .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>) | |
|
2117 | ||
|
2118 | Deletes a repository. | |
|
2119 | ||
|
2120 | * When the `forks` parameter is set it's possible to detach or delete | |
|
2121 | forks of deleted repository. | |
|
2122 | ||
|
2123 | This command can only be run using an |authtoken| with admin | |
|
2124 | permissions on the |repo|. | |
|
2125 | ||
|
2126 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2127 | :type apiuser: AuthUser | |
|
2128 | :param repoid: Set the repository name or repository ID. | |
|
2129 | :type repoid: str or int | |
|
2130 | :param forks: Set to `detach` or `delete` forks from the |repo|. | |
|
2131 | :type forks: Optional(str) | |
|
2132 | ||
|
2133 | Example error output: | |
|
2134 | ||
|
2135 | .. code-block:: bash | |
|
2136 | ||
|
2137 | id : <id_given_in_input> | |
|
2138 | result: { | |
|
2139 | "msg": "Deleted repository `<reponame>`", | |
|
2140 | "success": true | |
|
2141 | } | |
|
2142 | error: null | |
|
2143 | ||
|
2144 | ||
|
2145 | comment_commit | |
|
2146 | -------------- | |
|
2147 | ||
|
2148 | .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>) | |
|
2149 | ||
|
2150 | Set a commit comment, and optionally change the status of the commit. | |
|
2151 | This command can be executed only using api_key belonging to user | |
|
2152 | with admin rights, or repository administrator. | |
|
2153 | ||
|
2154 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2155 | :type apiuser: AuthUser | |
|
2156 | :param repoid: Set the repository name or repository ID. | |
|
2157 | :type repoid: str or int | |
|
2158 | :param commit_id: Specify the commit_id for which to set a comment. | |
|
2159 | :type commit_id: str | |
|
2160 | :param message: The comment text. | |
|
2161 | :type message: str | |
|
2162 | :param userid: Set the user name of the comment creator. | |
|
2163 | :type userid: Optional(str or int) | |
|
2164 | :param status: status, one of 'not_reviewed', 'approved', 'rejected', | |
|
2165 | 'under_review' | |
|
2166 | :type status: str | |
|
2167 | ||
|
2168 | Example error output: | |
|
2169 | ||
|
2170 | .. code-block:: json | |
|
2171 | ||
|
2172 | { | |
|
2173 | "id" : <id_given_in_input>, | |
|
2174 | "result" : { | |
|
2175 | "msg": "Commented on commit `<commit_id>` for repository `<repoid>`", | |
|
2176 | "status_change": null or <status>, | |
|
2177 | "success": true | |
|
2178 | }, | |
|
2179 | "error" : null | |
|
2180 | } | |
|
2181 | ||
|
2182 | ||
|
2183 | changeset_comment | |
|
2184 | ----------------- | |
|
2185 | ||
|
2186 | .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>) | |
|
2187 | ||
|
2188 | .. deprecated:: 3.4.0 | |
|
2189 | ||
|
2190 | Please use method `comment_commit` instead. | |
|
2191 | ||
|
2192 | ||
|
2193 | Set a changeset comment, and optionally change the status of the | |
|
2194 | changeset. | |
|
2195 | ||
|
2196 | This command can only be run using an |authtoken| with admin | |
|
2197 | permissions on the |repo|. | |
|
2198 | ||
|
2199 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2200 | :type apiuser: AuthUser | |
|
2201 | :param repoid: Set the repository name or repository ID. | |
|
2202 | :type repoid: str or int | |
|
2203 | :param revision: Specify the revision for which to set a comment. | |
|
2204 | :type revision: str | |
|
2205 | :param message: The comment text. | |
|
2206 | :type message: str | |
|
2207 | :param userid: Set the user name of the comment creator. | |
|
2208 | :type userid: Optional(str or int) | |
|
2209 | :param status: Set the comment status. The following are valid options: | |
|
2210 | * not_reviewed | |
|
2211 | * approved | |
|
2212 | * rejected | |
|
2213 | * under_review | |
|
2214 | :type status: str | |
|
2215 | ||
|
2216 | Example error output: | |
|
2217 | ||
|
2218 | .. code-block:: json | |
|
2219 | ||
|
2220 | { | |
|
2221 | "id" : <id_given_in_input>, | |
|
2222 | "result" : { | |
|
2223 | "msg": "Commented on commit `<revision>` for repository `<repoid>`", | |
|
2224 | "status_change": null or <status>, | |
|
2225 | "success": true | |
|
2226 | }, | |
|
2227 | "error" : null | |
|
2228 | } | |
|
2229 | ||
|
2230 | ||
|
2231 | grant_user_permission | |
|
2232 | --------------------- | |
|
2233 | ||
|
2234 | .. py:function:: grant_user_permission(apiuser, repoid, userid, perm) | |
|
2235 | ||
|
2236 | Grant permissions for the specified user on the given repository, | |
|
2237 | or update existing permissions if found. | |
|
2238 | ||
|
2239 | This command can only be run using an |authtoken| with admin | |
|
2240 | permissions on the |repo|. | |
|
2241 | ||
|
2242 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2243 | :type apiuser: AuthUser | |
|
2244 | :param repoid: Set the repository name or repository ID. | |
|
2245 | :type repoid: str or int | |
|
2246 | :param userid: Set the user name. | |
|
2247 | :type userid: str | |
|
2248 | :param perm: Set the user permissions, using the following format | |
|
2249 | ``(repository.(none|read|write|admin))`` | |
|
2250 | :type perm: str | |
|
2251 | ||
|
2252 | Example output: | |
|
2253 | ||
|
2254 | .. code-block:: bash | |
|
2255 | ||
|
2256 | id : <id_given_in_input> | |
|
2257 | result: { | |
|
2258 | "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`", | |
|
2259 | "success": true | |
|
2260 | } | |
|
2261 | error: null | |
|
2262 | ||
|
2263 | ||
|
2264 | revoke_user_permission | |
|
2265 | ---------------------- | |
|
2266 | ||
|
2267 | .. py:function:: revoke_user_permission(apiuser, repoid, userid) | |
|
2268 | ||
|
2269 | Revoke permission for a user on the specified repository. | |
|
2270 | ||
|
2271 | This command can only be run using an |authtoken| with admin | |
|
2272 | permissions on the |repo|. | |
|
2273 | ||
|
2274 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2275 | :type apiuser: AuthUser | |
|
2276 | :param repoid: Set the repository name or repository ID. | |
|
2277 | :type repoid: str or int | |
|
2278 | :param userid: Set the user name of revoked user. | |
|
2279 | :type userid: str or int | |
|
2280 | ||
|
2281 | Example error output: | |
|
2282 | ||
|
2283 | .. code-block:: bash | |
|
2284 | ||
|
2285 | id : <id_given_in_input> | |
|
2286 | result: { | |
|
2287 | "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`", | |
|
2288 | "success": true | |
|
2289 | } | |
|
2290 | error: null | |
|
2291 | ||
|
2292 | ||
|
2293 | grant_user_group_permission | |
|
2294 | --------------------------- | |
|
2295 | ||
|
2296 | .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm) | |
|
2297 | ||
|
2298 | Grant permission for a user group on the specified repository, | |
|
2299 | or update existing permissions. | |
|
2300 | ||
|
2301 | This command can only be run using an |authtoken| with admin | |
|
2302 | permissions on the |repo|. | |
|
2303 | ||
|
2304 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2305 | :type apiuser: AuthUser | |
|
2306 | :param repoid: Set the repository name or repository ID. | |
|
2307 | :type repoid: str or int | |
|
2308 | :param usergroupid: Specify the ID of the user group. | |
|
2309 | :type usergroupid: str or int | |
|
2310 | :param perm: Set the user group permissions using the following | |
|
2311 | format: (repository.(none|read|write|admin)) | |
|
2312 | :type perm: str | |
|
2313 | ||
|
2314 | Example output: | |
|
2315 | ||
|
2316 | .. code-block:: bash | |
|
2317 | ||
|
2318 | id : <id_given_in_input> | |
|
2319 | result : { | |
|
2320 | "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`", | |
|
2321 | "success": true | |
|
2322 | ||
|
2323 | } | |
|
2324 | error : null | |
|
2325 | ||
|
2326 | Example error output: | |
|
2327 | ||
|
2328 | .. code-block:: bash | |
|
2329 | ||
|
2330 | id : <id_given_in_input> | |
|
2331 | result : null | |
|
2332 | error : { | |
|
2333 | "failed to edit permission for user group: `<usergroup>` in repo `<repo>`' | |
|
2334 | } | |
|
2335 | ||
|
2336 | ||
|
2337 | revoke_user_group_permission | |
|
2338 | ---------------------------- | |
|
2339 | ||
|
2340 | .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid) | |
|
2341 | ||
|
2342 | Revoke the permissions of a user group on a given repository. | |
|
2343 | ||
|
2344 | This command can only be run using an |authtoken| with admin | |
|
2345 | permissions on the |repo|. | |
|
2346 | ||
|
2347 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2348 | :type apiuser: AuthUser | |
|
2349 | :param repoid: Set the repository name or repository ID. | |
|
2350 | :type repoid: str or int | |
|
2351 | :param usergroupid: Specify the user group ID. | |
|
2352 | :type usergroupid: str or int | |
|
2353 | ||
|
2354 | Example output: | |
|
2355 | ||
|
2356 | .. code-block:: bash | |
|
2357 | ||
|
2358 | id : <id_given_in_input> | |
|
2359 | result: { | |
|
2360 | "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`", | |
|
2361 | "success": true | |
|
2362 | } | |
|
2363 | error: null | |
|
2364 | ||
|
2365 | ||
|
2366 | get_repo_group | |
|
2367 | -------------- | |
|
2368 | ||
|
2369 | .. py:function:: get_repo_group(apiuser, repogroupid) | |
|
2370 | ||
|
2371 | Return the specified |repo| group, along with permissions, | |
|
2372 | and repositories inside the group | |
|
2373 | ||
|
2374 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2375 | :type apiuser: AuthUser | |
|
2376 | :param repogroupid: Specify the name of ID of the repository group. | |
|
2377 | :type repogroupid: str or int | |
|
2378 | ||
|
2379 | ||
|
2380 | Example output: | |
|
2381 | ||
|
2382 | .. code-block:: bash | |
|
2383 | ||
|
2384 | { | |
|
2385 | "error": null, | |
|
2386 | "id": repo-group-id, | |
|
2387 | "result": { | |
|
2388 | "group_description": "repo group description", | |
|
2389 | "group_id": 14, | |
|
2390 | "group_name": "group name", | |
|
2391 | "members": [ | |
|
2392 | { | |
|
2393 | "name": "super-admin-username", | |
|
2394 | "origin": "super-admin", | |
|
2395 | "permission": "group.admin", | |
|
2396 | "type": "user" | |
|
2397 | }, | |
|
2398 | { | |
|
2399 | "name": "owner-name", | |
|
2400 | "origin": "owner", | |
|
2401 | "permission": "group.admin", | |
|
2402 | "type": "user" | |
|
2403 | }, | |
|
2404 | { | |
|
2405 | "name": "user-group-name", | |
|
2406 | "origin": "permission", | |
|
2407 | "permission": "group.write", | |
|
2408 | "type": "user_group" | |
|
2409 | } | |
|
2410 | ], | |
|
2411 | "owner": "owner-name", | |
|
2412 | "parent_group": null, | |
|
2413 | "repositories": [ repo-list ] | |
|
2414 | } | |
|
2415 | } | |
|
2416 | ||
|
2417 | ||
|
2418 | get_repo_groups | |
|
2419 | --------------- | |
|
2420 | ||
|
2421 | .. py:function:: get_repo_groups(apiuser) | |
|
2422 | ||
|
2423 | Returns all repository groups. | |
|
2424 | ||
|
2425 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2426 | :type apiuser: AuthUser | |
|
2427 | ||
|
2428 | ||
|
2429 | create_repo_group | |
|
2430 | ----------------- | |
|
2431 | ||
|
2432 | .. py:function:: create_repo_group(apiuser, group_name, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, copy_permissions=<Optional:False>) | |
|
2433 | ||
|
2434 | Creates a repository group. | |
|
2435 | ||
|
2436 | * If the repository group name contains "/", all the required repository | |
|
2437 | groups will be created. | |
|
2438 | ||
|
2439 | For example "foo/bar/baz" will create |repo| groups "foo" and "bar" | |
|
2440 | (with "foo" as parent). It will also create the "baz" repository | |
|
2441 | with "bar" as |repo| group. | |
|
2442 | ||
|
2443 | This command can only be run using an |authtoken| with admin | |
|
2444 | permissions. | |
|
2445 | ||
|
2446 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2447 | :type apiuser: AuthUser | |
|
2448 | :param group_name: Set the repository group name. | |
|
2449 | :type group_name: str | |
|
2450 | :param description: Set the |repo| group description. | |
|
2451 | :type description: str | |
|
2452 | :param owner: Set the |repo| group owner. | |
|
2453 | :type owner: str | |
|
2454 | :param copy_permissions: | |
|
2455 | :type copy_permissions: | |
|
2456 | ||
|
2457 | Example output: | |
|
2458 | ||
|
2459 | .. code-block:: bash | |
|
2460 | ||
|
2461 | id : <id_given_in_input> | |
|
2462 | result : { | |
|
2463 | "msg": "Created new repo group `<repo_group_name>`" | |
|
2464 | "repo_group": <repogroup_object> | |
|
2465 | } | |
|
2466 | error : null | |
|
2467 | ||
|
2468 | ||
|
2469 | Example error output: | |
|
2470 | ||
|
2471 | .. code-block:: bash | |
|
2472 | ||
|
2473 | id : <id_given_in_input> | |
|
2474 | result : null | |
|
2475 | error : { | |
|
2476 | failed to create repo group `<repogroupid>` | |
|
2477 | } | |
|
2478 | ||
|
2479 | ||
|
2480 | update_repo_group | |
|
2481 | ----------------- | |
|
2482 | ||
|
2483 | .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, parent=<Optional:None>, enable_locking=<Optional:False>) | |
|
2484 | ||
|
2485 | Updates repository group with the details given. | |
|
2486 | ||
|
2487 | This command can only be run using an |authtoken| with admin | |
|
2488 | permissions. | |
|
2489 | ||
|
2490 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2491 | :type apiuser: AuthUser | |
|
2492 | :param repogroupid: Set the ID of repository group. | |
|
2493 | :type repogroupid: str or int | |
|
2494 | :param group_name: Set the name of the |repo| group. | |
|
2495 | :type group_name: str | |
|
2496 | :param description: Set a description for the group. | |
|
2497 | :type description: str | |
|
2498 | :param owner: Set the |repo| group owner. | |
|
2499 | :type owner: str | |
|
2500 | :param parent: Set the |repo| group parent. | |
|
2501 | :type parent: str or int | |
|
2502 | :param enable_locking: Enable |repo| locking. The default is false. | |
|
2503 | :type enable_locking: bool | |
|
2504 | ||
|
2505 | ||
|
2506 | delete_repo_group | |
|
2507 | ----------------- | |
|
2508 | ||
|
2509 | .. py:function:: delete_repo_group(apiuser, repogroupid) | |
|
2510 | ||
|
2511 | Deletes a |repo| group. | |
|
2512 | ||
|
2513 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2514 | :type apiuser: AuthUser | |
|
2515 | :param repogroupid: Set the name or ID of repository group to be | |
|
2516 | deleted. | |
|
2517 | :type repogroupid: str or int | |
|
2518 | ||
|
2519 | Example output: | |
|
2520 | ||
|
2521 | .. code-block:: bash | |
|
2522 | ||
|
2523 | id : <id_given_in_input> | |
|
2524 | result : { | |
|
2525 | 'msg': 'deleted repo group ID:<repogroupid> <repogroupname> | |
|
2526 | 'repo_group': null | |
|
2527 | } | |
|
2528 | error : null | |
|
2529 | ||
|
2530 | Example error output: | |
|
2531 | ||
|
2532 | .. code-block:: bash | |
|
2533 | ||
|
2534 | id : <id_given_in_input> | |
|
2535 | result : null | |
|
2536 | error : { | |
|
2537 | "failed to delete repo group ID:<repogroupid> <repogroupname>" | |
|
2538 | } | |
|
2539 | ||
|
2540 | ||
|
2541 | grant_user_permission_to_repo_group | |
|
2542 | ----------------------------------- | |
|
2543 | ||
|
2544 | .. py:function:: grant_user_permission_to_repo_group(apiuser, repogroupid, userid, perm, apply_to_children=<Optional:'none'>) | |
|
2545 | ||
|
2546 | Grant permission for a user on the given repository group, or update | |
|
2547 | existing permissions if found. | |
|
2548 | ||
|
2549 | This command can only be run using an |authtoken| with admin | |
|
2550 | permissions. | |
|
2551 | ||
|
2552 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2553 | :type apiuser: AuthUser | |
|
2554 | :param repogroupid: Set the name or ID of repository group. | |
|
2555 | :type repogroupid: str or int | |
|
2556 | :param userid: Set the user name. | |
|
2557 | :type userid: str | |
|
2558 | :param perm: (group.(none|read|write|admin)) | |
|
2559 | :type perm: str | |
|
2560 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
2561 | :type apply_to_children: str | |
|
2562 | ||
|
2563 | Example output: | |
|
2564 | ||
|
2565 | .. code-block:: bash | |
|
2566 | ||
|
2567 | id : <id_given_in_input> | |
|
2568 | result: { | |
|
2569 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
|
2570 | "success": true | |
|
2571 | } | |
|
2572 | error: null | |
|
2573 | ||
|
2574 | Example error output: | |
|
2575 | ||
|
2576 | .. code-block:: bash | |
|
2577 | ||
|
2578 | id : <id_given_in_input> | |
|
2579 | result : null | |
|
2580 | error : { | |
|
2581 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" | |
|
2582 | } | |
|
2583 | ||
|
2584 | ||
|
2585 | revoke_user_permission_from_repo_group | |
|
2586 | -------------------------------------- | |
|
2587 | ||
|
2588 | .. py:function:: revoke_user_permission_from_repo_group(apiuser, repogroupid, userid, apply_to_children=<Optional:'none'>) | |
|
2589 | ||
|
2590 | Revoke permission for a user in a given repository group. | |
|
2591 | ||
|
2592 | This command can only be run using an |authtoken| with admin | |
|
2593 | permissions on the |repo| group. | |
|
2594 | ||
|
2595 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2596 | :type apiuser: AuthUser | |
|
2597 | :param repogroupid: Set the name or ID of the repository group. | |
|
2598 | :type repogroupid: str or int | |
|
2599 | :param userid: Set the user name to revoke. | |
|
2600 | :type userid: str | |
|
2601 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
2602 | :type apply_to_children: str | |
|
2603 | ||
|
2604 | Example output: | |
|
2605 | ||
|
2606 | .. code-block:: bash | |
|
2607 | ||
|
2608 | id : <id_given_in_input> | |
|
2609 | result: { | |
|
2610 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user: `<username>` in repo group: `<repo_group_name>`", | |
|
2611 | "success": true | |
|
2612 | } | |
|
2613 | error: null | |
|
2614 | ||
|
2615 | Example error output: | |
|
2616 | ||
|
2617 | .. code-block:: bash | |
|
2618 | ||
|
2619 | id : <id_given_in_input> | |
|
2620 | result : null | |
|
2621 | error : { | |
|
2622 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" | |
|
2623 | } | |
|
2624 | ||
|
2625 | ||
|
2626 | grant_user_group_permission_to_repo_group | |
|
2627 | ----------------------------------------- | |
|
2628 | ||
|
2629 | .. py:function:: grant_user_group_permission_to_repo_group(apiuser, repogroupid, usergroupid, perm, apply_to_children=<Optional:'none'>) | |
|
2630 | ||
|
2631 | Grant permission for a user group on given repository group, or update | |
|
2632 | existing permissions if found. | |
|
2633 | ||
|
2634 | This command can only be run using an |authtoken| with admin | |
|
2635 | permissions on the |repo| group. | |
|
2636 | ||
|
2637 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2638 | :type apiuser: AuthUser | |
|
2639 | :param repogroupid: Set the name or id of repository group | |
|
2640 | :type repogroupid: str or int | |
|
2641 | :param usergroupid: id of usergroup | |
|
2642 | :type usergroupid: str or int | |
|
2643 | :param perm: (group.(none|read|write|admin)) | |
|
2644 | :type perm: str | |
|
2645 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
2646 | :type apply_to_children: str | |
|
2647 | ||
|
2648 | Example output: | |
|
2649 | ||
|
2650 | .. code-block:: bash | |
|
2651 | ||
|
2652 | id : <id_given_in_input> | |
|
2653 | result : { | |
|
2654 | "msg" : "Granted perm: `<perm>` (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
|
2655 | "success": true | |
|
2656 | ||
|
2657 | } | |
|
2658 | error : null | |
|
2659 | ||
|
2660 | Example error output: | |
|
2661 | ||
|
2662 | .. code-block:: bash | |
|
2663 | ||
|
2664 | id : <id_given_in_input> | |
|
2665 | result : null | |
|
2666 | error : { | |
|
2667 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" | |
|
2668 | } | |
|
2669 | ||
|
2670 | ||
|
2671 | revoke_user_group_permission_from_repo_group | |
|
2672 | -------------------------------------------- | |
|
2673 | ||
|
2674 | .. py:function:: revoke_user_group_permission_from_repo_group(apiuser, repogroupid, usergroupid, apply_to_children=<Optional:'none'>) | |
|
2675 | ||
|
2676 | Revoke permission for user group on given repository. | |
|
2677 | ||
|
2678 | This command can only be run using an |authtoken| with admin | |
|
2679 | permissions on the |repo| group. | |
|
2680 | ||
|
2681 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2682 | :type apiuser: AuthUser | |
|
2683 | :param repogroupid: name or id of repository group | |
|
2684 | :type repogroupid: str or int | |
|
2685 | :param usergroupid: | |
|
2686 | :param apply_to_children: 'none', 'repos', 'groups', 'all' | |
|
2687 | :type apply_to_children: str | |
|
2688 | ||
|
2689 | Example output: | |
|
2690 | ||
|
2691 | .. code-block:: bash | |
|
2692 | ||
|
2693 | id : <id_given_in_input> | |
|
2694 | result: { | |
|
2695 | "msg" : "Revoked perm (recursive:<apply_to_children>) for user group: `<usersgroupname>` in repo group: `<repo_group_name>`", | |
|
2696 | "success": true | |
|
2697 | } | |
|
2698 | error: null | |
|
2699 | ||
|
2700 | Example error output: | |
|
2701 | ||
|
2702 | .. code-block:: bash | |
|
2703 | ||
|
2704 | id : <id_given_in_input> | |
|
2705 | result : null | |
|
2706 | error : { | |
|
2707 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" | |
|
2708 | } | |
|
2709 | ||
|
2710 | ||
|
2711 | get_gist | |
|
2712 | -------- | |
|
2713 | ||
|
2714 | .. py:function:: get_gist(apiuser, gistid, content=<Optional:False>) | |
|
2715 | ||
|
2716 | Get the specified gist, based on the gist ID. | |
|
2717 | ||
|
2718 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2719 | :type apiuser: AuthUser | |
|
2720 | :param gistid: Set the id of the private or public gist | |
|
2721 | :type gistid: str | |
|
2722 | :param content: Return the gist content. Default is false. | |
|
2723 | :type content: Optional(bool) | |
|
2724 | ||
|
2725 | ||
|
2726 | get_gists | |
|
2727 | --------- | |
|
2728 | ||
|
2729 | .. py:function:: get_gists(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
2730 | ||
|
2731 | Get all gists for given user. If userid is empty returned gists | |
|
2732 | are for user who called the api | |
|
2733 | ||
|
2734 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2735 | :type apiuser: AuthUser | |
|
2736 | :param userid: user to get gists for | |
|
2737 | :type userid: Optional(str or int) | |
|
2738 | ||
|
2739 | ||
|
2740 | create_gist | |
|
2741 | ----------- | |
|
2742 | ||
|
2743 | .. py:function:: create_gist(apiuser, files, owner=<Optional:<OptionalAttr:apiuser>>, gist_type=<Optional:u'public'>, lifetime=<Optional:-1>, acl_level=<Optional:u'acl_public'>, description=<Optional:''>) | |
|
2744 | ||
|
2745 | Creates a new Gist. | |
|
2746 | ||
|
2747 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
2748 | :type apiuser: AuthUser | |
|
2749 | :param files: files to be added to the gist. The data structure has | |
|
2750 | to match the following example:: | |
|
2751 | ||
|
2752 | {'filename': {'content':'...', 'lexer': null}, | |
|
2753 | 'filename2': {'content':'...', 'lexer': null}} | |
|
2754 | ||
|
2755 | :type files: dict | |
|
2756 | :param owner: Set the gist owner, defaults to api method caller | |
|
2757 | :type owner: Optional(str or int) | |
|
2758 | :param gist_type: type of gist ``public`` or ``private`` | |
|
2759 | :type gist_type: Optional(str) | |
|
2760 | :param lifetime: time in minutes of gist lifetime | |
|
2761 | :type lifetime: Optional(int) | |
|
2762 | :param acl_level: acl level for this gist, can be | |
|
2763 | ``acl_public`` or ``acl_private`` If the value is set to | |
|
2764 | ``acl_private`` only logged in users are able to access this gist. | |
|
2765 | If not set it defaults to ``acl_public``. | |
|
2766 | :type acl_level: Optional(str) | |
|
2767 | :param description: gist description | |
|
2768 | :type description: Optional(str) | |
|
2769 | ||
|
2770 | Example output: | |
|
2771 | ||
|
2772 | .. code-block:: bash | |
|
2773 | ||
|
2774 | id : <id_given_in_input> | |
|
2775 | result : { | |
|
2776 | "msg": "created new gist", | |
|
2777 | "gist": {} | |
|
2778 | } | |
|
2779 | error : null | |
|
2780 | ||
|
2781 | Example error output: | |
|
2782 | ||
|
2783 | .. code-block:: bash | |
|
2784 | ||
|
2785 | id : <id_given_in_input> | |
|
2786 | result : null | |
|
2787 | error : { | |
|
2788 | "failed to create gist" | |
|
2789 | } | |
|
2790 | ||
|
2791 | ||
|
2792 | delete_gist | |
|
2793 | ----------- | |
|
2794 | ||
|
2795 | .. py:function:: delete_gist(apiuser, gistid) | |
|
2796 | ||
|
2797 | Deletes existing gist | |
|
2798 | ||
|
2799 | :param apiuser: filled automatically from apikey | |
|
2800 | :type apiuser: AuthUser | |
|
2801 | :param gistid: id of gist to delete | |
|
2802 | :type gistid: str | |
|
2803 | ||
|
2804 | Example output: | |
|
2805 | ||
|
2806 | .. code-block:: bash | |
|
2807 | ||
|
2808 | id : <id_given_in_input> | |
|
2809 | result : { | |
|
2810 | "deleted gist ID: <gist_id>", | |
|
2811 | "gist": null | |
|
2812 | } | |
|
2813 | error : null | |
|
2814 | ||
|
2815 | Example error output: | |
|
2816 | ||
|
2817 | .. code-block:: bash | |
|
2818 | ||
|
2819 | id : <id_given_in_input> | |
|
2820 | result : null | |
|
2821 | error : { | |
|
2822 | "failed to delete gist ID:<gist_id>" | |
|
2823 | } | |
|
2824 | ||
|
199 | methods/license-methods | |
|
200 | methods/deprecated-methods | |
|
201 | methods/gist-methods | |
|
202 | methods/pull-request-methods | |
|
203 | methods/repo-methods | |
|
204 | methods/repo-group-methods | |
|
205 | methods/server-methods | |
|
206 | methods/user-methods | |
|
207 | methods/user-group-methods |
@@ -1,27 +1,27 b'' | |||
|
1 | 1 | .. _code-review-ref: |
|
2 | 2 | |
|
3 | 3 | Code Review |
|
4 | 4 | =========== |
|
5 | 5 | |
|
6 | 6 | |RCM| provides two ways in which you can review code. You can review |prs| or |
|
7 | 7 | commits. To better understand |prs|, see the :ref:`pull-requests-ref` |
|
8 | 8 | and :ref:`collaborate-ref` sections. For more information about why |
|
9 | 9 | code review matters, see these posts on the topic: |
|
10 | 10 | |
|
11 | 11 | * `Code Review - Fix Bugs Early and Often`_ |
|
12 | 12 | * `Code Review - How to Convince a Skeptic`_ |
|
13 | 13 | * `Code Review - Learn How NASA Codes`_ |
|
14 | 14 | |
|
15 | 15 | You can also use the |RCE| API set up continuous integration servers to leave |
|
16 | 16 | comments from a test suite. See the :ref:`api` and |
|
17 |
:ref:` |
|
|
17 | :ref:`extensions-hooks-ref` sections for examples on how to set this up. | |
|
18 | 18 | |
|
19 | 19 | .. toctree:: |
|
20 | 20 | |
|
21 | 21 | review-diffs |
|
22 | 22 | approve-changes |
|
23 | 23 | reviewing-best-practices |
|
24 | 24 | |
|
25 | 25 | .. _Code Review - Fix Bugs Early and Often: https://rhodecode.com/blog/code-review-fix-bugs-early-often/ |
|
26 | 26 | .. _Code Review - How to Convince a Skeptic: https://rhodecode.com/blog/code-review-convince-skeptic/ |
|
27 | 27 | .. _Code Review - Learn How NASA Codes: https://rhodecode.com/blog/code-review-learn-nasa-codes/ |
@@ -1,34 +1,36 b'' | |||
|
1 | 1 | # Try and keep this list alphabetical |
|
2 | 2 | # ui is for user interface elements and messages |
|
3 | 3 | # button - that's obvious |
|
4 | 4 | |
|
5 | 5 | rst_epilog = ''' |
|
6 | 6 | .. |AE| replace:: Appenlight |
|
7 | 7 | .. |authtoken| replace:: Authentication Token |
|
8 | 8 | .. |authtokens| replace:: **Auth Tokens** |
|
9 | .. |RCCEshort| replace:: Community | |
|
10 | .. |RCEEshort| replace:: Enterprise | |
|
9 | 11 | .. |git| replace:: Git |
|
10 | 12 | .. |hg| replace:: Mercurial |
|
11 | 13 | .. |svn| replace:: Subversion |
|
12 | 14 | .. |LDAP| replace:: LDAP / Active Directory |
|
13 | 15 | .. |os| replace:: operating system |
|
14 | 16 | .. |OS| replace:: Operating System |
|
15 | 17 | .. |PY| replace:: Python |
|
16 | 18 | .. |pr| replace:: pull request |
|
17 | 19 | .. |prs| replace:: pull requests |
|
18 | 20 | .. |psf| replace:: Python Software Foundation |
|
19 | 21 | .. |repo| replace:: repository |
|
20 | 22 | .. |repos| replace:: repositories |
|
21 | 23 | .. |RCI| replace:: RhodeCode Control |
|
22 | 24 | .. |RCC| replace:: RhodeCode Control |
|
23 | 25 | .. |RCV| replace:: RhodeCode Enterprise |
|
24 | 26 | .. |RCM| replace:: RhodeCode Enterprise |
|
25 | 27 | .. |RCE| replace:: RhodeCode Enterprise |
|
26 | 28 | .. |RCCE| replace:: RhodeCode Community |
|
27 | 29 | .. |RCEE| replace:: RhodeCode Enterprise |
|
28 | 30 | .. |RCX| replace:: RhodeCode Extensions |
|
29 | 31 | .. |RCT| replace:: RhodeCode Tools |
|
30 | 32 | .. |RCEBOLD| replace:: **RhodeCode Enterprise** |
|
31 | 33 | .. |RCEITALICS| replace:: `RhodeCode Enterprise` |
|
32 | 34 | .. |RC| replace:: RhodeCode |
|
33 | 35 | .. |RNS| replace:: Release Notes |
|
34 | 36 | ''' |
@@ -1,144 +1,157 b'' | |||
|
1 | 1 | .. _dev-setup: |
|
2 | 2 | |
|
3 | 3 | =================== |
|
4 | 4 | Development setup |
|
5 | 5 | =================== |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | RhodeCode Enterprise runs inside a Nix managed environment. This ensures build |
|
9 | 9 | environment dependencies are correctly declared and installed during setup. |
|
10 | 10 | It also enables atomic upgrades, rollbacks, and multiple instances of RhodeCode |
|
11 | 11 | Enterprise running with isolation. |
|
12 | 12 | |
|
13 | 13 | To set up RhodeCode Enterprise inside the Nix environment, use the following steps: |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | Setup Nix Package Manager |
|
18 | 18 | ------------------------- |
|
19 | 19 | |
|
20 | 20 | To install the Nix Package Manager, please run:: |
|
21 | 21 | |
|
22 | 22 | $ curl https://nixos.org/nix/install | sh |
|
23 | 23 | |
|
24 | 24 | or go to https://nixos.org/nix/ and follow the installation instructions. |
|
25 | 25 | Once this is correctly set up on your system, you should be able to use the |
|
26 | 26 | following commands: |
|
27 | 27 | |
|
28 | 28 | * `nix-env` |
|
29 | 29 | |
|
30 | 30 | * `nix-shell` |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | .. tip:: |
|
34 | 34 | |
|
35 | 35 | Update your channels frequently by running ``nix-channel --upgrade``. |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | Switch nix to the latest STABLE channel |
|
39 | 39 | --------------------------------------- |
|
40 | 40 | |
|
41 | 41 | run:: |
|
42 | 42 | |
|
43 | 43 | nix-channel --add https://nixos.org/channels/nixos-16.03 nixpkgs |
|
44 | 44 | |
|
45 | 45 | Followed by:: |
|
46 | 46 | |
|
47 | 47 | nix-channel --update |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | Clone the required repositories |
|
51 | 51 | ------------------------------- |
|
52 | 52 | |
|
53 | 53 | After Nix is set up, clone the RhodeCode Enterprise Community Edition and |
|
54 | 54 | RhodeCode VCSServer repositories into the same directory. |
|
55 | 55 | To do this, use the following example:: |
|
56 | 56 | |
|
57 | 57 | mkdir rhodecode-develop && cd rhodecode-develop |
|
58 | 58 | hg clone https://code.rhodecode.com/rhodecode-enterprise-ce |
|
59 | 59 | hg clone https://code.rhodecode.com/rhodecode-vcsserver |
|
60 | 60 | |
|
61 | 61 | .. note:: |
|
62 | 62 | |
|
63 | 63 | If you cannot clone the repository, please request read permissions |
|
64 | 64 | via support@rhodecode.com |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | |
|
68 | 68 | Enter the Development Shell |
|
69 | 69 | --------------------------- |
|
70 | 70 | |
|
71 | 71 | The final step is to start the development shell. To do this, run the |
|
72 | 72 | following command from inside the cloned repository:: |
|
73 | 73 | |
|
74 | 74 | cd ~/rhodecode-enterprise-ce |
|
75 | 75 | nix-shell |
|
76 | 76 | |
|
77 | 77 | .. note:: |
|
78 | 78 | |
|
79 | 79 | On the first run, this will take a while to download and optionally compile |
|
80 | 80 | a few things. The following runs will be faster. The development shell works |
|
81 | fine on MacOS and Linux platforms. | |
|
81 | fine on both MacOS and Linux platforms. | |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | |
|
85 | 85 | Creating a Development Configuration |
|
86 | 86 | ------------------------------------ |
|
87 | 87 | |
|
88 | 88 | To create a development environment for RhodeCode Enterprise, |
|
89 | 89 | use the following steps: |
|
90 | 90 | |
|
91 | 91 | 1. Create a copy of `~/rhodecode-enterprise-ce/configs/development.ini` |
|
92 | 92 | 2. Adjust the configuration settings to your needs |
|
93 | 93 | |
|
94 |
|
|
|
94 | .. note:: | |
|
95 | 95 | |
|
96 |
|
|
|
96 | It is recommended to use the name `dev.ini`. | |
|
97 | 97 | |
|
98 | 98 | |
|
99 | 99 | Setup the Development Database |
|
100 | 100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
101 | 101 | |
|
102 | 102 | To create a development database, use the following example. This is a one |
|
103 | 103 | time operation:: |
|
104 | 104 | |
|
105 | 105 | paster setup-rhodecode dev.ini \ |
|
106 | 106 | --user=admin --password=secret \ |
|
107 | 107 | --email=admin@example.com \ |
|
108 | 108 | --repos=~/my_dev_repos |
|
109 | 109 | |
|
110 | 110 | |
|
111 | Compile CSS and JavaScript | |
|
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
|
113 | ||
|
114 | To use the application's frontend, you will need to compile the CSS and | |
|
115 | JavaScript with Grunt. This is easily done from within the nix-shell using the | |
|
116 | following command:: | |
|
117 | ||
|
118 | make web-build | |
|
119 | ||
|
120 | You will need to recompile following any changes made to the CSS or JavaScript | |
|
121 | files. | |
|
122 | ||
|
123 | ||
|
111 | 124 | Start the Development Server |
|
112 | 125 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
113 | 126 | |
|
114 | When starting the development server, you should start the vcsserver as a | |
|
115 | separate process. To do this, use one of the following examples: | |
|
127 | From the rhodecode-vcsserver directory, start the development server in another | |
|
128 | nix-shell, using the following command:: | |
|
116 | 129 |
|
|
117 | 1. Set the `start.vcs_server` flag in the ``dev.ini`` file to true. For example: | |
|
130 | pserve configs/development.ini http_port=9900 | |
|
118 | 131 | |
|
119 | .. code-block:: python | |
|
132 | In the adjacent nix-shell which you created for your development server, you may | |
|
133 | now start CE with the following command:: | |
|
120 | 134 | |
|
121 | ### VCS CONFIG ### | |
|
122 | ################## | |
|
123 | vcs.start_server = true | |
|
124 | vcs.server = localhost:9900 | |
|
125 | vcs.server.log_level = debug | |
|
126 | 135 | |
|
127 | Then start the server using the following command: ``rcserver dev.ini`` | |
|
136 | rcserver dev.ini | |
|
128 | 137 | |
|
129 | 2. Start the development server using the following example:: | |
|
130 | ||
|
131 | rcserver --with-vcsserver dev.ini | |
|
138 | .. note:: | |
|
132 | 139 | |
|
133 | 3. Start the development server in a different terminal using the following | |
|
134 | example:: | |
|
135 | ||
|
136 | vcsserver | |
|
140 | To automatically refresh - and recompile the frontend assets - when changes | |
|
141 | are made in the source code, you can use the option `--reload`. | |
|
137 | 142 | |
|
138 | 143 | |
|
139 | 144 | Run the Environment Tests |
|
140 | 145 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
141 | 146 | |
|
142 | 147 | Please make sure that the tests are passing to verify that your environment is |
|
143 | 148 | set up correctly. RhodeCode uses py.test to run tests. |
|
144 | Please simply run ``make test`` to run the basic test suite. | |
|
149 | While your instance is running, start a new nix-shell and simply run | |
|
150 | ``make test`` to run the basic test suite. | |
|
151 | ||
|
152 | ||
|
153 | Need Help? | |
|
154 | ^^^^^^^^^^ | |
|
155 | ||
|
156 | Join us on Slack via https://rhodecode.com/join or post questions in our | |
|
157 | Community Portal at https://community.rhodecode.com |
@@ -1,111 +1,108 b'' | |||
|
1 | 1 | |
|
2 | 2 | ======================= |
|
3 | 3 | Contributing Overview |
|
4 | 4 | ======================= |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | RhodeCode Community Edition is an open source code management platform. We |
|
8 | 8 | encourage contributions to our project from the community. This is a basic |
|
9 | 9 | overview of the procedures for adding your contribution to RhodeCode. |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | |
|
13 | 13 | Check the Issue Tracker |
|
14 | 14 | ======================= |
|
15 | 15 | |
|
16 | 16 | Make an account at https://issues.rhodecode.com/account/register and browse the |
|
17 | 17 | current tickets for bugs to fix and tasks to do. Have a bug or feature that you |
|
18 | 18 | can't find in the tracker? Create a new issue for it. When you select a ticket, |
|
19 | 19 | make sure to assign it to yourself and mark it "in progress" to avoid duplicated |
|
20 | 20 | work. |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | Sign Up at code.rhodecode.com |
|
25 | 25 | ============================= |
|
26 | 26 | |
|
27 | 27 | Make an account at https://code.rhodecode.com/ using an email or your existing |
|
28 | 28 | GitHub, Bitbucket, Google, or Twitter account. Fork the repo you'd like to |
|
29 | 29 | contribute to; we suggest adding your username to the fork name. Clone your fork |
|
30 | 30 | to your computer. We use Mercurial for source control management; see |
|
31 | 31 | https://www.mercurial-scm.org/guide to get started quickly. |
|
32 | 32 | |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | Set Up A Local Instance |
|
36 | 36 | ======================= |
|
37 | 37 | |
|
38 | 38 | You will need to set up an instance of RhodeCode CE using VCSServer so that you |
|
39 | 39 | can see your work locally as you make changes. We recommend using Linux for this |
|
40 | 40 | but it can also be built on OSX. |
|
41 | 41 | |
|
42 | 42 | See :doc:`dev-setup` for instructions. |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | Code! |
|
47 | 47 | ===== |
|
48 | 48 | |
|
49 | 49 | You can now make, see, and test your changes locally. We are always improving to |
|
50 | 50 | keep our code clean and the cost of maintaining it low. This applies in the same |
|
51 | 51 | way for contributions. We run automated checks on our pull requests, and expect |
|
52 | 52 | understandable code. We also aim to provide test coverage for as much of our |
|
53 | 53 | codebase as possible; any new features should be augmented with tests. |
|
54 | 54 | |
|
55 | 55 | Keep in mind that when we accept your contribution, we also take responsibility |
|
56 | 56 | for it; we must understand it to take on that responsibility. |
|
57 | 57 | |
|
58 | 58 | See :doc:`standards` for more detailed information. |
|
59 | 59 | |
|
60 | 60 | |
|
61 | 61 | |
|
62 | 62 | Commit And Push Your Changes |
|
63 | 63 | ============================ |
|
64 | 64 | |
|
65 | 65 | We highly recommend making a new bookmark for each feature, bug, or set of |
|
66 | 66 | commits you make so that you can point to it when creating your pull request. |
|
67 | 67 | Please also reference the ticket number in your commit messages. Don't forget to |
|
68 | 68 | push the bookmark! |
|
69 | 69 | |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | Submit a Pull Request |
|
73 | 73 | ===================== |
|
74 | 74 | |
|
75 | 75 | Go to your fork, and choose "Create Pull Request" from the Options menu. Use |
|
76 | 76 | your bookmark as the source, and choose someone to review it. Don't worry about |
|
77 | 77 | chosing the right person; we'll assign the best contributor for the job. You'll |
|
78 | 78 | get feedback and an assigned status. |
|
79 | 79 | |
|
80 | 80 | Be prepared to make updates to your pull request after some feedback. |
|
81 | 81 | Collaboration is part of the process and improvements can often be made. |
|
82 | 82 | |
|
83 | 83 | |
|
84 | 84 | |
|
85 | 85 | Sign the Contributor License Agreement |
|
86 | 86 | ====================================== |
|
87 | 87 | |
|
88 | 88 | If your contribution is approved, you will need to virtually sign the license |
|
89 |
agreement in order for it to be merged into the project's codebase. |
|
|
90 | it on our website here: https://rhodecode.com/static/pdf/RhodeCode-CLA.pdf | |
|
89 | agreement in order for it to be merged into the project's codebase. | |
|
91 | 90 | |
|
92 | To sign, go to code.rhodecode.com | |
|
93 | and clone the CLA repository. Add your name and make a pull request to add it to | |
|
94 | the contributor agreement; this serves as your virtual signature. Once your | |
|
95 | signature is merged, add a link to the relevant commit to your contribution | |
|
96 | pull request. | |
|
91 | You can read it on our website at https://rhodecode.com/rhodecode-cla | |
|
92 | ||
|
93 | To sign electronically, go to https://rhodecode.com/sign-cla | |
|
97 | 94 | |
|
98 | 95 | |
|
99 | 96 | |
|
100 | 97 | That's it! We'll take it from there. Thanks for your contribution! |
|
101 | 98 | ------------------------------------------------------------------ |
|
102 | 99 | |
|
103 | 100 | .. note:: If you have any questions or comments, feel free to contact us through |
|
104 | 101 | either the community portal(community.rhodecode.com), IRC |
|
105 | 102 | (irc.freenode.net), or Slack (rhodecode.com/join). |
|
106 | 103 | |
|
107 | 104 | |
|
108 | 105 | |
|
109 | 106 | |
|
110 | 107 | |
|
111 | 108 |
@@ -1,134 +1,144 b'' | |||
|
1 | 1 | { system ? builtins.currentSystem |
|
2 | 2 | }: |
|
3 | 3 | |
|
4 | 4 | let |
|
5 | 5 | |
|
6 | 6 | pkgs = import <nixpkgs> { inherit system; }; |
|
7 | 7 | |
|
8 | 8 | inherit (pkgs) fetchurl fetchgit; |
|
9 | 9 | |
|
10 | 10 | buildPythonPackage = pkgs.python27Packages.buildPythonPackage; |
|
11 | 11 | python = pkgs.python27Packages.python; |
|
12 | 12 | |
|
13 | 13 | Jinja2 = buildPythonPackage rec { |
|
14 | 14 | name = "Jinja2-2.7.3"; |
|
15 | 15 | src = fetchurl { |
|
16 | 16 | url = "http://pypi.python.org/packages/source/J/Jinja2/${name}.tar.gz"; |
|
17 | 17 | md5 = "b9dffd2f3b43d673802fe857c8445b1a"; |
|
18 | 18 | }; |
|
19 | 19 | propagatedBuildInputs = [ MarkupSafe ]; |
|
20 | 20 | }; |
|
21 | 21 | |
|
22 | 22 | MarkupSafe = buildPythonPackage rec { |
|
23 | 23 | name = "MarkupSafe-0.23"; |
|
24 | 24 | src = fetchurl { |
|
25 | 25 | url = "https://pypi.python.org/packages/source/M/MarkupSafe/${name}.tar.gz"; |
|
26 | 26 | md5 = "f5ab3deee4c37cd6a922fb81e730da6e"; |
|
27 | 27 | }; |
|
28 | 28 | }; |
|
29 | 29 | |
|
30 | 30 | Pygments = buildPythonPackage rec { |
|
31 |
name = "Pygments-2. |
|
|
31 | name = "Pygments-2.1.3"; | |
|
32 | doCheck = false; | |
|
32 | 33 | src = fetchurl { |
|
33 |
url = "https://pypi.python.org/packages/ |
|
|
34 | md5 = "238587a1370d62405edabd0794b3ec4a"; | |
|
34 | url = "https://pypi.python.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz"; | |
|
35 | md5 = "ed3fba2467c8afcda4d317e4ef2c6150"; | |
|
35 | 36 | }; |
|
36 | 37 | }; |
|
37 | 38 | |
|
38 | 39 | alabaster = buildPythonPackage rec { |
|
39 | 40 | name = "alabaster-0.7.3"; |
|
40 | 41 | src = fetchurl { |
|
41 | 42 | url = "https://pypi.python.org/packages/source/a/alabaster/${name}.tar.gz"; |
|
42 | 43 | md5 = "67428d1383fd833f1282fed5deba0898"; |
|
43 | 44 | }; |
|
44 | 45 | }; |
|
45 | 46 | |
|
46 | 47 | six = buildPythonPackage rec { |
|
47 | 48 | name = "six-1.9.0"; |
|
48 | 49 | src = fetchurl { |
|
49 | 50 | url = "https://pypi.python.org/packages/source/s/six/${name}.tar.gz"; |
|
50 | 51 | md5 = "476881ef4012262dfc8adc645ee786c4"; |
|
51 | 52 | }; |
|
52 | 53 | }; |
|
53 | 54 | |
|
54 | 55 | snowballstemmer = buildPythonPackage rec { |
|
55 | 56 | name = "snowballstemmer-1.2.0"; |
|
56 | 57 | src = fetchurl { |
|
57 | 58 | url = "https://pypi.python.org/packages/source/s/snowballstemmer/${name}.tar.gz"; |
|
58 | 59 | md5 = "51f2ef829db8129dd0f2354f0b209970"; |
|
59 | 60 | }; |
|
60 | 61 | }; |
|
61 | 62 | |
|
62 | 63 | pytz = buildPythonPackage rec { |
|
63 | 64 | name = "pytz-2015.2"; |
|
64 | 65 | src = fetchurl { |
|
65 | 66 | url = "https://pypi.python.org/packages/source/p/pytz/${name}.tar.gz"; |
|
66 | 67 | md5 = "08440d994cfbbf13d3343362cc3173f7"; |
|
67 | 68 | }; |
|
68 | 69 | }; |
|
69 | 70 | |
|
70 | 71 | babel = buildPythonPackage rec { |
|
71 | 72 | name = "Babel-1.3"; |
|
72 | 73 | src = fetchurl { |
|
73 | 74 | url = "https://pypi.python.org/packages/source/B/Babel/${name}.tar.gz"; |
|
74 | 75 | md5 = "5264ceb02717843cbc9ffce8e6e06bdb"; |
|
75 | 76 | }; |
|
76 | 77 | propagatedBuildInputs = [ |
|
77 | 78 | pytz |
|
78 | 79 | ]; |
|
79 | 80 | }; |
|
80 | 81 | |
|
81 |
|
|
|
82 |
name = " |
|
|
82 | imagesize = buildPythonPackage rec { | |
|
83 | name = "imagesize-0.7.1"; | |
|
83 | 84 | src = fetchurl { |
|
84 |
url = "http://pypi.python.org/packages/ |
|
|
85 | md5 = "8786a194acf9673464c5455b11fd4332"; | |
|
85 | url = "https://pypi.python.org/packages/53/72/6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826/${name}.tar.gz"; | |
|
86 | md5 = "976148283286a6ba5f69b0f81aef8052"; | |
|
87 | }; | |
|
88 | }; | |
|
89 | ||
|
90 | Sphinx = buildPythonPackage (rec { | |
|
91 | name = "Sphinx-1.4.4"; | |
|
92 | src = fetchurl { | |
|
93 | url = "https://pypi.python.org/packages/20/a2/72f44c84f6c4115e3fef58d36d657ec311d80196eab9fd5ec7bcde76143b/${name}.tar.gz"; | |
|
94 | md5 = "64ce2ec08d37ed56313a98232cbe2aee"; | |
|
86 | 95 | }; |
|
87 | 96 | propagatedBuildInputs = [ |
|
88 | 97 | docutils |
|
89 | 98 | Jinja2 |
|
90 | 99 | Pygments |
|
91 | 100 | alabaster |
|
92 | 101 | six |
|
93 | 102 | snowballstemmer |
|
94 | 103 | pytz |
|
95 | 104 | babel |
|
105 | imagesize | |
|
96 | 106 | |
|
97 | 107 | # TODO: johbo: Had to include it here so that can be imported |
|
98 | 108 | sphinx_rtd_theme |
|
99 | 109 | ]; |
|
100 | 110 | }); |
|
101 | 111 | |
|
102 | 112 | docutils = buildPythonPackage rec { |
|
103 | 113 | name = "docutils-0.12"; |
|
104 | 114 | src = fetchurl { |
|
105 | 115 | url = "https://pypi.python.org/packages/source/d/docutils/${name}.tar.gz"; |
|
106 | 116 | md5 = "4622263b62c5c771c03502afa3157768"; |
|
107 | 117 | }; |
|
108 | 118 | }; |
|
109 | 119 | |
|
110 | 120 | sphinx_rtd_theme = buildPythonPackage rec { |
|
111 | 121 | name = "sphinx_rtd_theme-0.1.9"; |
|
112 | 122 | src = fetchurl { |
|
113 | 123 | url = "https://pypi.python.org/packages/source/s/sphinx_rtd_theme/${name}.tar.gz"; |
|
114 | 124 | md5 = "86a25c8d47147c872e42dc84cc66f97b"; |
|
115 | 125 | }; |
|
116 | 126 | |
|
117 | 127 | # Note: johbo: Sphinx needs this package and this package needs sphinx, |
|
118 | 128 | # ignore the requirements file to solve this cycle. |
|
119 | 129 | postPatch = '' |
|
120 | 130 | rm requirements.txt |
|
121 | 131 | touch requirements.txt |
|
122 | 132 | ''; |
|
123 | 133 | |
|
124 | 134 | # TODO: johbo: Tests would require sphinx and this creates recursion issues |
|
125 | 135 | doCheck = false; |
|
126 | 136 | }; |
|
127 | 137 | |
|
128 | 138 | in python.buildEnv.override { |
|
129 | 139 | inherit python; |
|
130 | 140 | extraLibs = [ |
|
131 | 141 | Sphinx |
|
132 | 142 | sphinx_rtd_theme |
|
133 | 143 | ]; |
|
134 | 144 | } |
|
1 | NO CONTENT: file renamed from docs/integrations/config-ext.rst to docs/extensions/config-ext.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/example-ext.py to docs/extensions/example-ext.py |
|
1 | NO CONTENT: file renamed from docs/integrations/extensions.rst to docs/extensions/extensions.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/full-blown-example.rst to docs/extensions/full-blown-example.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/hooks.rst to docs/extensions/hooks.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/install-ext.rst to docs/extensions/install-ext.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/int-slack.rst to docs/extensions/int-slack.rst |
|
1 | NO CONTENT: file renamed from docs/integrations/rcx.rst to docs/extensions/rcx.rst |
@@ -1,84 +1,85 b'' | |||
|
1 | 1 | |RCM| |
|
2 | 2 | ===== |
|
3 | 3 | |
|
4 | 4 | |RCM| is a high-performance source code management and collaboration system. |
|
5 | 5 | It enables you to develop projects securely behind the firewall while |
|
6 | 6 | providing collaboration tools that work with |git|, |hg|, |
|
7 | 7 | and |svn| |repos|. The user interface allows you to create, edit, |
|
8 | 8 | and commit files and |repos| while managing their security permissions. |
|
9 | 9 | |
|
10 | 10 | |RCM| provides the following features: |
|
11 | 11 | |
|
12 | 12 | * Source code management. |
|
13 | 13 | * Extended permissions management. |
|
14 | 14 | * Integrated code collaboration tools. |
|
15 | 15 | * Integrated code review and notifications. |
|
16 | 16 | * Scalability provided by multi-node setup. |
|
17 | 17 | * Fully programmable automation API. |
|
18 | 18 | * Web-based hook management. |
|
19 | 19 | * Native |svn| support. |
|
20 | 20 | * Migration from existing databases. |
|
21 | 21 | * |RCM| SDK. |
|
22 | 22 | * Built-in analytics |
|
23 | 23 | * Pluggable authentication system. |
|
24 | 24 | * Support for |LDAP|, Crowd, CAS, PAM. |
|
25 | 25 | * Debug modes of operation. |
|
26 | 26 | * Private and public gists. |
|
27 | 27 | * Gists with limited lifetimes and within instance only sharing. |
|
28 | 28 | * Fully integrated code search function. |
|
29 | 29 | * Always on SSL connectivity. |
|
30 | 30 | |
|
31 | 31 | .. only:: html |
|
32 | 32 | |
|
33 | 33 | Table of Contents |
|
34 | 34 | ----------------- |
|
35 | 35 | |
|
36 | 36 | .. toctree:: |
|
37 | 37 | :maxdepth: 1 |
|
38 | 38 | :caption: Admin Documentation |
|
39 | 39 | |
|
40 | 40 | install/quick-start |
|
41 | 41 | install/install-database |
|
42 | 42 | install/install-steps |
|
43 | 43 | admin/system-overview |
|
44 | 44 | nix/default-env |
|
45 | 45 | admin/system-admin |
|
46 | 46 | admin/user-admin |
|
47 | 47 | admin/setting-repo-perms |
|
48 | 48 | admin/security-tips |
|
49 | 49 | auth/auth |
|
50 | 50 | issue-trackers/issue-trackers |
|
51 | 51 | admin/lab-settings |
|
52 | 52 | |
|
53 | 53 | .. toctree:: |
|
54 | 54 | :maxdepth: 1 |
|
55 | 55 | :caption: Feature Documentation |
|
56 | 56 | |
|
57 | 57 | collaboration/collaboration |
|
58 | 58 | collaboration/review-notifications |
|
59 | 59 | collaboration/pull-requests |
|
60 | 60 | code-review/code-review |
|
61 | integrations/integrations | |
|
61 | 62 | |
|
62 | 63 | .. toctree:: |
|
63 | 64 | :maxdepth: 1 |
|
64 | 65 | :caption: Developer Documentation |
|
65 | 66 | |
|
66 | 67 | api/api |
|
67 | 68 | tools/rhodecode-tools |
|
68 | integrations/integrations | |
|
69 | extensions/extensions-hooks | |
|
69 | 70 | contributing/contributing |
|
70 | 71 | |
|
71 | 72 | .. toctree:: |
|
72 | 73 | :maxdepth: 1 |
|
73 | 74 | :caption: User Documentation |
|
74 | 75 | |
|
75 | 76 | usage/basic-usage |
|
76 | 77 | tutorials/tutorials |
|
77 | 78 | |
|
78 | 79 | .. toctree:: |
|
79 | 80 | :maxdepth: 1 |
|
80 | 81 | :caption: About |
|
81 | 82 | |
|
82 | 83 | known-issues/known-issues |
|
83 | 84 | release-notes/release-notes |
|
84 | 85 | admin/glossary |
@@ -1,109 +1,109 b'' | |||
|
1 | 1 | .. _quick-start: |
|
2 | 2 | |
|
3 | Quick Start Guide | |
|
4 | ================= | |
|
3 | Quick Start Installation Guide | |
|
4 | ============================== | |
|
5 | 5 | |
|
6 | 6 | .. important:: |
|
7 | 7 | |
|
8 | 8 | These are quick start instructions. To optimize your |RCE|, |
|
9 | 9 | |RCC|, and |RCT| usage, read the more detailed instructions in our guides. |
|
10 | 10 | For detailed installation instructions, see |
|
11 | 11 | :ref:`RhodeCode Control Documentation <control:rcc>` |
|
12 | 12 | |
|
13 | 13 | .. tip:: |
|
14 | 14 | |
|
15 | 15 | If using a non-SQLite database, install and configure the database, create |
|
16 | 16 | a new user, and grant permissions. You will be prompted for this user's |
|
17 | 17 | credentials during |RCE| installation. See the relevant database |
|
18 | 18 | documentation for more details. |
|
19 | 19 | |
|
20 | 20 | To get |RCE| up and running, run through the below steps: |
|
21 | 21 | |
|
22 | 22 | 1. Download the latest |RCC| installer from your `rhodecode.com`_ profile |
|
23 | 23 | or main page. |
|
24 | 24 | If you don't have an account, sign up at `rhodecode.com/register`_. |
|
25 | 25 | |
|
26 | 26 | 2. Run the |RCC| installer and accept the End User Licence using the |
|
27 | 27 | following example: |
|
28 | 28 | |
|
29 | 29 | .. code-block:: bash |
|
30 | 30 | |
|
31 | 31 | $ chmod 755 RhodeCode-installer-linux-* |
|
32 | 32 | $ ./RhodeCode-installer-linux-* |
|
33 | 33 | |
|
34 | 34 | 3. Install a VCS Server, and configure it to start at boot. |
|
35 | 35 | |
|
36 | 36 | .. code-block:: bash |
|
37 | 37 | |
|
38 | 38 | $ rccontrol install VCSServer |
|
39 | 39 | |
|
40 | 40 | Agree to the licence agreement? [y/N]: y |
|
41 | 41 | IP to start the server on [127.0.0.1]: |
|
42 | 42 | Port for the server to start [10005]: |
|
43 | 43 | Creating new instance: vcsserver-1 |
|
44 | 44 | Installing RhodeCode VCSServer |
|
45 | 45 | Configuring RhodeCode VCS Server ... |
|
46 | 46 | Supervisord state is: RUNNING |
|
47 | 47 | Added process group vcsserver-1 |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | 4. Install |RCEE| or |RCCE|. If using MySQL or PostgreSQL, during |
|
51 | 51 | installation you'll be asked for your database credentials, so have them at hand. |
|
52 | 52 | Mysql or Postgres needs to be running and a new database needs to be created. |
|
53 | 53 | You don't need any credentials or to create a database for SQLite. |
|
54 | 54 | |
|
55 | 55 | .. code-block:: bash |
|
56 | 56 | :emphasize-lines: 11-16 |
|
57 | 57 | |
|
58 | 58 | $ rccontrol install Community |
|
59 | 59 | |
|
60 | 60 | or |
|
61 | 61 | |
|
62 | 62 | $ rccontrol install Enterprise |
|
63 | 63 | |
|
64 | 64 | Username [admin]: username |
|
65 | 65 | Password (min 6 chars): |
|
66 | 66 | Repeat for confirmation: |
|
67 | 67 | Email: your@mail.com |
|
68 | 68 | Respositories location [/home/brian/repos]: |
|
69 | 69 | IP to start the Enterprise server on [127.0.0.1]: |
|
70 | 70 | Port for the Enterprise server to use [10004]: |
|
71 | 71 | Database type - [s]qlite, [m]ysql, [p]ostresql: |
|
72 | 72 | PostgreSQL selected |
|
73 | 73 | Database host [127.0.0.1]: |
|
74 | 74 | Database port [5432]: |
|
75 | 75 | Database username: db-user-name |
|
76 | 76 | Database password: somepassword |
|
77 | 77 | Database name: example-db-name |
|
78 | 78 | |
|
79 | 79 | 5. Check the status of your installation. You |RCEE|/|RCCE| instance runs |
|
80 | 80 | on the URL displayed in the status message. |
|
81 | 81 | |
|
82 | 82 | .. code-block:: bash |
|
83 | 83 | |
|
84 | 84 | $ rccontrol status |
|
85 | 85 | |
|
86 | 86 | - NAME: enterprise-1 |
|
87 | 87 | - STATUS: RUNNING |
|
88 | 88 | - TYPE: Enterprise |
|
89 | 89 | - VERSION: 4.1.0 |
|
90 | 90 | - URL: http://127.0.0.1:10003 |
|
91 | 91 | |
|
92 | 92 | - NAME: vcsserver-1 |
|
93 | 93 | - STATUS: RUNNING |
|
94 | 94 | - TYPE: VCSServer |
|
95 | 95 | - VERSION: 4.1.0 |
|
96 | 96 | - URL: http://127.0.0.1:10001 |
|
97 | 97 | |
|
98 | 98 | .. note:: |
|
99 | 99 | |
|
100 | 100 | Recommended post quick start install instructions: |
|
101 | 101 | |
|
102 | 102 | * Read the documentation |
|
103 | 103 | * Carry out the :ref:`rhodecode-post-instal-ref` |
|
104 | 104 | * Set up :ref:`indexing-ref` |
|
105 | 105 | * Familiarise yourself with the :ref:`rhodecode-admin-ref` section. |
|
106 | 106 | |
|
107 | 107 | .. _rhodecode.com/download/: https://rhodecode.com/download/ |
|
108 | 108 | .. _rhodecode.com: https://rhodecode.com/ |
|
109 | 109 | .. _rhodecode.com/register: https://rhodecode.com/register/ |
@@ -1,25 +1,52 b'' | |||
|
1 |
.. _integrations |
|
|
1 | .. _integrations: | |
|
2 | ||
|
3 | Integrations | |
|
4 | ------------ | |
|
2 | 5 | |
|
3 | Integrations and Extensions | |
|
4 | =========================== | |
|
6 | Rhodecode supports integrations with external services for various events, | |
|
7 | such as commit pushes and pull requests. Multiple integrations of the same type | |
|
8 | can be added at the same time; this is useful for posting different events to | |
|
9 | different Slack channels, for example. | |
|
5 | 10 | |
|
6 | The integrations section references three concepts regularly, | |
|
7 | so to clarify what is meant each time, read the following definitions: | |
|
11 | Supported integrations | |
|
12 | ^^^^^^^^^^^^^^^^^^^^^^ | |
|
8 | 13 | |
|
9 | * **Plugin**: A Plugin is software that adds a specific feature to | |
|
10 | an existing software application. | |
|
11 | * **Extension**: An extension extends the capabilities of, | |
|
12 | or the data available to, an existing software application. | |
|
13 | * **Hook**: A hook intercepts function calls, messages, or events passed | |
|
14 | between software components and can be used to trigger plugins, or their | |
|
15 | extensions. | |
|
14 | ============================ ============ ===================================== | |
|
15 | Type/Name |RC| Edition Description | |
|
16 | ============================ ============ ===================================== | |
|
17 | :ref:`integrations-slack` |RCCEshort| https://slack.com/ | |
|
18 | :ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/ | |
|
19 | :ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url | |
|
20 | :ref:`integrations-email` |RCEEshort| Send repo push commits by email | |
|
21 | :ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues | |
|
22 | :ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues | |
|
23 | ============================ ============ ===================================== | |
|
24 | ||
|
25 | .. _creating-integrations: | |
|
26 | ||
|
27 | Creating an Integration | |
|
28 | ^^^^^^^^^^^^^^^^^^^^^^^ | |
|
29 | ||
|
30 | Integrations can be added globally via the admin UI: | |
|
31 | ||
|
32 | :menuselection:`Admin --> Integrations` | |
|
33 | ||
|
34 | or per repository in each repository's settings: | |
|
35 | ||
|
36 | :menuselection:`Admin --> Repositories --> Edit --> Integrations` | |
|
37 | ||
|
38 | To create an integration, select the type from the list in the *Create New | |
|
39 | Integration* section. | |
|
40 | ||
|
41 | The *Current Integrations* section shows existing integrations that have been | |
|
42 | created along with their type (eg. Slack) and enabled status. | |
|
43 | ||
|
44 | See pages specific to each type of integration for more instructions: | |
|
16 | 45 | |
|
17 | 46 | .. toctree:: |
|
18 | 47 | |
|
19 | rcx | |
|
20 | install-ext | |
|
21 | config-ext | |
|
22 | extensions | |
|
23 |
hook |
|
|
24 | full-blown-example | |
|
25 | int-slack | |
|
48 | slack | |
|
49 | hipchat | |
|
50 | redmine | |
|
51 | jira | |
|
52 | webhook |
@@ -1,82 +1,81 b'' | |||
|
1 | 1 | .. _rhodecode-issue-trackers-ref: |
|
2 | 2 | |
|
3 | 3 | Issue Tracker Integration |
|
4 | 4 | ========================= |
|
5 | 5 | |
|
6 | 6 | You can set an issue tracker connection in two ways with |RCE|. |
|
7 | 7 | |
|
8 | * At instance level you can set a default issue tracker. | |
|
9 | * At |repo| level you can configure an integration with a different issue | |
|
8 | * At the instance level, you can set a default issue tracker. | |
|
9 | * At the |repo| level, you can configure an integration with a different issue | |
|
10 | 10 | tracker. |
|
11 | 11 | |
|
12 | To integrate |RCM| with an issue tracker you need to define a regular | |
|
13 | expression that will fetch the issue ID stored in commit messages and replace | |
|
12 | To integrate |RCM| with an issue tracker, you need to define a regular | |
|
13 | expression that will fetch the issue ID stored in commit messages, and replace | |
|
14 | 14 | it with a URL. This enables |RCE| to generate a link matching each issue to the |
|
15 | 15 | target |repo|. |
|
16 | 16 | |
|
17 | 17 | Default Issue Tracker Configuration |
|
18 | 18 | ----------------------------------- |
|
19 | 19 | |
|
20 | 20 | To integrate your issue tracker, use the following steps: |
|
21 | 21 | |
|
22 | 22 | 1. Open :menuselection:`Admin --> Settings --> Issue Tracker`. |
|
23 | 23 | 2. In the new entry field, enter the following information: |
|
24 | 24 | |
|
25 | 25 | * :guilabel:`Description`: A name for this set of rules. |
|
26 | 26 | * :guilabel:`Pattern`: The regular expression that will match issues |
|
27 | 27 | tagged in commit messages, or more see :ref:`issue-tr-eg-ref`. |
|
28 | 28 | * :guilabel:`URL`: The URL to your issue tracker. |
|
29 | 29 | * :guilabel:`Prefix`: The prefix with which you want to mark issues. |
|
30 | 30 | |
|
31 | 31 | 3. Select **Add** so save the rule to your issue tracker configuration. |
|
32 | 32 | |
|
33 | 33 | Repository Issue Tracker Configuration |
|
34 | 34 | -------------------------------------- |
|
35 | 35 | |
|
36 |
You can configure specific |repos| to use a different issue tracker |
|
|
37 |
|
|
|
38 | :ref:`repo-it` | |
|
36 | You can configure specific |repos| to use a different issue tracker than the | |
|
37 | default one. See the instructions in :ref:`repo-it` | |
|
39 | 38 | |
|
40 | 39 | .. _issue-tr-eg-ref: |
|
41 | 40 | |
|
42 | 41 | Jira Integration |
|
43 | 42 | ---------------- |
|
44 | 43 | |
|
45 | 44 | * Regex = ``(?:^#|\s#)(\w+-\d+)`` |
|
46 | 45 | * URL = ``https://myissueserver.com/issue/${id}`` |
|
47 | 46 | * Issue Prefix = ``#`` |
|
48 | 47 | |
|
49 | 48 | Confluence (Wiki) |
|
50 | 49 | ----------------- |
|
51 | 50 | |
|
52 | 51 | * Regex = ``(?:conf-)([A-Z0-9]+)`` |
|
53 | 52 | * URL = ``https://example.atlassian.net/display/wiki/${id}/${repo_name}`` |
|
54 | 53 | * issue prefix = ``CONF-`` |
|
55 | 54 | |
|
56 | 55 | Redmine Integration |
|
57 | 56 | ------------------- |
|
58 | 57 | |
|
59 | 58 | * Regex = ``(issue-+\d+)`` |
|
60 | 59 | * URL = ``https://myissueserver.com/redmine/issue/${id}`` |
|
61 | 60 | * Issue Prefix = ``issue-`` |
|
62 | 61 | |
|
63 | 62 | Redmine (wiki) |
|
64 | 63 | -------------- |
|
65 | 64 | |
|
66 | 65 | * Regex = ``(?:wiki-)([a-zA-Z0-9]+)`` |
|
67 | 66 | * URL = ``https://example.com/redmine/projects/wiki/${repo_name}`` |
|
68 | 67 | * Issue prefix = ``Issue-`` |
|
69 | 68 | |
|
70 | 69 | Pivotal Tracker |
|
71 | 70 | --------------- |
|
72 | 71 | |
|
73 | 72 | * Regex = ``(?:pivot-)(?<project_id>\d+)-(?<story>\d+)`` |
|
74 | 73 | * URL = ``https://www.pivotaltracker.com/s/projects/${project_id}/stories/${story}`` |
|
75 | 74 | * Issue prefix = ``Piv-`` |
|
76 | 75 | |
|
77 | 76 | Trello |
|
78 | 77 | ------ |
|
79 | 78 | |
|
80 | 79 | * Regex = ``(?:trello-)(?<card_id>[a-zA-Z0-9]+)`` |
|
81 | 80 | * URL = ``https://trello.com/example.com/${card_id}`` |
|
82 | 81 | * Issue prefix = ``Trello-`` |
@@ -1,14 +1,14 b'' | |||
|
1 | 1 | |RCE| 4.2.1 |RNS| |
|
2 | 2 | ----------------- |
|
3 | 3 | |
|
4 | 4 | Release Date |
|
5 | 5 | ^^^^^^^^^^^^ |
|
6 | 6 | |
|
7 | 7 | - 2016-07-04 |
|
8 | 8 | |
|
9 | 9 | Fixes |
|
10 | 10 | ^^^^^ |
|
11 | 11 | |
|
12 |
- |
|
|
13 |
- |
|
|
14 |
- |
|
|
12 | - UI: fixed empty labels caused by missing translation of JS components. | |
|
13 | - Login: fixed bad routing URL in comments when user is not logged in. | |
|
14 | - Celery: make sure to run tasks in sync mode if connection to celery is lost. |
@@ -1,84 +1,85 b'' | |||
|
1 | 1 | .. _rhodecode-release-notes-ref: |
|
2 | 2 | |
|
3 | 3 | Release Notes |
|
4 | 4 | ============= |
|
5 | 5 | |
|
6 | 6 | |RCE| 4.x Versions |
|
7 | 7 | ------------------ |
|
8 | 8 | |
|
9 | 9 | .. toctree:: |
|
10 | 10 | :maxdepth: 1 |
|
11 | 11 | |
|
12 | release-notes-4.3.0.rst | |
|
12 | 13 | release-notes-4.2.1.rst |
|
13 | 14 | release-notes-4.2.0.rst |
|
14 | 15 | release-notes-4.1.2.rst |
|
15 | 16 | release-notes-4.1.1.rst |
|
16 | 17 | release-notes-4.1.0.rst |
|
17 | 18 | release-notes-4.0.1.rst |
|
18 | 19 | release-notes-4.0.0.rst |
|
19 | 20 | |
|
20 | 21 | |RCE| 3.x Versions |
|
21 | 22 | ------------------ |
|
22 | 23 | |
|
23 | 24 | .. toctree:: |
|
24 | 25 | :maxdepth: 1 |
|
25 | 26 | |
|
26 | 27 | release-notes-3.8.4.rst |
|
27 | 28 | release-notes-3.8.3.rst |
|
28 | 29 | release-notes-3.8.2.rst |
|
29 | 30 | release-notes-3.8.1.rst |
|
30 | 31 | release-notes-3.8.0.rst |
|
31 | 32 | release-notes-3.7.1.rst |
|
32 | 33 | release-notes-3.7.0.rst |
|
33 | 34 | release-notes-3.6.1.rst |
|
34 | 35 | release-notes-3.6.0.rst |
|
35 | 36 | release-notes-3.5.2.rst |
|
36 | 37 | release-notes-3.5.1.rst |
|
37 | 38 | release-notes-3.5.0.rst |
|
38 | 39 | release-notes-3.4.1.rst |
|
39 | 40 | release-notes-3.4.0.rst |
|
40 | 41 | release-notes-3.3.4.rst |
|
41 | 42 | release-notes-3.3.3.rst |
|
42 | 43 | release-notes-3.3.2.rst |
|
43 | 44 | release-notes-3.3.1.rst |
|
44 | 45 | release-notes-3.3.0.rst |
|
45 | 46 | release-notes-3.2.3.rst |
|
46 | 47 | release-notes-3.2.2.rst |
|
47 | 48 | release-notes-3.2.1.rst |
|
48 | 49 | release-notes-3.2.0.rst |
|
49 | 50 | release-notes-3.1.1.rst |
|
50 | 51 | release-notes-3.1.0.rst |
|
51 | 52 | release-notes-3.0.2.rst |
|
52 | 53 | release-notes-3.0.1.rst |
|
53 | 54 | release-notes-3.0.0.rst |
|
54 | 55 | |
|
55 | 56 | |RCE| 2.x Versions |
|
56 | 57 | ------------------ |
|
57 | 58 | |
|
58 | 59 | .. toctree:: |
|
59 | 60 | :maxdepth: 1 |
|
60 | 61 | |
|
61 | 62 | release-notes-2.2.8.rst |
|
62 | 63 | release-notes-2.2.7.rst |
|
63 | 64 | release-notes-2.2.6.rst |
|
64 | 65 | release-notes-2.2.5.rst |
|
65 | 66 | release-notes-2.2.4.rst |
|
66 | 67 | release-notes-2.2.3.rst |
|
67 | 68 | release-notes-2.2.2.rst |
|
68 | 69 | release-notes-2.2.1.rst |
|
69 | 70 | release-notes-2.2.0.rst |
|
70 | 71 | release-notes-2.1.0.rst |
|
71 | 72 | release-notes-2.0.2.rst |
|
72 | 73 | release-notes-2.0.1.rst |
|
73 | 74 | release-notes-2.0.0.rst |
|
74 | 75 | |
|
75 | 76 | |RCE| 1.x Versions |
|
76 | 77 | ------------------ |
|
77 | 78 | |
|
78 | 79 | .. toctree:: |
|
79 | 80 | :maxdepth: 1 |
|
80 | 81 | |
|
81 | 82 | release-notes-1.7.2.rst |
|
82 | 83 | release-notes-1.7.1.rst |
|
83 | 84 | release-notes-1.7.0.rst |
|
84 | 85 | release-notes-1.6.0.rst |
@@ -1,677 +1,677 b'' | |||
|
1 | 1 | .. _tools-cli: |
|
2 | 2 | |
|
3 | 3 | |RCT| CLI |
|
4 | 4 | --------- |
|
5 | 5 | |
|
6 | 6 | The commands available with |RCT| can be split into three categories: |
|
7 | 7 | |
|
8 | 8 | - Remotely executable commands that can be run from your local machine once you |
|
9 | 9 | have your connection details to |RCE| configured. |
|
10 | 10 | - Locally executable commands the can be run on the server to carry out |
|
11 | 11 | general maintenance. |
|
12 | 12 | - Local configuration commands used to help set up your |RCT| configuration. |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | rhodecode-tools |
|
16 | 16 | --------------- |
|
17 | 17 | |
|
18 | 18 | Use |RCT| to setup automation, run the indexer, and install extensions for |
|
19 | 19 | your |RCM| instances. Options: |
|
20 | 20 | |
|
21 | 21 | .. rst-class:: dl-horizontal |
|
22 | 22 | |
|
23 | 23 | \ - -apihost <api_host> |
|
24 | 24 | Set the API host value. |
|
25 | 25 | |
|
26 | 26 | \ - -apikey <apikey_value> |
|
27 | 27 | Set the API key value. |
|
28 | 28 | |
|
29 | 29 | \-c, - -config <config_file> |
|
30 | 30 | Create a configuration file. The default file is created |
|
31 | 31 | in ``~/.rhoderc`` |
|
32 | 32 | |
|
33 | 33 | \ - -save-config |
|
34 | 34 | Save the configuration file. |
|
35 | 35 | |
|
36 | 36 | \ - -show-config |
|
37 | 37 | Show the current configuration values. |
|
38 | 38 | |
|
39 | 39 | \ - -format {json,pretty} |
|
40 | 40 | Set the formatted representation. |
|
41 | 41 | |
|
42 | 42 | Example usage: |
|
43 | 43 | |
|
44 | 44 | .. code-block:: bash |
|
45 | 45 | |
|
46 | 46 | $ rhodecode-tools --apikey=key --apihost=http://rhodecode.server \ |
|
47 | 47 | --save-config |
|
48 | 48 | |
|
49 | 49 | rhodecode-api |
|
50 | 50 | ------------- |
|
51 | 51 | |
|
52 | 52 | The |RC| API lets you connect to |RCE| and carry out management tasks from a |
|
53 | 53 | remote machine, for more information about the API, see the :ref:`api`. To |
|
54 | 54 | pass arguments on the command-line use the ``method:option`` syntax. |
|
55 | 55 | |
|
56 | 56 | Example usage: |
|
57 | 57 | |
|
58 | 58 | .. code-block:: bash |
|
59 | 59 | |
|
60 | 60 | # Run the get_repos API call and sample output |
|
61 | 61 | $ rhodecode-api --instance-name=enterprise-1 create_repo \ |
|
62 | 62 | repo_name:brand-new repo_type:hg description:repo-desc |
|
63 | 63 | |
|
64 | 64 | { |
|
65 | 65 | "error": null, |
|
66 | 66 | "id": 1110, |
|
67 | 67 | "result": { |
|
68 | 68 | "msg": "Created new repository `brand-new`", |
|
69 | 69 | "success": true, |
|
70 | 70 | "task": null |
|
71 | 71 | } |
|
72 | 72 | } |
|
73 | 73 | |
|
74 | 74 | Options: |
|
75 | 75 | |
|
76 | 76 | .. rst-class:: dl-horizontal |
|
77 | 77 | |
|
78 | 78 | \ - -api-cache-only |
|
79 | 79 | Requires a cache to be present when running this call |
|
80 | 80 | |
|
81 | 81 | \ - -api-cache-rebuild |
|
82 | 82 | Replaces existing cached values with new ones from server |
|
83 | 83 | |
|
84 | 84 | \ - -api-cache <PATH> |
|
85 | 85 | Use a special cache dir to read responses from instead of the server |
|
86 | 86 | |
|
87 | 87 | \ - -api-cert-verify |
|
88 | 88 | Verify the endpoint ssl certificate |
|
89 | 89 | |
|
90 | 90 | \ - -api-cert <PATH> |
|
91 | 91 | Path to alternate CA bundle. |
|
92 | 92 | |
|
93 | 93 | \ - -apihost <api_host> |
|
94 | 94 | Set the API host value. |
|
95 | 95 | |
|
96 | 96 | \ - -apikey <apikey_value> |
|
97 | 97 | Set the API key value. |
|
98 | 98 | |
|
99 | 99 | \ - -instance-name <instance-id> |
|
100 | 100 | Set the instance name |
|
101 | 101 | |
|
102 | 102 | \-I, - -install-dir <DIR> |
|
103 | 103 | Location of application instances |
|
104 | 104 | |
|
105 | 105 | \-c, - -config <.rhoderc-file> |
|
106 | 106 | Location of the :file:`.rhoderc` |
|
107 | 107 | |
|
108 | 108 | \-F, - -format {json,pretty} |
|
109 | 109 | Set the formatted representation. |
|
110 | 110 | |
|
111 | 111 | \-h, - -help |
|
112 | 112 | Show help messages. |
|
113 | 113 | |
|
114 | 114 | \-v, - -verbose |
|
115 | 115 | Enable verbose messaging |
|
116 | 116 | |
|
117 | 117 | rhodecode-cleanup-gists |
|
118 | 118 | ----------------------- |
|
119 | 119 | |
|
120 | 120 | Use this to delete gists within |RCM|. Options: |
|
121 | 121 | |
|
122 | 122 | .. rst-class:: dl-horizontal |
|
123 | 123 | |
|
124 | 124 | \-c, - -config <config_file> |
|
125 | 125 | Set the file path to the configuration file. The default file is |
|
126 | 126 | :file:`/home/{user}/.rhoderc` |
|
127 | 127 | |
|
128 | 128 | \ - -corrupted |
|
129 | 129 | Remove gists with corrupted metadata. |
|
130 | 130 | |
|
131 | 131 | \ - -dont-ask |
|
132 | 132 | Remove gists without asking for confirmation. |
|
133 | 133 | |
|
134 | 134 | \-h, - -help |
|
135 | 135 | Show help messages. current configuration values. |
|
136 | 136 | |
|
137 | 137 | \ - -instance-name <instance-id> |
|
138 | 138 | Set the instance name. |
|
139 | 139 | |
|
140 | 140 | \-R, - -repo-dir |
|
141 | 141 | Set the repository file path. |
|
142 | 142 | |
|
143 | 143 | \ - -version |
|
144 | 144 | Display your |RCT| version. |
|
145 | 145 | |
|
146 | 146 | Example usage: |
|
147 | 147 | |
|
148 | 148 | .. code-block:: bash |
|
149 | 149 | |
|
150 | 150 | # Clean up gists related to an instance |
|
151 | 151 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 |
|
152 | 152 | Scanning for gists in /home/brian/repos/.rc_gist_store... |
|
153 | 153 | preparing to remove [3] found gists |
|
154 | 154 | |
|
155 | 155 | # Clean up corrupted gists in an instance |
|
156 | 156 | $ rhodecode-cleanup-gists --instance-name=enterprise-1 --corrupted |
|
157 | 157 | Scanning for gists in /home/brian/repos/.rc_gist_store... |
|
158 | 158 | preparing to remove [2] found gists |
|
159 | 159 | the following gists will be archived: |
|
160 | 160 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/5 |
|
161 | 161 | * EXPIRED: BAD METADATA | /home/brian/repos/.rc_gist_store/8FtC |
|
162 | 162 | are you sure you want to archive them? [y/N]: y |
|
163 | 163 | removing gist /home/brian/repos/.rc_gist_store/5 |
|
164 | 164 | removing gist /home/brian/repos/.rc_gist_store/8FtCKdcbRKmEvRzTVsEt |
|
165 | 165 | |
|
166 | 166 | rhodecode-cleanup-repos |
|
167 | 167 | ----------------------- |
|
168 | 168 | |
|
169 | 169 | Use this to manage |repos| and |repo| groups within |RCM|. Options: |
|
170 | 170 | |
|
171 | 171 | .. rst-class:: dl-horizontal |
|
172 | 172 | |
|
173 | 173 | \-c, - -config <config_file> |
|
174 | 174 | Set the file path to the configuration file. The default file is |
|
175 | 175 | :file:`/home/{user}/.rhoderc`. |
|
176 | 176 | |
|
177 | 177 | \-h, - -help |
|
178 | 178 | Show help messages. current configuration values. |
|
179 | 179 | |
|
180 | 180 | \ - -interactive |
|
181 | 181 | Enable an interactive prompt for each repository when deleting. |
|
182 | 182 | |
|
183 | 183 | \ - -include-groups |
|
184 | 184 | Remove repository groups. |
|
185 | 185 | |
|
186 | 186 | \ - -instance-name <instance-id> |
|
187 | 187 | Set the instance name. |
|
188 | 188 | |
|
189 | 189 | \ - -list-only |
|
190 | 190 | Display repositories selected for deletion. |
|
191 | 191 | |
|
192 | 192 | \ - -older-than <str> |
|
193 | 193 | Delete repositories older that a specified time. |
|
194 | 194 | You can use the following suffixes; d for days, h for hours, |
|
195 | 195 | m for minutes, s for seconds. |
|
196 | 196 | |
|
197 | 197 | \-R, - -repo-dir |
|
198 | 198 | Set the repository file path |
|
199 | 199 | |
|
200 | 200 | Example usage: |
|
201 | 201 | |
|
202 | 202 | .. code-block:: bash |
|
203 | 203 | |
|
204 | 204 | # Cleaning up repos using tools installed with RCE 350 and above |
|
205 | 205 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-cleanup-repos \ |
|
206 | 206 | --instance-name=enterprise-4 --older-than=1d |
|
207 | 207 | Scanning for repositories in /home/brian/repos... |
|
208 | 208 | preparing to remove [2] found repositories older than 1 day, 0:00:00 (1d) |
|
209 | 209 | |
|
210 | 210 | the following repositories will be deleted completely: |
|
211 | 211 | * REMOVED: 2015-08-05 00:23:18 | /home/brian/repos/rm__20150805_002318_831 |
|
212 | 212 | * REMOVED: 2015-08-04 01:22:10 | /home/brian/repos/rm__20150804_012210_336 |
|
213 | 213 | are you sure you want to remove them? [y/N]: |
|
214 | 214 | |
|
215 | 215 | # Clean up repos older than 1 year |
|
216 | 216 | # If using virtualenv and pre RCE 350 tools installation |
|
217 | 217 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ |
|
218 | 218 | --older-than=365d |
|
219 | 219 | |
|
220 | 220 | Scanning for repositories in /home/brian/repos... |
|
221 | 221 | preparing to remove [343] found repositories older than 365 days |
|
222 | 222 | |
|
223 | 223 | # clean up repos older than 3 days |
|
224 | 224 | # If using virtualenv and pre RCE 350 tools installation |
|
225 | 225 | (venv)$ rhodecode-cleanup-repos --instance-name=enterprise-1 \ |
|
226 | 226 | --older-than=3d |
|
227 | 227 | Scanning for repositories in /home/brian/repos... |
|
228 | 228 | preparing to remove [3] found repositories older than 3 days |
|
229 | 229 | |
|
230 | 230 | .. _tools-config: |
|
231 | 231 | |
|
232 | 232 | rhodecode-config |
|
233 | 233 | ---------------- |
|
234 | 234 | |
|
235 | 235 | Use this to create or update a |RCE| configuration file on the local machine. |
|
236 | 236 | |
|
237 | 237 | .. rst-class:: dl-horizontal |
|
238 | 238 | |
|
239 | 239 | \- -filename </path/to/config_file> |
|
240 | 240 | Set the file path to the |RCE| configuration file. |
|
241 | 241 | |
|
242 | 242 | \- -show-defaults |
|
243 | 243 | Display the defaults set in the |RCE| configuration file. |
|
244 | 244 | |
|
245 | 245 | \- -update |
|
246 | 246 | Update the configuration with the new settings passed on the command |
|
247 | 247 | line. |
|
248 | 248 | |
|
249 | 249 | .. code-block:: bash |
|
250 | 250 | |
|
251 | 251 | # Create a new config file |
|
252 | 252 | $ rhodecode-config --filename=dev.ini |
|
253 | 253 | Wrote new config file in /Users/user/dev.ini |
|
254 | 254 | |
|
255 | 255 | # Update config value for given section: |
|
256 | 256 | $ rhodecode-config --update --filename=prod.ini [handler_console]level=INFO |
|
257 | 257 | |
|
258 | 258 | $ rhodecode-config --filename=dev.ini --show-defaults |
|
259 | 259 | lang=en |
|
260 | 260 | cpu_number=4 |
|
261 | 261 | uuid=<function <lambda> at 0x10d86ac08> |
|
262 | 262 | license_token=ff1e-aa9c-bb66-11e5 |
|
263 | 263 | host=127.0.0.1 |
|
264 | 264 | here=/Users/brian |
|
265 | 265 | error_aggregation_service=None |
|
266 | 266 | database_url=sqlite:///%(here)s/rhodecode.db?timeout=30 |
|
267 | 267 | git_path=git |
|
268 | 268 | http_server=waitress |
|
269 | 269 | port=5000 |
|
270 | 270 | |
|
271 | 271 | .. _tools-rhodecode-extensions: |
|
272 | 272 | |
|
273 | 273 | rhodecode-extensions |
|
274 | 274 | -------------------- |
|
275 | 275 | |
|
276 | 276 | |RCT| adds additional mapping for :ref:`indexing-ref`, statistics, and adds |
|
277 | 277 | additional code for push/pull/create/delete |repo| hooks. These hooks can be |
|
278 | 278 | used to send signals to build-bots such as jenkins. Options: |
|
279 | 279 | |
|
280 | 280 | .. rst-class:: dl-horizontal |
|
281 | 281 | |
|
282 | 282 | \-c, - -config <config_file> |
|
283 | 283 | Create a configuration file. The default file is created |
|
284 | 284 | in ``~/.rhoderc`` |
|
285 | 285 | |
|
286 | 286 | \-h, - -help |
|
287 | 287 | Show help messages. |
|
288 | 288 | |
|
289 | 289 | \-F, - -format {json,pretty} |
|
290 | 290 | Set the formatted representation. |
|
291 | 291 | |
|
292 | 292 | \-I, - -install-dir <str> |
|
293 | 293 | Set the location of the |RCE| installation. The default location is |
|
294 | 294 | :file:`/home/{user}/.rccontrol/`. |
|
295 | 295 | |
|
296 | 296 | \ - -ini-file <str> |
|
297 | 297 | Path to the :file:`rhodecode.ini` file for that instance. |
|
298 | 298 | |
|
299 | 299 | \ - -instance-name <instance-id> |
|
300 | 300 | Set the instance name. |
|
301 | 301 | |
|
302 | 302 | \ - -plugins |
|
303 | 303 | Add plugins to your |RCE| installation. See the |
|
304 |
:ref:` |
|
|
304 | :ref:`extensions-hooks-ref` section for more details. | |
|
305 | 305 | |
|
306 | 306 | \ - -version |
|
307 | 307 | Display your |RCT| version. |
|
308 | 308 | |
|
309 | 309 | |
|
310 | 310 | Once installed, you will see a :file:`rcextensions` folder in the instance |
|
311 | 311 | directory, for example :file:`home/{user}/.rccontrol/{instance-id}/rcextensions` |
|
312 | 312 | |
|
313 | 313 | To install ``rcextensions``, use the following example: |
|
314 | 314 | |
|
315 | 315 | .. code-block:: bash |
|
316 | 316 | |
|
317 | 317 | # install extensions on the given instance |
|
318 | 318 | # If using virtualenv prior to RCE 350 |
|
319 | 319 | (venv)$ rhodecode-extensions --instance-name=enterprise-1 \ |
|
320 | 320 | --ini-file=rhodecode.ini |
|
321 | 321 | Writen new extensions file to rcextensions |
|
322 | 322 | |
|
323 | 323 | # install extensions with additional plugins on the given instance |
|
324 | 324 | (venv)$ rhodecode-extensions --instance-name=enterprise-1 \ |
|
325 | 325 | --ini-file=rhodecode.ini --plugins |
|
326 | 326 | Writen new extensions file to rcextensions |
|
327 | 327 | |
|
328 | 328 | # installing extensions from 350 onwards |
|
329 | 329 | # as they are packaged with RCE |
|
330 | 330 | $ .rccontrol/enterprise-4/profile/bin/rhodecode-extensions --plugins \ |
|
331 | 331 | --instance-name=enterprise-4 --ini-file=rhodecode.ini |
|
332 | 332 | |
|
333 | 333 | Writen new extensions file to rcextensions |
|
334 | 334 | |
|
335 | 335 | See the new extensions inside this directory for more details about the |
|
336 | 336 | additional hooks available, for example see the ``push_post.py`` file. |
|
337 | 337 | |
|
338 | 338 | .. code-block:: python |
|
339 | 339 | |
|
340 | 340 | import urllib |
|
341 | 341 | import urllib2 |
|
342 | 342 | |
|
343 | 343 | def run(*args, **kwargs): |
|
344 | 344 | """ |
|
345 | 345 | Extra params |
|
346 | 346 | |
|
347 | 347 | :param URL: url to send the data to |
|
348 | 348 | """ |
|
349 | 349 | |
|
350 | 350 | url = kwargs.pop('URL', None) |
|
351 | 351 | if url: |
|
352 | 352 | from rhodecode.lib.compat import json |
|
353 | 353 | from rhodecode.model.db import Repository |
|
354 | 354 | |
|
355 | 355 | repo = Repository.get_by_repo_name(kwargs['repository']) |
|
356 | 356 | changesets = [] |
|
357 | 357 | vcs_repo = repo.scm_instance_no_cache() |
|
358 | 358 | for r in kwargs['pushed_revs']: |
|
359 | 359 | cs = vcs_repo.get_changeset(r) |
|
360 | 360 | changesets.append(json.dumps(cs)) |
|
361 | 361 | |
|
362 | 362 | kwargs['pushed_revs'] = changesets |
|
363 | 363 | headers = { |
|
364 | 364 | 'User-Agent': 'RhodeCode-SCM web hook', |
|
365 | 365 | 'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8', |
|
366 | 366 | 'Accept': 'text/javascript, text/html, application/xml, ' |
|
367 | 367 | 'text/xml, */*', |
|
368 | 368 | 'Accept-Encoding': 'gzip,deflate,sdch', |
|
369 | 369 | } |
|
370 | 370 | |
|
371 | 371 | data = kwargs |
|
372 | 372 | data = urllib.urlencode(data) |
|
373 | 373 | req = urllib2.Request(url, data, headers) |
|
374 | 374 | response = urllib2.urlopen(req) |
|
375 | 375 | response.read() |
|
376 | 376 | return 0 |
|
377 | 377 | |
|
378 | 378 | |
|
379 | 379 | rhodecode-gist |
|
380 | 380 | -------------- |
|
381 | 381 | |
|
382 | 382 | Use this to create, list, show, or delete gists within |RCM|. Options: |
|
383 | 383 | |
|
384 | 384 | .. rst-class:: dl-horizontal |
|
385 | 385 | |
|
386 | 386 | \ - -api-cache-only |
|
387 | 387 | Requires a cache to be present when running this call |
|
388 | 388 | |
|
389 | 389 | \ - -api-cache-rebuild |
|
390 | 390 | Replaces existing cached values with new ones from server |
|
391 | 391 | |
|
392 | 392 | \ - -api-cache PATH |
|
393 | 393 | Use a special cache dir to read responses from instead of the server |
|
394 | 394 | |
|
395 | 395 | \ - -api-cert-verify |
|
396 | 396 | Verify the endpoint ssl certificate |
|
397 | 397 | |
|
398 | 398 | \ - -api-cert PATH |
|
399 | 399 | Path to alternate CA bundle. |
|
400 | 400 | |
|
401 | 401 | \ - -apihost <api_host> |
|
402 | 402 | Set the API host value. |
|
403 | 403 | |
|
404 | 404 | \ - -apikey <apikey_value> |
|
405 | 405 | Set the API key value. |
|
406 | 406 | |
|
407 | 407 | \-c, - -config <config_file> |
|
408 | 408 | Create a configuration file. |
|
409 | 409 | The default file is created in :file:`~/.rhoderc` |
|
410 | 410 | |
|
411 | 411 | \ - -create <gistname> |
|
412 | 412 | create the gist |
|
413 | 413 | |
|
414 | 414 | \-d, - -description <str> |
|
415 | 415 | Set gist description |
|
416 | 416 | |
|
417 | 417 | \ - -delete <gistid> |
|
418 | 418 | Delete the gist |
|
419 | 419 | |
|
420 | 420 | \-f, - -file |
|
421 | 421 | Specify the filename The file extension will enable syntax highlighting. |
|
422 | 422 | |
|
423 | 423 | \-F, - -format {json,pretty} |
|
424 | 424 | Set the formatted representation. |
|
425 | 425 | |
|
426 | 426 | \ - -help |
|
427 | 427 | Show help messages. |
|
428 | 428 | |
|
429 | 429 | \-I, - -install-dir <DIR> |
|
430 | 430 | Location of application instances |
|
431 | 431 | |
|
432 | 432 | \ - -instance-name <instance-id> |
|
433 | 433 | Set the instance name. |
|
434 | 434 | |
|
435 | 435 | \ - -list |
|
436 | 436 | Display instance gists. |
|
437 | 437 | |
|
438 | 438 | \-l, --lifetime <minutes> |
|
439 | 439 | Set the gist lifetime. The default value is (-1) forever |
|
440 | 440 | |
|
441 | 441 | \ - -show <gistname> |
|
442 | 442 | Show the content of the gist |
|
443 | 443 | |
|
444 | 444 | \-o, - -open |
|
445 | 445 | After creating Gist open it in browser |
|
446 | 446 | |
|
447 | 447 | \-p, - -private |
|
448 | 448 | Create a private gist |
|
449 | 449 | |
|
450 | 450 | \ - -version |
|
451 | 451 | Display your |RCT| version. |
|
452 | 452 | |
|
453 | 453 | Example usage: |
|
454 | 454 | |
|
455 | 455 | .. code-block:: bash |
|
456 | 456 | |
|
457 | 457 | # List the gists in an instance |
|
458 | 458 | (venv)brian@ubuntu:~$ rhodecode-gist --instance-name=enterprise-1 list |
|
459 | 459 | { |
|
460 | 460 | "error": null, |
|
461 | 461 | "id": 7102, |
|
462 | 462 | "result": [ |
|
463 | 463 | { |
|
464 | 464 | "access_id": "2", |
|
465 | 465 | "content": null, |
|
466 | 466 | "created_on": "2015-01-19T12:52:26.494", |
|
467 | 467 | "description": "A public gust", |
|
468 | 468 | "expires": -1.0, |
|
469 | 469 | "gist_id": 2, |
|
470 | 470 | "type": "public", |
|
471 | 471 | "url": "http://127.0.0.1:10003/_admin/gists/2" |
|
472 | 472 | }, |
|
473 | 473 | { |
|
474 | 474 | "access_id": "7gs6BsSEC4pKUEPLz5AB", |
|
475 | 475 | "content": null, |
|
476 | 476 | "created_on": "2015-01-19T11:27:40.812", |
|
477 | 477 | "description": "Gist testing API", |
|
478 | 478 | "expires": -1.0, |
|
479 | 479 | "gist_id": 1, |
|
480 | 480 | "type": "private", |
|
481 | 481 | "url": "http://127.0.0.1:10003/_admin/gists/7gs6BsSEC4pKUEPLz5AB" |
|
482 | 482 | } |
|
483 | 483 | ] |
|
484 | 484 | } |
|
485 | 485 | |
|
486 | 486 | # delete a particular gist |
|
487 | 487 | # You use the access_id to specify the gist to delete |
|
488 | 488 | (venv)brian@ubuntu:~$ rhodecode-gist delete 2 --instance-name=enterprise-1 |
|
489 | 489 | { |
|
490 | 490 | "error": null, |
|
491 | 491 | "id": 6284, |
|
492 | 492 | "result": { |
|
493 | 493 | "gist": null, |
|
494 | 494 | "msg": "deleted gist ID:2" |
|
495 | 495 | } |
|
496 | 496 | } |
|
497 | 497 | |
|
498 | 498 | # cat a file and pipe to new gist |
|
499 | 499 | # This is if you are using virtualenv |
|
500 | 500 | (venv)$ cat ~/.rhoderc | rhodecode-gist --instance-name=enterprise-1 \ |
|
501 | 501 | -d '.rhoderc copy' create |
|
502 | 502 | |
|
503 | 503 | { |
|
504 | 504 | "error": null, |
|
505 | 505 | "id": 5374, |
|
506 | 506 | "result": { |
|
507 | 507 | "gist": { |
|
508 | 508 | "access_id": "7", |
|
509 | 509 | "content": null, |
|
510 | 510 | "created_on": "2015-01-26T11:31:58.774", |
|
511 | 511 | "description": ".rhoderc copy", |
|
512 | 512 | "expires": -1.0, |
|
513 | 513 | "gist_id": 7, |
|
514 | 514 | "type": "public", |
|
515 | 515 | "url": "http://127.0.0.1:10003/_admin/gists/7" |
|
516 | 516 | }, |
|
517 | 517 | "msg": "created new gist" |
|
518 | 518 | } |
|
519 | 519 | } |
|
520 | 520 | |
|
521 | 521 | # Cat a file and pipe to gist |
|
522 | 522 | # in RCE 3.5.0 tools and above |
|
523 | 523 | $ cat ~/.rhoderc | ~/.rccontrol/{instance-id}/profile/bin/rhodecode-gist \ |
|
524 | 524 | --instance-name=enterprise-4 -d '.rhoderc copy' create |
|
525 | 525 | { |
|
526 | 526 | "error": null, |
|
527 | 527 | "id": 9253, |
|
528 | 528 | "result": { |
|
529 | 529 | "gist": { |
|
530 | 530 | "access_id": "4", |
|
531 | 531 | "acl_level": "acl_public", |
|
532 | 532 | "content": null, |
|
533 | 533 | "created_on": "2015-08-20T05:54:11.250", |
|
534 | 534 | "description": ".rhoderc copy", |
|
535 | 535 | "expires": -1.0, |
|
536 | 536 | "gist_id": 4, |
|
537 | 537 | "modified_at": "2015-08-20T05:54:11.250", |
|
538 | 538 | "type": "public", |
|
539 | 539 | "url": "http://127.0.0.1:10000/_admin/gists/4" |
|
540 | 540 | }, |
|
541 | 541 | "msg": "created new gist" |
|
542 | 542 | } |
|
543 | 543 | } |
|
544 | 544 | |
|
545 | 545 | |
|
546 | 546 | rhodecode-index |
|
547 | 547 | --------------- |
|
548 | 548 | |
|
549 | 549 | More detailed information regarding setting up the indexer is available in |
|
550 | 550 | the :ref:`indexing-ref` section. Options: |
|
551 | 551 | |
|
552 | 552 | .. rst-class:: dl-horizontal |
|
553 | 553 | |
|
554 | 554 | \ - -api-cache-only |
|
555 | 555 | Requires a cache to be present when running this call |
|
556 | 556 | |
|
557 | 557 | \ - -api-cache-rebuild |
|
558 | 558 | Replaces existing cached values with new ones from server |
|
559 | 559 | |
|
560 | 560 | \ - -api-cache PATH |
|
561 | 561 | Use a special cache dir to read responses from instead of the server |
|
562 | 562 | |
|
563 | 563 | \ - -api-cert-verify |
|
564 | 564 | Verify the endpoint ssl certificate |
|
565 | 565 | |
|
566 | 566 | \ - -api-cert PATH |
|
567 | 567 | Path to alternate CA bundle. |
|
568 | 568 | |
|
569 | 569 | \ - -apihost <api_host> |
|
570 | 570 | Set the API host value. |
|
571 | 571 | |
|
572 | 572 | \ - -apikey <apikey_value> |
|
573 | 573 | Set the API key value. |
|
574 | 574 | |
|
575 | 575 | \-c, --config <config_file> |
|
576 | 576 | Create a configuration file. |
|
577 | 577 | The default file is created in :file:`~/.rhoderc` |
|
578 | 578 | |
|
579 | 579 | \ - -create-mapping <PATH> |
|
580 | 580 | Creates an example mapping configuration for indexer. |
|
581 | 581 | |
|
582 | 582 | \-F, - -format {json,pretty} |
|
583 | 583 | Set the formatted representation. |
|
584 | 584 | |
|
585 | 585 | \-h, - -help |
|
586 | 586 | Show help messages. |
|
587 | 587 | |
|
588 | 588 | \ - -instance-name <instance-id> |
|
589 | 589 | Set the instance name |
|
590 | 590 | |
|
591 | 591 | \-I, - -install-dir <DIR> |
|
592 | 592 | Location of application instances |
|
593 | 593 | |
|
594 | 594 | \-m, - -mapping <file_name> |
|
595 | 595 | Parse the output to the .ini mapping file. |
|
596 | 596 | |
|
597 | 597 | \ - -optimize |
|
598 | 598 | Optimize index for performance by amalgamating multiple index files |
|
599 | 599 | into one. Greatly increases incremental indexing speed. |
|
600 | 600 | |
|
601 | 601 | \-R, - -repo-dir <DIRECTORY> |
|
602 | 602 | Location of repositories |
|
603 | 603 | |
|
604 | 604 | \ - -source <PATH> |
|
605 | 605 | Use a special source JSON file to feed the indexer |
|
606 | 606 | |
|
607 | 607 | \ - -version |
|
608 | 608 | Display your |RCT| version. |
|
609 | 609 | |
|
610 | 610 | Example usage: |
|
611 | 611 | |
|
612 | 612 | .. code-block:: bash |
|
613 | 613 | |
|
614 | 614 | # Run the indexer |
|
615 | 615 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ |
|
616 | 616 | --instance-name=enterprise-4 |
|
617 | 617 | |
|
618 | 618 | # Run indexer based on mapping.ini file |
|
619 | 619 | # This is using pre-350 virtualenv |
|
620 | 620 | (venv)$ rhodecode-index --instance-name=enterprise-1 |
|
621 | 621 | |
|
622 | 622 | # Index from the command line without creating |
|
623 | 623 | # the .rhoderc file |
|
624 | 624 | $ rhodecode-index --apikey=key --apihost=http://rhodecode.server \ |
|
625 | 625 | --instance-name=enterprise-2 --save-config |
|
626 | 626 | |
|
627 | 627 | # Create the indexing mapping file |
|
628 | 628 | $ ~/.rccontrol/enterprise-4/profile/bin/rhodecode-index \ |
|
629 | 629 | --create-mapping mapping.ini --instance-name=enterprise-4 |
|
630 | 630 | |
|
631 | 631 | .. _tools-rhodecode-list-instance: |
|
632 | 632 | |
|
633 | 633 | rhodecode-list-instances |
|
634 | 634 | ------------------------ |
|
635 | 635 | |
|
636 | 636 | Use this command to list the instance details configured in the |
|
637 | 637 | :file:`~/.rhoderc` file. |
|
638 | 638 | |
|
639 | 639 | .. code-block:: bash |
|
640 | 640 | |
|
641 | 641 | $ .rccontrol/enterprise-1/profile/bin/rhodecode-list-instances |
|
642 | 642 | [instance:production] - Config only |
|
643 | 643 | API-HOST: https://some.url.com |
|
644 | 644 | API-KEY: some.auth.token |
|
645 | 645 | |
|
646 | 646 | [instance:development] - Config only |
|
647 | 647 | API-HOST: http://some.ip.address |
|
648 | 648 | API-KEY: some.auth.token |
|
649 | 649 | |
|
650 | 650 | |
|
651 | 651 | .. _tools-setup-config: |
|
652 | 652 | |
|
653 | 653 | rhodecode-setup-config |
|
654 | 654 | ---------------------- |
|
655 | 655 | |
|
656 | 656 | Use this command to create the ``~.rhoderc`` file required by |RCT| to access |
|
657 | 657 | remote instances. |
|
658 | 658 | |
|
659 | 659 | .. rst-class:: dl-horizontal |
|
660 | 660 | |
|
661 | 661 | \- -instance-name <name> |
|
662 | 662 | Specify the instance name in the :file:`~/.rhoderc` |
|
663 | 663 | |
|
664 | 664 | \api_host <hostname> |
|
665 | 665 | Create a configuration file. The default file is created |
|
666 | 666 | in ``~/.rhoderc`` |
|
667 | 667 | |
|
668 | 668 | \api_key <auth-token> |
|
669 | 669 | Create a configuration file. The default file is created |
|
670 | 670 | in ``~/.rhoderc`` |
|
671 | 671 | |
|
672 | 672 | |
|
673 | 673 | .. code-block:: bash |
|
674 | 674 | |
|
675 | 675 | (venv)$ rhodecode-setup-config --instance-name=tea api_host=URL api_key=xyz |
|
676 | 676 | Config not found under /Users/username/.rhoderc, creating a new one |
|
677 | 677 | Wrote new configuration into /Users/username/.rhoderc |
@@ -1,12 +1,12 b'' | |||
|
1 | 1 | diff --git a/requirements.txt b/requirements.txt |
|
2 | 2 | --- a/requirements.txt |
|
3 | 3 | +++ b/requirements.txt |
|
4 | @@ -3,7 +3,7 @@future==0.14.3 | |
|
4 | @@ -3,7 +3,7 @@ future==0.14.3 | |
|
5 | 5 | six==1.9.0 |
|
6 | 6 | mako==1.0.1 |
|
7 | 7 | markupsafe==0.23 |
|
8 | 8 | -requests==2.5.1 |
|
9 | 9 | +requests |
|
10 | #responses | |
|
11 | 10 | whoosh==2.7.0 |
|
12 | elasticsearch==2.3.0 No newline at end of file | |
|
11 | elasticsearch==2.3.0 | |
|
12 | elasticsearch-dsl==2.0.0 No newline at end of file |
@@ -1,273 +1,281 b'' | |||
|
1 | 1 | # Overrides for the generated python-packages.nix |
|
2 | 2 | # |
|
3 | 3 | # This function is intended to be used as an extension to the generated file |
|
4 | 4 | # python-packages.nix. The main objective is to add needed dependencies of C |
|
5 | 5 | # libraries and tweak the build instructions where needed. |
|
6 | 6 | |
|
7 | 7 | { pkgs, basePythonPackages }: |
|
8 | 8 | |
|
9 | 9 | let |
|
10 | 10 | sed = "sed -i"; |
|
11 | 11 | localLicenses = { |
|
12 | 12 | repoze = { |
|
13 | 13 | fullName = "Repoze License"; |
|
14 | 14 | url = http://www.repoze.org/LICENSE.txt; |
|
15 | 15 | }; |
|
16 | 16 | }; |
|
17 | 17 | in |
|
18 | 18 | |
|
19 | 19 | self: super: { |
|
20 | 20 | |
|
21 | 21 | appenlight-client = super.appenlight-client.override (attrs: { |
|
22 | 22 | meta = { |
|
23 | 23 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
24 | 24 | }; |
|
25 | 25 | }); |
|
26 | 26 | |
|
27 | 27 | future = super.future.override (attrs: { |
|
28 | 28 | meta = { |
|
29 | 29 | license = [ pkgs.lib.licenses.mit ]; |
|
30 | 30 | }; |
|
31 | 31 | }); |
|
32 | 32 | |
|
33 | 33 | gnureadline = super.gnureadline.override (attrs: { |
|
34 | 34 | buildInputs = attrs.buildInputs ++ [ |
|
35 | 35 | pkgs.ncurses |
|
36 | 36 | ]; |
|
37 | 37 | patchPhase = '' |
|
38 | 38 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
39 | 39 | ''; |
|
40 | 40 | }); |
|
41 | 41 | |
|
42 | 42 | gunicorn = super.gunicorn.override (attrs: { |
|
43 | 43 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
44 | 44 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
45 | 45 | # gunicorn explodes if used with multiple threads per worker. |
|
46 | 46 | self.futures |
|
47 | 47 | ]; |
|
48 | 48 | }); |
|
49 | 49 | |
|
50 | 50 | ipython = super.ipython.override (attrs: { |
|
51 | 51 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
52 | 52 | self.gnureadline |
|
53 | 53 | ]; |
|
54 | 54 | }); |
|
55 | 55 | |
|
56 | 56 | kombu = super.kombu.override (attrs: { |
|
57 | 57 | # The current version of kombu needs some patching to work with the |
|
58 | 58 | # other libs. Should be removed once we update celery and kombu. |
|
59 | 59 | patches = [ |
|
60 | 60 | ./patch-kombu-py-2-7-11.diff |
|
61 | 61 | ./patch-kombu-msgpack.diff |
|
62 | 62 | ]; |
|
63 | 63 | }); |
|
64 | 64 | |
|
65 | 65 | lxml = super.lxml.override (attrs: { |
|
66 | 66 | buildInputs = with self; [ |
|
67 | 67 | pkgs.libxml2 |
|
68 | 68 | pkgs.libxslt |
|
69 | 69 | ]; |
|
70 | 70 | }); |
|
71 | 71 | |
|
72 | 72 | MySQL-python = super.MySQL-python.override (attrs: { |
|
73 | 73 | buildInputs = attrs.buildInputs ++ [ |
|
74 | 74 | pkgs.openssl |
|
75 | 75 | ]; |
|
76 | 76 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
77 | 77 | pkgs.mysql.lib |
|
78 | 78 | pkgs.zlib |
|
79 | 79 | ]; |
|
80 | 80 | }); |
|
81 | 81 | |
|
82 | 82 | psutil = super.psutil.override (attrs: { |
|
83 | 83 | buildInputs = attrs.buildInputs ++ |
|
84 | 84 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
85 | 85 | }); |
|
86 | 86 | |
|
87 | 87 | psycopg2 = super.psycopg2.override (attrs: { |
|
88 | 88 | buildInputs = attrs.buildInputs ++ |
|
89 | 89 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
90 | 90 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
91 | 91 | pkgs.postgresql |
|
92 | 92 | ]; |
|
93 | 93 | meta = { |
|
94 | 94 | license = pkgs.lib.licenses.lgpl3Plus; |
|
95 | 95 | }; |
|
96 | 96 | }); |
|
97 | 97 | |
|
98 | py-gfm = super.py-gfm.override { | |
|
99 | src = pkgs.fetchgit { | |
|
100 | url = "https://code.rhodecode.com/upstream/py-gfm"; | |
|
101 | rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2"; | |
|
102 | sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3"; | |
|
103 | }; | |
|
104 | }; | |
|
105 | ||
|
98 | 106 | pycurl = super.pycurl.override (attrs: { |
|
99 | 107 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
100 | 108 | pkgs.curl |
|
101 | 109 | pkgs.openssl |
|
102 | 110 | ]; |
|
103 | 111 | preConfigure = '' |
|
104 | 112 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
105 | 113 | export PYCURL_SSL_LIBRARY=openssl |
|
106 | 114 | ''; |
|
107 | 115 | meta = { |
|
108 | 116 | # TODO: It is LGPL and MIT |
|
109 | 117 | license = pkgs.lib.licenses.mit; |
|
110 | 118 | }; |
|
111 | 119 | }); |
|
112 | 120 | |
|
113 | 121 | Pylons = super.Pylons.override (attrs: { |
|
114 | 122 | name = "Pylons-1.0.1-patch1"; |
|
115 | 123 | src = pkgs.fetchgit { |
|
116 | 124 | url = "https://code.rhodecode.com/upstream/pylons"; |
|
117 | 125 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; |
|
118 | 126 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; |
|
119 | 127 | }; |
|
120 | 128 | }); |
|
121 | 129 | |
|
122 | 130 | pyramid = super.pyramid.override (attrs: { |
|
123 | 131 | postFixup = '' |
|
124 | 132 | wrapPythonPrograms |
|
125 | 133 | # TODO: johbo: "wrapPython" adds this magic line which |
|
126 | 134 | # confuses pserve. |
|
127 | 135 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
128 | 136 | ''; |
|
129 | 137 | meta = { |
|
130 | 138 | license = localLicenses.repoze; |
|
131 | 139 | }; |
|
132 | 140 | }); |
|
133 | 141 | |
|
134 | 142 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { |
|
135 | 143 | meta = { |
|
136 | 144 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; |
|
137 | 145 | }; |
|
138 | 146 | }); |
|
139 | 147 | |
|
140 | 148 | Pyro4 = super.Pyro4.override (attrs: { |
|
141 | 149 | # TODO: Was not able to generate this version, needs further |
|
142 | 150 | # investigation. |
|
143 | 151 | name = "Pyro4-4.35"; |
|
144 | 152 | src = pkgs.fetchurl { |
|
145 | 153 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; |
|
146 | 154 | md5 = "cbe6cb855f086a0f092ca075005855f3"; |
|
147 | 155 | }; |
|
148 | 156 | }); |
|
149 | 157 | |
|
150 | 158 | pysqlite = super.pysqlite.override (attrs: { |
|
151 | 159 | propagatedBuildInputs = [ |
|
152 | 160 | pkgs.sqlite |
|
153 | 161 | ]; |
|
154 | 162 | meta = { |
|
155 | 163 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; |
|
156 | 164 | }; |
|
157 | 165 | }); |
|
158 | 166 | |
|
159 | 167 | pytest-runner = super.pytest-runner.override (attrs: { |
|
160 | 168 | propagatedBuildInputs = [ |
|
161 | 169 | self.setuptools-scm |
|
162 | 170 | ]; |
|
163 | 171 | }); |
|
164 | 172 | |
|
165 | 173 | python-ldap = super.python-ldap.override (attrs: { |
|
166 | 174 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
167 | 175 | pkgs.cyrus_sasl |
|
168 | 176 | pkgs.openldap |
|
169 | 177 | pkgs.openssl |
|
170 | 178 | ]; |
|
171 | 179 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl"; |
|
172 | 180 | }); |
|
173 | 181 | |
|
174 | 182 | python-pam = super.python-pam.override (attrs: |
|
175 | 183 | let |
|
176 | 184 | includeLibPam = pkgs.stdenv.isLinux; |
|
177 | 185 | in { |
|
178 | 186 | # TODO: johbo: Move the option up into the default.nix, we should |
|
179 | 187 | # include python-pam only on supported platforms. |
|
180 | 188 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
181 | 189 | pkgs.lib.optional includeLibPam [ |
|
182 | 190 | pkgs.pam |
|
183 | 191 | ]; |
|
184 | 192 | # TODO: johbo: Check if this can be avoided, or transform into |
|
185 | 193 | # a real patch |
|
186 | 194 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
187 | 195 | substituteInPlace pam.py \ |
|
188 | 196 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
189 | 197 | ''; |
|
190 | 198 | }); |
|
191 | 199 | |
|
192 | 200 | rhodecode-tools = super.rhodecode-tools.override (attrs: { |
|
193 | 201 | patches = [ |
|
194 | 202 | ./patch-rhodecode-tools-setup.diff |
|
195 | 203 | ]; |
|
196 | 204 | }); |
|
197 | 205 | |
|
198 | 206 | URLObject = super.URLObject.override (attrs: { |
|
199 | 207 | meta = { |
|
200 | 208 | license = { |
|
201 | 209 | spdxId = "Unlicense"; |
|
202 | 210 | fullName = "The Unlicense"; |
|
203 | 211 | url = http://unlicense.org/; |
|
204 | 212 | }; |
|
205 | 213 | }; |
|
206 | 214 | }); |
|
207 | 215 | |
|
208 | 216 | amqplib = super.amqplib.override (attrs: { |
|
209 | 217 | meta = { |
|
210 | 218 | license = pkgs.lib.licenses.lgpl3; |
|
211 | 219 | }; |
|
212 | 220 | }); |
|
213 | 221 | |
|
214 | 222 | docutils = super.docutils.override (attrs: { |
|
215 | 223 | meta = { |
|
216 | 224 | license = pkgs.lib.licenses.bsd2; |
|
217 | 225 | }; |
|
218 | 226 | }); |
|
219 | 227 | |
|
220 | 228 | colander = super.colander.override (attrs: { |
|
221 | 229 | meta = { |
|
222 | 230 | license = localLicenses.repoze; |
|
223 | 231 | }; |
|
224 | 232 | }); |
|
225 | 233 | |
|
226 | 234 | pyramid-beaker = super.pyramid-beaker.override (attrs: { |
|
227 | 235 | meta = { |
|
228 | 236 | license = localLicenses.repoze; |
|
229 | 237 | }; |
|
230 | 238 | }); |
|
231 | 239 | |
|
232 | 240 | pyramid-mako = super.pyramid-mako.override (attrs: { |
|
233 | 241 | meta = { |
|
234 | 242 | license = localLicenses.repoze; |
|
235 | 243 | }; |
|
236 | 244 | }); |
|
237 | 245 | |
|
238 | 246 | repoze.lru = super.repoze.lru.override (attrs: { |
|
239 | 247 | meta = { |
|
240 | 248 | license = localLicenses.repoze; |
|
241 | 249 | }; |
|
242 | 250 | }); |
|
243 | 251 | |
|
244 | 252 | recaptcha-client = super.recaptcha-client.override (attrs: { |
|
245 | 253 | meta = { |
|
246 | 254 | # TODO: It is MIT/X11 |
|
247 | 255 | license = pkgs.lib.licenses.mit; |
|
248 | 256 | }; |
|
249 | 257 | }); |
|
250 | 258 | |
|
251 | 259 | python-editor = super.python-editor.override (attrs: { |
|
252 | 260 | meta = { |
|
253 | 261 | license = pkgs.lib.licenses.asl20; |
|
254 | 262 | }; |
|
255 | 263 | }); |
|
256 | 264 | |
|
257 | 265 | translationstring = super.translationstring.override (attrs: { |
|
258 | 266 | meta = { |
|
259 | 267 | license = localLicenses.repoze; |
|
260 | 268 | }; |
|
261 | 269 | }); |
|
262 | 270 | |
|
263 | 271 | venusian = super.venusian.override (attrs: { |
|
264 | 272 | meta = { |
|
265 | 273 | license = localLicenses.repoze; |
|
266 | 274 | }; |
|
267 | 275 | }); |
|
268 | 276 | |
|
269 | 277 | # Avoid that setuptools is replaced, this leads to trouble |
|
270 | 278 | # with buildPythonPackage. |
|
271 | 279 | setuptools = basePythonPackages.setuptools; |
|
272 | 280 | |
|
273 | 281 | } |
@@ -1,1628 +1,1732 b'' | |||
|
1 | 1 | { |
|
2 | 2 | Babel = super.buildPythonPackage { |
|
3 | 3 | name = "Babel-1.3"; |
|
4 | 4 | buildInputs = with self; []; |
|
5 | 5 | doCheck = false; |
|
6 | 6 | propagatedBuildInputs = with self; [pytz]; |
|
7 | 7 | src = fetchurl { |
|
8 | 8 | url = "https://pypi.python.org/packages/33/27/e3978243a03a76398c384c83f7ca879bc6e8f1511233a621fcada135606e/Babel-1.3.tar.gz"; |
|
9 | 9 | md5 = "5264ceb02717843cbc9ffce8e6e06bdb"; |
|
10 | 10 | }; |
|
11 | 11 | meta = { |
|
12 | 12 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
13 | 13 | }; |
|
14 | 14 | }; |
|
15 | 15 | Beaker = super.buildPythonPackage { |
|
16 | 16 | name = "Beaker-1.7.0"; |
|
17 | 17 | buildInputs = with self; []; |
|
18 | 18 | doCheck = false; |
|
19 | 19 | propagatedBuildInputs = with self; []; |
|
20 | 20 | src = fetchurl { |
|
21 | 21 | url = "https://pypi.python.org/packages/97/8e/409d2e7c009b8aa803dc9e6f239f1db7c3cdf578249087a404e7c27a505d/Beaker-1.7.0.tar.gz"; |
|
22 | 22 | md5 = "386be3f7fe427358881eee4622b428b3"; |
|
23 | 23 | }; |
|
24 | 24 | meta = { |
|
25 | 25 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
26 | 26 | }; |
|
27 | 27 | }; |
|
28 | 28 | CProfileV = super.buildPythonPackage { |
|
29 | 29 | name = "CProfileV-1.0.6"; |
|
30 | 30 | buildInputs = with self; []; |
|
31 | 31 | doCheck = false; |
|
32 | 32 | propagatedBuildInputs = with self; [bottle]; |
|
33 | 33 | src = fetchurl { |
|
34 | 34 | url = "https://pypi.python.org/packages/eb/df/983a0b6cfd3ac94abf023f5011cb04f33613ace196e33f53c86cf91850d5/CProfileV-1.0.6.tar.gz"; |
|
35 | 35 | md5 = "08c7c242b6e64237bc53c5d13537e03d"; |
|
36 | 36 | }; |
|
37 | 37 | meta = { |
|
38 | 38 | license = [ pkgs.lib.licenses.mit ]; |
|
39 | 39 | }; |
|
40 | 40 | }; |
|
41 | Chameleon = super.buildPythonPackage { | |
|
42 | name = "Chameleon-2.24"; | |
|
43 | buildInputs = with self; []; | |
|
44 | doCheck = false; | |
|
45 | propagatedBuildInputs = with self; []; | |
|
46 | src = fetchurl { | |
|
47 | url = "https://pypi.python.org/packages/5a/9e/637379ffa13c5172b5c0e704833ffea6bf51cec7567f93fd6e903d53ed74/Chameleon-2.24.tar.gz"; | |
|
48 | md5 = "1b01f1f6533a8a11d0d2f2366dec5342"; | |
|
49 | }; | |
|
50 | meta = { | |
|
51 | license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ]; | |
|
52 | }; | |
|
53 | }; | |
|
41 | 54 | Fabric = super.buildPythonPackage { |
|
42 | 55 | name = "Fabric-1.10.0"; |
|
43 | 56 | buildInputs = with self; []; |
|
44 | 57 | doCheck = false; |
|
45 | 58 | propagatedBuildInputs = with self; [paramiko]; |
|
46 | 59 | src = fetchurl { |
|
47 | 60 | url = "https://pypi.python.org/packages/e3/5f/b6ebdb5241d5ec9eab582a5c8a01255c1107da396f849e538801d2fe64a5/Fabric-1.10.0.tar.gz"; |
|
48 | 61 | md5 = "2cb96473387f0e7aa035210892352f4a"; |
|
49 | 62 | }; |
|
50 | 63 | meta = { |
|
51 | 64 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
52 | 65 | }; |
|
53 | 66 | }; |
|
54 | 67 | FormEncode = super.buildPythonPackage { |
|
55 | 68 | name = "FormEncode-1.2.4"; |
|
56 | 69 | buildInputs = with self; []; |
|
57 | 70 | doCheck = false; |
|
58 | 71 | propagatedBuildInputs = with self; []; |
|
59 | 72 | src = fetchurl { |
|
60 | 73 | url = "https://pypi.python.org/packages/8e/59/0174271a6f004512e0201188593e6d319db139d14cb7490e488bbb078015/FormEncode-1.2.4.tar.gz"; |
|
61 | 74 | md5 = "6bc17fb9aed8aea198975e888e2077f4"; |
|
62 | 75 | }; |
|
63 | 76 | meta = { |
|
64 | 77 | license = [ pkgs.lib.licenses.psfl ]; |
|
65 | 78 | }; |
|
66 | 79 | }; |
|
67 | 80 | Jinja2 = super.buildPythonPackage { |
|
68 | 81 | name = "Jinja2-2.7.3"; |
|
69 | 82 | buildInputs = with self; []; |
|
70 | 83 | doCheck = false; |
|
71 | 84 | propagatedBuildInputs = with self; [MarkupSafe]; |
|
72 | 85 | src = fetchurl { |
|
73 | 86 | url = "https://pypi.python.org/packages/b0/73/eab0bca302d6d6a0b5c402f47ad1760dc9cb2dd14bbc1873ad48db258e4d/Jinja2-2.7.3.tar.gz"; |
|
74 | 87 | md5 = "b9dffd2f3b43d673802fe857c8445b1a"; |
|
75 | 88 | }; |
|
76 | 89 | meta = { |
|
77 | 90 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
78 | 91 | }; |
|
79 | 92 | }; |
|
80 | 93 | Mako = super.buildPythonPackage { |
|
81 | 94 | name = "Mako-1.0.1"; |
|
82 | 95 | buildInputs = with self; []; |
|
83 | 96 | doCheck = false; |
|
84 | 97 | propagatedBuildInputs = with self; [MarkupSafe]; |
|
85 | 98 | src = fetchurl { |
|
86 | 99 | url = "https://pypi.python.org/packages/8e/a4/aa56533ecaa5f22ca92428f74e074d0c9337282933c722391902c8f9e0f8/Mako-1.0.1.tar.gz"; |
|
87 | 100 | md5 = "9f0aafd177b039ef67b90ea350497a54"; |
|
88 | 101 | }; |
|
89 | 102 | meta = { |
|
90 | 103 | license = [ pkgs.lib.licenses.mit ]; |
|
91 | 104 | }; |
|
92 | 105 | }; |
|
93 | 106 | Markdown = super.buildPythonPackage { |
|
94 | 107 | name = "Markdown-2.6.2"; |
|
95 | 108 | buildInputs = with self; []; |
|
96 | 109 | doCheck = false; |
|
97 | 110 | propagatedBuildInputs = with self; []; |
|
98 | 111 | src = fetchurl { |
|
99 | 112 | url = "https://pypi.python.org/packages/62/8b/83658b5f6c220d5fcde9f9852d46ea54765d734cfbc5a9f4c05bfc36db4d/Markdown-2.6.2.tar.gz"; |
|
100 | 113 | md5 = "256d19afcc564dc4ce4c229bb762f7ae"; |
|
101 | 114 | }; |
|
102 | 115 | meta = { |
|
103 | 116 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
104 | 117 | }; |
|
105 | 118 | }; |
|
106 | 119 | MarkupSafe = super.buildPythonPackage { |
|
107 | 120 | name = "MarkupSafe-0.23"; |
|
108 | 121 | buildInputs = with self; []; |
|
109 | 122 | doCheck = false; |
|
110 | 123 | propagatedBuildInputs = with self; []; |
|
111 | 124 | src = fetchurl { |
|
112 | 125 | url = "https://pypi.python.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz"; |
|
113 | 126 | md5 = "f5ab3deee4c37cd6a922fb81e730da6e"; |
|
114 | 127 | }; |
|
115 | 128 | meta = { |
|
116 | 129 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
117 | 130 | }; |
|
118 | 131 | }; |
|
119 | 132 | MySQL-python = super.buildPythonPackage { |
|
120 | 133 | name = "MySQL-python-1.2.5"; |
|
121 | 134 | buildInputs = with self; []; |
|
122 | 135 | doCheck = false; |
|
123 | 136 | propagatedBuildInputs = with self; []; |
|
124 | 137 | src = fetchurl { |
|
125 | 138 | url = "https://pypi.python.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip"; |
|
126 | 139 | md5 = "654f75b302db6ed8dc5a898c625e030c"; |
|
127 | 140 | }; |
|
128 | 141 | meta = { |
|
129 | 142 | license = [ pkgs.lib.licenses.gpl1 ]; |
|
130 | 143 | }; |
|
131 | 144 | }; |
|
132 | 145 | Paste = super.buildPythonPackage { |
|
133 | 146 | name = "Paste-2.0.2"; |
|
134 | 147 | buildInputs = with self; []; |
|
135 | 148 | doCheck = false; |
|
136 | 149 | propagatedBuildInputs = with self; [six]; |
|
137 | 150 | src = fetchurl { |
|
138 | 151 | url = "https://pypi.python.org/packages/d5/8d/0f8ac40687b97ff3e07ebd1369be20bdb3f93864d2dc3c2ff542edb4ce50/Paste-2.0.2.tar.gz"; |
|
139 | 152 | md5 = "4bfc8a7eaf858f6309d2ac0f40fc951c"; |
|
140 | 153 | }; |
|
141 | 154 | meta = { |
|
142 | 155 | license = [ pkgs.lib.licenses.mit ]; |
|
143 | 156 | }; |
|
144 | 157 | }; |
|
145 | 158 | PasteDeploy = super.buildPythonPackage { |
|
146 | 159 | name = "PasteDeploy-1.5.2"; |
|
147 | 160 | buildInputs = with self; []; |
|
148 | 161 | doCheck = false; |
|
149 | 162 | propagatedBuildInputs = with self; []; |
|
150 | 163 | src = fetchurl { |
|
151 | 164 | url = "https://pypi.python.org/packages/0f/90/8e20cdae206c543ea10793cbf4136eb9a8b3f417e04e40a29d72d9922cbd/PasteDeploy-1.5.2.tar.gz"; |
|
152 | 165 | md5 = "352b7205c78c8de4987578d19431af3b"; |
|
153 | 166 | }; |
|
154 | 167 | meta = { |
|
155 | 168 | license = [ pkgs.lib.licenses.mit ]; |
|
156 | 169 | }; |
|
157 | 170 | }; |
|
158 | 171 | PasteScript = super.buildPythonPackage { |
|
159 | 172 | name = "PasteScript-1.7.5"; |
|
160 | 173 | buildInputs = with self; []; |
|
161 | 174 | doCheck = false; |
|
162 | 175 | propagatedBuildInputs = with self; [Paste PasteDeploy]; |
|
163 | 176 | src = fetchurl { |
|
164 | 177 | url = "https://pypi.python.org/packages/a5/05/fc60efa7c2f17a1dbaeccb2a903a1e90902d92b9d00eebabe3095829d806/PasteScript-1.7.5.tar.gz"; |
|
165 | 178 | md5 = "4c72d78dcb6bb993f30536842c16af4d"; |
|
166 | 179 | }; |
|
167 | 180 | meta = { |
|
168 | 181 | license = [ pkgs.lib.licenses.mit ]; |
|
169 | 182 | }; |
|
170 | 183 | }; |
|
171 | 184 | Pygments = super.buildPythonPackage { |
|
172 |
name = "Pygments-2. |
|
|
185 | name = "Pygments-2.1.3"; | |
|
173 | 186 | buildInputs = with self; []; |
|
174 | 187 | doCheck = false; |
|
175 | 188 | propagatedBuildInputs = with self; []; |
|
176 | 189 | src = fetchurl { |
|
177 | url = "https://pypi.python.org/packages/f4/c6/bdbc5a8a112256b2b6136af304dbae93d8b1ef8738ff2d12a51018800e46/Pygments-2.0.2.tar.gz"; | |
|
178 | md5 = "238587a1370d62405edabd0794b3ec4a"; | |
|
190 | url = "https://pypi.python.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz"; | |
|
191 | md5 = "ed3fba2467c8afcda4d317e4ef2c6150"; | |
|
179 | 192 | }; |
|
180 | 193 | meta = { |
|
181 | 194 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
182 | 195 | }; |
|
183 | 196 | }; |
|
184 | 197 | Pylons = super.buildPythonPackage { |
|
185 | 198 | name = "Pylons-1.0.1"; |
|
186 | 199 | buildInputs = with self; []; |
|
187 | 200 | doCheck = false; |
|
188 | 201 | propagatedBuildInputs = with self; [Routes WebHelpers Beaker Paste PasteDeploy PasteScript FormEncode simplejson decorator nose Mako WebError WebTest Tempita MarkupSafe WebOb]; |
|
189 | 202 | src = fetchurl { |
|
190 | 203 | url = "https://pypi.python.org/packages/a2/69/b835a6bad00acbfeed3f33c6e44fa3f936efc998c795bfb15c61a79ecf62/Pylons-1.0.1.tar.gz"; |
|
191 | 204 | md5 = "6cb880d75fa81213192142b07a6e4915"; |
|
192 | 205 | }; |
|
193 | 206 | meta = { |
|
194 | 207 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
195 | 208 | }; |
|
196 | 209 | }; |
|
197 | 210 | Pyro4 = super.buildPythonPackage { |
|
198 | 211 | name = "Pyro4-4.41"; |
|
199 | 212 | buildInputs = with self; []; |
|
200 | 213 | doCheck = false; |
|
201 | 214 | propagatedBuildInputs = with self; [serpent]; |
|
202 | 215 | src = fetchurl { |
|
203 | 216 | url = "https://pypi.python.org/packages/56/2b/89b566b4bf3e7f8ba790db2d1223852f8cb454c52cab7693dd41f608ca2a/Pyro4-4.41.tar.gz"; |
|
204 | 217 | md5 = "ed69e9bfafa9c06c049a87cb0c4c2b6c"; |
|
205 | 218 | }; |
|
206 | 219 | meta = { |
|
207 | 220 | license = [ pkgs.lib.licenses.mit ]; |
|
208 | 221 | }; |
|
209 | 222 | }; |
|
210 | 223 | Routes = super.buildPythonPackage { |
|
211 | 224 | name = "Routes-1.13"; |
|
212 | 225 | buildInputs = with self; []; |
|
213 | 226 | doCheck = false; |
|
214 | 227 | propagatedBuildInputs = with self; [repoze.lru]; |
|
215 | 228 | src = fetchurl { |
|
216 | 229 | url = "https://pypi.python.org/packages/88/d3/259c3b3cde8837eb9441ab5f574a660e8a4acea8f54a078441d4d2acac1c/Routes-1.13.tar.gz"; |
|
217 | 230 | md5 = "d527b0ab7dd9172b1275a41f97448783"; |
|
218 | 231 | }; |
|
219 | 232 | meta = { |
|
220 | 233 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
221 | 234 | }; |
|
222 | 235 | }; |
|
223 | 236 | SQLAlchemy = super.buildPythonPackage { |
|
224 | 237 | name = "SQLAlchemy-0.9.9"; |
|
225 | 238 | buildInputs = with self; []; |
|
226 | 239 | doCheck = false; |
|
227 | 240 | propagatedBuildInputs = with self; []; |
|
228 | 241 | src = fetchurl { |
|
229 | 242 | url = "https://pypi.python.org/packages/28/f7/1bbfd0d8597e8c358d5e15a166a486ad82fc5579b4e67b6ef7c05b1d182b/SQLAlchemy-0.9.9.tar.gz"; |
|
230 | 243 | md5 = "8a10a9bd13ed3336ef7333ac2cc679ff"; |
|
231 | 244 | }; |
|
232 | 245 | meta = { |
|
233 | 246 | license = [ pkgs.lib.licenses.mit ]; |
|
234 | 247 | }; |
|
235 | 248 | }; |
|
236 | 249 | Sphinx = super.buildPythonPackage { |
|
237 | 250 | name = "Sphinx-1.2.2"; |
|
238 | 251 | buildInputs = with self; []; |
|
239 | 252 | doCheck = false; |
|
240 | 253 | propagatedBuildInputs = with self; [Pygments docutils Jinja2]; |
|
241 | 254 | src = fetchurl { |
|
242 | 255 | url = "https://pypi.python.org/packages/0a/50/34017e6efcd372893a416aba14b84a1a149fc7074537b0e9cb6ca7b7abe9/Sphinx-1.2.2.tar.gz"; |
|
243 | 256 | md5 = "3dc73ccaa8d0bfb2d62fb671b1f7e8a4"; |
|
244 | 257 | }; |
|
245 | 258 | meta = { |
|
246 | 259 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
247 | 260 | }; |
|
248 | 261 | }; |
|
249 | 262 | Tempita = super.buildPythonPackage { |
|
250 | 263 | name = "Tempita-0.5.2"; |
|
251 | 264 | buildInputs = with self; []; |
|
252 | 265 | doCheck = false; |
|
253 | 266 | propagatedBuildInputs = with self; []; |
|
254 | 267 | src = fetchurl { |
|
255 | 268 | url = "https://pypi.python.org/packages/56/c8/8ed6eee83dbddf7b0fc64dd5d4454bc05e6ccaafff47991f73f2894d9ff4/Tempita-0.5.2.tar.gz"; |
|
256 | 269 | md5 = "4c2f17bb9d481821c41b6fbee904cea1"; |
|
257 | 270 | }; |
|
258 | 271 | meta = { |
|
259 | 272 | license = [ pkgs.lib.licenses.mit ]; |
|
260 | 273 | }; |
|
261 | 274 | }; |
|
262 | 275 | URLObject = super.buildPythonPackage { |
|
263 | 276 | name = "URLObject-2.4.0"; |
|
264 | 277 | buildInputs = with self; []; |
|
265 | 278 | doCheck = false; |
|
266 | 279 | propagatedBuildInputs = with self; []; |
|
267 | 280 | src = fetchurl { |
|
268 | 281 | url = "https://pypi.python.org/packages/cb/b6/e25e58500f9caef85d664bec71ec67c116897bfebf8622c32cb75d1ca199/URLObject-2.4.0.tar.gz"; |
|
269 | 282 | md5 = "2ed819738a9f0a3051f31dc9924e3065"; |
|
270 | 283 | }; |
|
271 | 284 | meta = { |
|
272 | 285 | license = [ ]; |
|
273 | 286 | }; |
|
274 | 287 | }; |
|
275 | 288 | WebError = super.buildPythonPackage { |
|
276 | 289 | name = "WebError-0.10.3"; |
|
277 | 290 | buildInputs = with self; []; |
|
278 | 291 | doCheck = false; |
|
279 | 292 | propagatedBuildInputs = with self; [WebOb Tempita Pygments Paste]; |
|
280 | 293 | src = fetchurl { |
|
281 | 294 | url = "https://pypi.python.org/packages/35/76/e7e5c2ce7e9c7f31b54c1ff295a495886d1279a002557d74dd8957346a79/WebError-0.10.3.tar.gz"; |
|
282 | 295 | md5 = "84b9990b0baae6fd440b1e60cdd06f9a"; |
|
283 | 296 | }; |
|
284 | 297 | meta = { |
|
285 | 298 | license = [ pkgs.lib.licenses.mit ]; |
|
286 | 299 | }; |
|
287 | 300 | }; |
|
288 | 301 | WebHelpers = super.buildPythonPackage { |
|
289 | 302 | name = "WebHelpers-1.3"; |
|
290 | 303 | buildInputs = with self; []; |
|
291 | 304 | doCheck = false; |
|
292 | 305 | propagatedBuildInputs = with self; [MarkupSafe]; |
|
293 | 306 | src = fetchurl { |
|
294 | 307 | url = "https://pypi.python.org/packages/ee/68/4d07672821d514184357f1552f2dad923324f597e722de3b016ca4f7844f/WebHelpers-1.3.tar.gz"; |
|
295 | 308 | md5 = "32749ffadfc40fea51075a7def32588b"; |
|
296 | 309 | }; |
|
297 | 310 | meta = { |
|
298 | 311 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
299 | 312 | }; |
|
300 | 313 | }; |
|
301 | 314 | WebHelpers2 = super.buildPythonPackage { |
|
302 | 315 | name = "WebHelpers2-2.0"; |
|
303 | 316 | buildInputs = with self; []; |
|
304 | 317 | doCheck = false; |
|
305 | 318 | propagatedBuildInputs = with self; [MarkupSafe six]; |
|
306 | 319 | src = fetchurl { |
|
307 | 320 | url = "https://pypi.python.org/packages/ff/30/56342c6ea522439e3662427c8d7b5e5b390dff4ff2dc92d8afcb8ab68b75/WebHelpers2-2.0.tar.gz"; |
|
308 | 321 | md5 = "0f6b68d70c12ee0aed48c00b24da13d3"; |
|
309 | 322 | }; |
|
310 | 323 | meta = { |
|
311 | 324 | license = [ pkgs.lib.licenses.mit ]; |
|
312 | 325 | }; |
|
313 | 326 | }; |
|
314 | 327 | WebOb = super.buildPythonPackage { |
|
315 | 328 | name = "WebOb-1.3.1"; |
|
316 | 329 | buildInputs = with self; []; |
|
317 | 330 | doCheck = false; |
|
318 | 331 | propagatedBuildInputs = with self; []; |
|
319 | 332 | src = fetchurl { |
|
320 | 333 | url = "https://pypi.python.org/packages/16/78/adfc0380b8a0d75b2d543fa7085ba98a573b1ae486d9def88d172b81b9fa/WebOb-1.3.1.tar.gz"; |
|
321 | 334 | md5 = "20918251c5726956ba8fef22d1556177"; |
|
322 | 335 | }; |
|
323 | 336 | meta = { |
|
324 | 337 | license = [ pkgs.lib.licenses.mit ]; |
|
325 | 338 | }; |
|
326 | 339 | }; |
|
327 | 340 | WebTest = super.buildPythonPackage { |
|
328 | 341 | name = "WebTest-1.4.3"; |
|
329 | 342 | buildInputs = with self; []; |
|
330 | 343 | doCheck = false; |
|
331 | 344 | propagatedBuildInputs = with self; [WebOb]; |
|
332 | 345 | src = fetchurl { |
|
333 | 346 | url = "https://pypi.python.org/packages/51/3d/84fd0f628df10b30c7db87895f56d0158e5411206b721ca903cb51bfd948/WebTest-1.4.3.zip"; |
|
334 | 347 | md5 = "631ce728bed92c681a4020a36adbc353"; |
|
335 | 348 | }; |
|
336 | 349 | meta = { |
|
337 | 350 | license = [ pkgs.lib.licenses.mit ]; |
|
338 | 351 | }; |
|
339 | 352 | }; |
|
340 | 353 | Whoosh = super.buildPythonPackage { |
|
341 | 354 | name = "Whoosh-2.7.0"; |
|
342 | 355 | buildInputs = with self; []; |
|
343 | 356 | doCheck = false; |
|
344 | 357 | propagatedBuildInputs = with self; []; |
|
345 | 358 | src = fetchurl { |
|
346 | 359 | url = "https://pypi.python.org/packages/1c/dc/2f0231ff3875ded36df8c1ab851451e51a237dc0e5a86d3d96036158da94/Whoosh-2.7.0.zip"; |
|
347 | 360 | md5 = "7abfd970f16fadc7311960f3fa0bc7a9"; |
|
348 | 361 | }; |
|
349 | 362 | meta = { |
|
350 | 363 | license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.bsd2 ]; |
|
351 | 364 | }; |
|
352 | 365 | }; |
|
353 | 366 | alembic = super.buildPythonPackage { |
|
354 | 367 | name = "alembic-0.8.4"; |
|
355 | 368 | buildInputs = with self; []; |
|
356 | 369 | doCheck = false; |
|
357 | 370 | propagatedBuildInputs = with self; [SQLAlchemy Mako python-editor]; |
|
358 | 371 | src = fetchurl { |
|
359 | 372 | url = "https://pypi.python.org/packages/ca/7e/299b4499b5c75e5a38c5845145ad24755bebfb8eec07a2e1c366b7181eeb/alembic-0.8.4.tar.gz"; |
|
360 | 373 | md5 = "5f95d8ee62b443f9b37eb5bee76c582d"; |
|
361 | 374 | }; |
|
362 | 375 | meta = { |
|
363 | 376 | license = [ pkgs.lib.licenses.mit ]; |
|
364 | 377 | }; |
|
365 | 378 | }; |
|
366 | 379 | amqplib = super.buildPythonPackage { |
|
367 | 380 | name = "amqplib-1.0.2"; |
|
368 | 381 | buildInputs = with self; []; |
|
369 | 382 | doCheck = false; |
|
370 | 383 | propagatedBuildInputs = with self; []; |
|
371 | 384 | src = fetchurl { |
|
372 | 385 | url = "https://pypi.python.org/packages/75/b7/8c2429bf8d92354a0118614f9a4d15e53bc69ebedce534284111de5a0102/amqplib-1.0.2.tgz"; |
|
373 | 386 | md5 = "5c92f17fbedd99b2b4a836d4352d1e2f"; |
|
374 | 387 | }; |
|
375 | 388 | meta = { |
|
376 | 389 | license = [ { fullName = "LGPL"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
377 | 390 | }; |
|
378 | 391 | }; |
|
379 | 392 | anyjson = super.buildPythonPackage { |
|
380 | 393 | name = "anyjson-0.3.3"; |
|
381 | 394 | buildInputs = with self; []; |
|
382 | 395 | doCheck = false; |
|
383 | 396 | propagatedBuildInputs = with self; []; |
|
384 | 397 | src = fetchurl { |
|
385 | 398 | url = "https://pypi.python.org/packages/c3/4d/d4089e1a3dd25b46bebdb55a992b0797cff657b4477bc32ce28038fdecbc/anyjson-0.3.3.tar.gz"; |
|
386 | 399 | md5 = "2ea28d6ec311aeeebaf993cb3008b27c"; |
|
387 | 400 | }; |
|
388 | 401 | meta = { |
|
389 | 402 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
390 | 403 | }; |
|
391 | 404 | }; |
|
392 | 405 | appenlight-client = super.buildPythonPackage { |
|
393 | 406 | name = "appenlight-client-0.6.14"; |
|
394 | 407 | buildInputs = with self; []; |
|
395 | 408 | doCheck = false; |
|
396 | 409 | propagatedBuildInputs = with self; [WebOb requests]; |
|
397 | 410 | src = fetchurl { |
|
398 | 411 | url = "https://pypi.python.org/packages/4d/e0/23fee3ebada8143f707e65c06bcb82992040ee64ea8355e044ed55ebf0c1/appenlight_client-0.6.14.tar.gz"; |
|
399 | 412 | md5 = "578c69b09f4356d898fff1199b98a95c"; |
|
400 | 413 | }; |
|
401 | 414 | meta = { |
|
402 | 415 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "DFSG approved"; } ]; |
|
403 | 416 | }; |
|
404 | 417 | }; |
|
405 | 418 | authomatic = super.buildPythonPackage { |
|
406 | 419 | name = "authomatic-0.1.0.post1"; |
|
407 | 420 | buildInputs = with self; []; |
|
408 | 421 | doCheck = false; |
|
409 | 422 | propagatedBuildInputs = with self; []; |
|
410 | 423 | src = fetchurl { |
|
411 | 424 | url = "https://pypi.python.org/packages/08/1a/8a930461e604c2d5a7a871e1ac59fa82ccf994c32e807230c8d2fb07815a/Authomatic-0.1.0.post1.tar.gz"; |
|
412 | 425 | md5 = "be3f3ce08747d776aae6d6cc8dcb49a9"; |
|
413 | 426 | }; |
|
414 | 427 | meta = { |
|
415 | 428 | license = [ pkgs.lib.licenses.mit ]; |
|
416 | 429 | }; |
|
417 | 430 | }; |
|
418 | 431 | backport-ipaddress = super.buildPythonPackage { |
|
419 | 432 | name = "backport-ipaddress-0.1"; |
|
420 | 433 | buildInputs = with self; []; |
|
421 | 434 | doCheck = false; |
|
422 | 435 | propagatedBuildInputs = with self; []; |
|
423 | 436 | src = fetchurl { |
|
424 | 437 | url = "https://pypi.python.org/packages/d3/30/54c6dab05a4dec44db25ff309f1fbb6b7a8bde3f2bade38bb9da67bbab8f/backport_ipaddress-0.1.tar.gz"; |
|
425 | 438 | md5 = "9c1f45f4361f71b124d7293a60006c05"; |
|
426 | 439 | }; |
|
427 | 440 | meta = { |
|
428 | 441 | license = [ pkgs.lib.licenses.psfl ]; |
|
429 | 442 | }; |
|
430 | 443 | }; |
|
431 | 444 | bottle = super.buildPythonPackage { |
|
432 | 445 | name = "bottle-0.12.8"; |
|
433 | 446 | buildInputs = with self; []; |
|
434 | 447 | doCheck = false; |
|
435 | 448 | propagatedBuildInputs = with self; []; |
|
436 | 449 | src = fetchurl { |
|
437 | 450 | url = "https://pypi.python.org/packages/52/df/e4a408f3a7af396d186d4ecd3b389dd764f0f943b4fa8d257bfe7b49d343/bottle-0.12.8.tar.gz"; |
|
438 | 451 | md5 = "13132c0a8f607bf860810a6ee9064c5b"; |
|
439 | 452 | }; |
|
440 | 453 | meta = { |
|
441 | 454 | license = [ pkgs.lib.licenses.mit ]; |
|
442 | 455 | }; |
|
443 | 456 | }; |
|
444 | 457 | bumpversion = super.buildPythonPackage { |
|
445 | 458 | name = "bumpversion-0.5.3"; |
|
446 | 459 | buildInputs = with self; []; |
|
447 | 460 | doCheck = false; |
|
448 | 461 | propagatedBuildInputs = with self; []; |
|
449 | 462 | src = fetchurl { |
|
450 | 463 | url = "https://pypi.python.org/packages/14/41/8c9da3549f8e00c84f0432c3a8cf8ed6898374714676aab91501d48760db/bumpversion-0.5.3.tar.gz"; |
|
451 | 464 | md5 = "c66a3492eafcf5ad4b024be9fca29820"; |
|
452 | 465 | }; |
|
453 | 466 | meta = { |
|
454 | 467 | license = [ pkgs.lib.licenses.mit ]; |
|
455 | 468 | }; |
|
456 | 469 | }; |
|
457 | 470 | celery = super.buildPythonPackage { |
|
458 | 471 | name = "celery-2.2.10"; |
|
459 | 472 | buildInputs = with self; []; |
|
460 | 473 | doCheck = false; |
|
461 | 474 | propagatedBuildInputs = with self; [python-dateutil anyjson kombu pyparsing]; |
|
462 | 475 | src = fetchurl { |
|
463 | 476 | url = "https://pypi.python.org/packages/b1/64/860fd50e45844c83442e7953effcddeff66b2851d90b2d784f7201c111b8/celery-2.2.10.tar.gz"; |
|
464 | 477 | md5 = "898bc87e54f278055b561316ba73e222"; |
|
465 | 478 | }; |
|
466 | 479 | meta = { |
|
467 | 480 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
468 | 481 | }; |
|
469 | 482 | }; |
|
483 | channelstream = super.buildPythonPackage { | |
|
484 | name = "channelstream-0.5.2"; | |
|
485 | buildInputs = with self; []; | |
|
486 | doCheck = false; | |
|
487 | propagatedBuildInputs = with self; [gevent ws4py pyramid pyramid-jinja2 itsdangerous requests six]; | |
|
488 | src = fetchurl { | |
|
489 | url = "https://pypi.python.org/packages/2b/31/29a8e085cf5bf97fa88e7b947adabfc581a18a3463adf77fb6dada34a65f/channelstream-0.5.2.tar.gz"; | |
|
490 | md5 = "1c5eb2a8a405be6f1073da94da6d81d3"; | |
|
491 | }; | |
|
492 | meta = { | |
|
493 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
|
494 | }; | |
|
495 | }; | |
|
470 | 496 | click = super.buildPythonPackage { |
|
471 | 497 | name = "click-5.1"; |
|
472 | 498 | buildInputs = with self; []; |
|
473 | 499 | doCheck = false; |
|
474 | 500 | propagatedBuildInputs = with self; []; |
|
475 | 501 | src = fetchurl { |
|
476 | 502 | url = "https://pypi.python.org/packages/b7/34/a496632c4fb6c1ee76efedf77bb8d28b29363d839953d95095b12defe791/click-5.1.tar.gz"; |
|
477 | 503 | md5 = "9c5323008cccfe232a8b161fc8196d41"; |
|
478 | 504 | }; |
|
479 | 505 | meta = { |
|
480 | 506 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
481 | 507 | }; |
|
482 | 508 | }; |
|
483 | 509 | colander = super.buildPythonPackage { |
|
484 | 510 | name = "colander-1.2"; |
|
485 | 511 | buildInputs = with self; []; |
|
486 | 512 | doCheck = false; |
|
487 | 513 | propagatedBuildInputs = with self; [translationstring iso8601]; |
|
488 | 514 | src = fetchurl { |
|
489 | 515 | url = "https://pypi.python.org/packages/14/23/c9ceba07a6a1dc0eefbb215fc0dc64aabc2b22ee756bc0f0c13278fa0887/colander-1.2.tar.gz"; |
|
490 | 516 | md5 = "83db21b07936a0726e588dae1914b9ed"; |
|
491 | 517 | }; |
|
492 | 518 | meta = { |
|
493 | 519 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
494 | 520 | }; |
|
495 | 521 | }; |
|
496 | 522 | configobj = super.buildPythonPackage { |
|
497 | 523 | name = "configobj-5.0.6"; |
|
498 | 524 | buildInputs = with self; []; |
|
499 | 525 | doCheck = false; |
|
500 | 526 | propagatedBuildInputs = with self; [six]; |
|
501 | 527 | src = fetchurl { |
|
502 | 528 | url = "https://pypi.python.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz"; |
|
503 | 529 | md5 = "e472a3a1c2a67bb0ec9b5d54c13a47d6"; |
|
504 | 530 | }; |
|
505 | 531 | meta = { |
|
506 | 532 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
507 | 533 | }; |
|
508 | 534 | }; |
|
509 | 535 | cov-core = super.buildPythonPackage { |
|
510 | 536 | name = "cov-core-1.15.0"; |
|
511 | 537 | buildInputs = with self; []; |
|
512 | 538 | doCheck = false; |
|
513 | 539 | propagatedBuildInputs = with self; [coverage]; |
|
514 | 540 | src = fetchurl { |
|
515 | 541 | url = "https://pypi.python.org/packages/4b/87/13e75a47b4ba1be06f29f6d807ca99638bedc6b57fa491cd3de891ca2923/cov-core-1.15.0.tar.gz"; |
|
516 | 542 | md5 = "f519d4cb4c4e52856afb14af52919fe6"; |
|
517 | 543 | }; |
|
518 | 544 | meta = { |
|
519 | 545 | license = [ pkgs.lib.licenses.mit ]; |
|
520 | 546 | }; |
|
521 | 547 | }; |
|
522 | 548 | coverage = super.buildPythonPackage { |
|
523 | 549 | name = "coverage-3.7.1"; |
|
524 | 550 | buildInputs = with self; []; |
|
525 | 551 | doCheck = false; |
|
526 | 552 | propagatedBuildInputs = with self; []; |
|
527 | 553 | src = fetchurl { |
|
528 | 554 | url = "https://pypi.python.org/packages/09/4f/89b06c7fdc09687bca507dc411c342556ef9c5a3b26756137a4878ff19bf/coverage-3.7.1.tar.gz"; |
|
529 | 555 | md5 = "c47b36ceb17eaff3ecfab3bcd347d0df"; |
|
530 | 556 | }; |
|
531 | 557 | meta = { |
|
532 | 558 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
533 | 559 | }; |
|
534 | 560 | }; |
|
535 | 561 | cssselect = super.buildPythonPackage { |
|
536 | 562 | name = "cssselect-0.9.1"; |
|
537 | 563 | buildInputs = with self; []; |
|
538 | 564 | doCheck = false; |
|
539 | 565 | propagatedBuildInputs = with self; []; |
|
540 | 566 | src = fetchurl { |
|
541 | 567 | url = "https://pypi.python.org/packages/aa/e5/9ee1460d485b94a6d55732eb7ad5b6c084caf73dd6f9cb0bb7d2a78fafe8/cssselect-0.9.1.tar.gz"; |
|
542 | 568 | md5 = "c74f45966277dc7a0f768b9b0f3522ac"; |
|
543 | 569 | }; |
|
544 | 570 | meta = { |
|
545 | 571 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
546 | 572 | }; |
|
547 | 573 | }; |
|
548 | 574 | decorator = super.buildPythonPackage { |
|
549 | 575 | name = "decorator-3.4.2"; |
|
550 | 576 | buildInputs = with self; []; |
|
551 | 577 | doCheck = false; |
|
552 | 578 | propagatedBuildInputs = with self; []; |
|
553 | 579 | src = fetchurl { |
|
554 | 580 | url = "https://pypi.python.org/packages/35/3a/42566eb7a2cbac774399871af04e11d7ae3fc2579e7dae85213b8d1d1c57/decorator-3.4.2.tar.gz"; |
|
555 | 581 | md5 = "9e0536870d2b83ae27d58dbf22582f4d"; |
|
556 | 582 | }; |
|
557 | 583 | meta = { |
|
558 | 584 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
559 | 585 | }; |
|
560 | 586 | }; |
|
587 | deform = super.buildPythonPackage { | |
|
588 | name = "deform-2.0a2"; | |
|
589 | buildInputs = with self; []; | |
|
590 | doCheck = false; | |
|
591 | propagatedBuildInputs = with self; [Chameleon colander peppercorn translationstring zope.deprecation]; | |
|
592 | src = fetchurl { | |
|
593 | url = "https://pypi.python.org/packages/8d/b3/aab57e81da974a806dc9c5fa024a6404720f890a6dcf2e80885e3cb4609a/deform-2.0a2.tar.gz"; | |
|
594 | md5 = "7a90d41f7fbc18002ce74f39bd90a5e4"; | |
|
595 | }; | |
|
596 | meta = { | |
|
597 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; | |
|
598 | }; | |
|
599 | }; | |
|
561 | 600 | docutils = super.buildPythonPackage { |
|
562 | 601 | name = "docutils-0.12"; |
|
563 | 602 | buildInputs = with self; []; |
|
564 | 603 | doCheck = false; |
|
565 | 604 | propagatedBuildInputs = with self; []; |
|
566 | 605 | src = fetchurl { |
|
567 | 606 | url = "https://pypi.python.org/packages/37/38/ceda70135b9144d84884ae2fc5886c6baac4edea39550f28bcd144c1234d/docutils-0.12.tar.gz"; |
|
568 | 607 | md5 = "4622263b62c5c771c03502afa3157768"; |
|
569 | 608 | }; |
|
570 | 609 | meta = { |
|
571 | 610 | license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.publicDomain pkgs.lib.licenses.gpl1 { fullName = "public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)"; } pkgs.lib.licenses.psfl ]; |
|
572 | 611 | }; |
|
573 | 612 | }; |
|
574 | 613 | dogpile.cache = super.buildPythonPackage { |
|
575 |
name = "dogpile.cache-0. |
|
|
614 | name = "dogpile.cache-0.6.1"; | |
|
576 | 615 | buildInputs = with self; []; |
|
577 | 616 | doCheck = false; |
|
578 |
propagatedBuildInputs = with self; [ |
|
|
617 | propagatedBuildInputs = with self; []; | |
|
579 | 618 | src = fetchurl { |
|
580 | url = "https://pypi.python.org/packages/07/74/2a83bedf758156d9c95d112691bbad870d3b77ccbcfb781b4ef836ea7d96/dogpile.cache-0.5.7.tar.gz"; | |
|
581 | md5 = "3e58ce41af574aab41d78e9c4190f194"; | |
|
619 | url = "https://pypi.python.org/packages/f6/a0/6f2142c58c6588d17c734265b103ae1cd0741e1681dd9483a63f22033375/dogpile.cache-0.6.1.tar.gz"; | |
|
620 | md5 = "35d7fb30f22bbd0685763d894dd079a9"; | |
|
582 | 621 | }; |
|
583 | 622 | meta = { |
|
584 | 623 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
585 | 624 | }; |
|
586 | 625 | }; |
|
587 | 626 | dogpile.core = super.buildPythonPackage { |
|
588 | 627 | name = "dogpile.core-0.4.1"; |
|
589 | 628 | buildInputs = with self; []; |
|
590 | 629 | doCheck = false; |
|
591 | 630 | propagatedBuildInputs = with self; []; |
|
592 | 631 | src = fetchurl { |
|
593 | 632 | url = "https://pypi.python.org/packages/0e/77/e72abc04c22aedf874301861e5c1e761231c288b5de369c18be8f4b5c9bb/dogpile.core-0.4.1.tar.gz"; |
|
594 | 633 | md5 = "01cb19f52bba3e95c9b560f39341f045"; |
|
595 | 634 | }; |
|
596 | 635 | meta = { |
|
597 | 636 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
598 | 637 | }; |
|
599 | 638 | }; |
|
600 | 639 | dulwich = super.buildPythonPackage { |
|
601 | 640 | name = "dulwich-0.12.0"; |
|
602 | 641 | buildInputs = with self; []; |
|
603 | 642 | doCheck = false; |
|
604 | 643 | propagatedBuildInputs = with self; []; |
|
605 | 644 | src = fetchurl { |
|
606 | 645 | url = "https://pypi.python.org/packages/6f/04/fbe561b6d45c0ec758330d5b7f5ba4b6cb4f1ca1ab49859d2fc16320da75/dulwich-0.12.0.tar.gz"; |
|
607 | 646 | md5 = "f3a8a12bd9f9dd8c233e18f3d49436fa"; |
|
608 | 647 | }; |
|
609 | 648 | meta = { |
|
610 | 649 | license = [ pkgs.lib.licenses.gpl2Plus ]; |
|
611 | 650 | }; |
|
612 | 651 | }; |
|
613 | 652 | ecdsa = super.buildPythonPackage { |
|
614 | 653 | name = "ecdsa-0.11"; |
|
615 | 654 | buildInputs = with self; []; |
|
616 | 655 | doCheck = false; |
|
617 | 656 | propagatedBuildInputs = with self; []; |
|
618 | 657 | src = fetchurl { |
|
619 | 658 | url = "https://pypi.python.org/packages/6c/3f/92fe5dcdcaa7bd117be21e5520c9a54375112b66ec000d209e9e9519fad1/ecdsa-0.11.tar.gz"; |
|
620 | 659 | md5 = "8ef586fe4dbb156697d756900cb41d7c"; |
|
621 | 660 | }; |
|
622 | 661 | meta = { |
|
623 | 662 | license = [ pkgs.lib.licenses.mit ]; |
|
624 | 663 | }; |
|
625 | 664 | }; |
|
626 | 665 | elasticsearch = super.buildPythonPackage { |
|
627 | 666 | name = "elasticsearch-2.3.0"; |
|
628 | 667 | buildInputs = with self; []; |
|
629 | 668 | doCheck = false; |
|
630 | 669 | propagatedBuildInputs = with self; [urllib3]; |
|
631 | 670 | src = fetchurl { |
|
632 | 671 | url = "https://pypi.python.org/packages/10/35/5fd52c5f0b0ee405ed4b5195e8bce44c5e041787680dc7b94b8071cac600/elasticsearch-2.3.0.tar.gz"; |
|
633 | 672 | md5 = "2550f3b51629cf1ef9636608af92c340"; |
|
634 | 673 | }; |
|
635 | 674 | meta = { |
|
636 | 675 | license = [ pkgs.lib.licenses.asl20 ]; |
|
637 | 676 | }; |
|
638 | 677 | }; |
|
639 | 678 | elasticsearch-dsl = super.buildPythonPackage { |
|
640 | 679 | name = "elasticsearch-dsl-2.0.0"; |
|
641 | 680 | buildInputs = with self; []; |
|
642 | 681 | doCheck = false; |
|
643 | 682 | propagatedBuildInputs = with self; [six python-dateutil elasticsearch]; |
|
644 | 683 | src = fetchurl { |
|
645 | 684 | url = "https://pypi.python.org/packages/4e/5d/e788ae8dbe2ff4d13426db0a027533386a5c276c77a2654dc0e2007ce04a/elasticsearch-dsl-2.0.0.tar.gz"; |
|
646 | 685 | md5 = "4cdfec81bb35383dd3b7d02d7dc5ee68"; |
|
647 | 686 | }; |
|
648 | 687 | meta = { |
|
649 | 688 | license = [ pkgs.lib.licenses.asl20 ]; |
|
650 | 689 | }; |
|
651 | 690 | }; |
|
652 | 691 | flake8 = super.buildPythonPackage { |
|
653 | 692 | name = "flake8-2.4.1"; |
|
654 | 693 | buildInputs = with self; []; |
|
655 | 694 | doCheck = false; |
|
656 | 695 | propagatedBuildInputs = with self; [pyflakes pep8 mccabe]; |
|
657 | 696 | src = fetchurl { |
|
658 | 697 | url = "https://pypi.python.org/packages/8f/b5/9a73c66c7dba273bac8758398f060c008a25f3e84531063b42503b5d0a95/flake8-2.4.1.tar.gz"; |
|
659 | 698 | md5 = "ed45d3db81a3b7c88bd63c6e37ca1d65"; |
|
660 | 699 | }; |
|
661 | 700 | meta = { |
|
662 | 701 | license = [ pkgs.lib.licenses.mit ]; |
|
663 | 702 | }; |
|
664 | 703 | }; |
|
665 | 704 | future = super.buildPythonPackage { |
|
666 | 705 | name = "future-0.14.3"; |
|
667 | 706 | buildInputs = with self; []; |
|
668 | 707 | doCheck = false; |
|
669 | 708 | propagatedBuildInputs = with self; []; |
|
670 | 709 | src = fetchurl { |
|
671 | 710 | url = "https://pypi.python.org/packages/83/80/8ef3a11a15f8eaafafa0937b20c1b3f73527e69ab6b3fa1cf94a5a96aabb/future-0.14.3.tar.gz"; |
|
672 | 711 | md5 = "e94079b0bd1fc054929e8769fc0f6083"; |
|
673 | 712 | }; |
|
674 | 713 | meta = { |
|
675 | 714 | license = [ { fullName = "OSI Approved"; } pkgs.lib.licenses.mit ]; |
|
676 | 715 | }; |
|
677 | 716 | }; |
|
678 | 717 | futures = super.buildPythonPackage { |
|
679 | 718 | name = "futures-3.0.2"; |
|
680 | 719 | buildInputs = with self; []; |
|
681 | 720 | doCheck = false; |
|
682 | 721 | propagatedBuildInputs = with self; []; |
|
683 | 722 | src = fetchurl { |
|
684 | 723 | url = "https://pypi.python.org/packages/f8/e7/fc0fcbeb9193ba2d4de00b065e7fd5aecd0679e93ce95a07322b2b1434f4/futures-3.0.2.tar.gz"; |
|
685 | 724 | md5 = "42aaf1e4de48d6e871d77dc1f9d96d5a"; |
|
686 | 725 | }; |
|
687 | 726 | meta = { |
|
688 | 727 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
689 | 728 | }; |
|
690 | 729 | }; |
|
730 | gevent = super.buildPythonPackage { | |
|
731 | name = "gevent-1.1.1"; | |
|
732 | buildInputs = with self; []; | |
|
733 | doCheck = false; | |
|
734 | propagatedBuildInputs = with self; [greenlet]; | |
|
735 | src = fetchurl { | |
|
736 | url = "https://pypi.python.org/packages/12/dc/0b2e57823225de86f6e111a65d212c9e3b64847dddaa19691a6cb94b0b2e/gevent-1.1.1.tar.gz"; | |
|
737 | md5 = "1532f5396ab4d07a231f1935483be7c3"; | |
|
738 | }; | |
|
739 | meta = { | |
|
740 | license = [ pkgs.lib.licenses.mit ]; | |
|
741 | }; | |
|
742 | }; | |
|
691 | 743 | gnureadline = super.buildPythonPackage { |
|
692 | 744 | name = "gnureadline-6.3.3"; |
|
693 | 745 | buildInputs = with self; []; |
|
694 | 746 | doCheck = false; |
|
695 | 747 | propagatedBuildInputs = with self; []; |
|
696 | 748 | src = fetchurl { |
|
697 | 749 | url = "https://pypi.python.org/packages/3a/ee/2c3f568b0a74974791ac590ec742ef6133e2fbd287a074ba72a53fa5e97c/gnureadline-6.3.3.tar.gz"; |
|
698 | 750 | md5 = "c4af83c9a3fbeac8f2da9b5a7c60e51c"; |
|
699 | 751 | }; |
|
700 | 752 | meta = { |
|
701 | 753 | license = [ pkgs.lib.licenses.gpl1 ]; |
|
702 | 754 | }; |
|
703 | 755 | }; |
|
704 | 756 | gprof2dot = super.buildPythonPackage { |
|
705 | name = "gprof2dot-2015.12.1"; | |
|
757 | name = "gprof2dot-2015.12.01"; | |
|
706 | 758 | buildInputs = with self; []; |
|
707 | 759 | doCheck = false; |
|
708 | 760 | propagatedBuildInputs = with self; []; |
|
709 | 761 | src = fetchurl { |
|
710 | 762 | url = "https://pypi.python.org/packages/b9/34/7bf93c1952d40fa5c95ad963f4d8344b61ef58558632402eca18e6c14127/gprof2dot-2015.12.1.tar.gz"; |
|
711 | 763 | md5 = "e23bf4e2f94db032750c193384b4165b"; |
|
712 | 764 | }; |
|
713 | 765 | meta = { |
|
714 | 766 | license = [ { fullName = "LGPL"; } ]; |
|
715 | 767 | }; |
|
716 | 768 | }; |
|
769 | greenlet = super.buildPythonPackage { | |
|
770 | name = "greenlet-0.4.9"; | |
|
771 | buildInputs = with self; []; | |
|
772 | doCheck = false; | |
|
773 | propagatedBuildInputs = with self; []; | |
|
774 | src = fetchurl { | |
|
775 | url = "https://pypi.python.org/packages/4e/3d/9d421539b74e33608b245092870156b2e171fb49f2b51390aa4641eecb4a/greenlet-0.4.9.zip"; | |
|
776 | md5 = "c6659cdb2a5e591723e629d2eef22e82"; | |
|
777 | }; | |
|
778 | meta = { | |
|
779 | license = [ pkgs.lib.licenses.mit ]; | |
|
780 | }; | |
|
781 | }; | |
|
717 | 782 | gunicorn = super.buildPythonPackage { |
|
718 | 783 | name = "gunicorn-19.6.0"; |
|
719 | 784 | buildInputs = with self; []; |
|
720 | 785 | doCheck = false; |
|
721 | 786 | propagatedBuildInputs = with self; []; |
|
722 | 787 | src = fetchurl { |
|
723 | 788 | url = "https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/gunicorn-19.6.0.tar.gz"; |
|
724 | 789 | md5 = "338e5e8a83ea0f0625f768dba4597530"; |
|
725 | 790 | }; |
|
726 | 791 | meta = { |
|
727 | 792 | license = [ pkgs.lib.licenses.mit ]; |
|
728 | 793 | }; |
|
729 | 794 | }; |
|
730 | 795 | infrae.cache = super.buildPythonPackage { |
|
731 | 796 | name = "infrae.cache-1.0.1"; |
|
732 | 797 | buildInputs = with self; []; |
|
733 | 798 | doCheck = false; |
|
734 | 799 | propagatedBuildInputs = with self; [Beaker repoze.lru]; |
|
735 | 800 | src = fetchurl { |
|
736 | 801 | url = "https://pypi.python.org/packages/bb/f0/e7d5e984cf6592fd2807dc7bc44a93f9d18e04e6a61f87fdfb2622422d74/infrae.cache-1.0.1.tar.gz"; |
|
737 | 802 | md5 = "b09076a766747e6ed2a755cc62088e32"; |
|
738 | 803 | }; |
|
739 | 804 | meta = { |
|
740 | 805 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
741 | 806 | }; |
|
742 | 807 | }; |
|
743 | 808 | invoke = super.buildPythonPackage { |
|
744 | 809 | name = "invoke-0.13.0"; |
|
745 | 810 | buildInputs = with self; []; |
|
746 | 811 | doCheck = false; |
|
747 | 812 | propagatedBuildInputs = with self; []; |
|
748 | 813 | src = fetchurl { |
|
749 | 814 | url = "https://pypi.python.org/packages/47/bf/d07ef52fa1ac645468858bbac7cb95b246a972a045e821493d17d89c81be/invoke-0.13.0.tar.gz"; |
|
750 | 815 | md5 = "c0d1ed4bfb34eaab551662d8cfee6540"; |
|
751 | 816 | }; |
|
752 | 817 | meta = { |
|
753 | 818 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
754 | 819 | }; |
|
755 | 820 | }; |
|
756 | 821 | ipdb = super.buildPythonPackage { |
|
757 | 822 | name = "ipdb-0.8"; |
|
758 | 823 | buildInputs = with self; []; |
|
759 | 824 | doCheck = false; |
|
760 | 825 | propagatedBuildInputs = with self; [ipython]; |
|
761 | 826 | src = fetchurl { |
|
762 | 827 | url = "https://pypi.python.org/packages/f0/25/d7dd430ced6cd8dc242a933c8682b5dbf32eb4011d82f87e34209e5ec845/ipdb-0.8.zip"; |
|
763 | 828 | md5 = "96dca0712efa01aa5eaf6b22071dd3ed"; |
|
764 | 829 | }; |
|
765 | 830 | meta = { |
|
766 | 831 | license = [ pkgs.lib.licenses.gpl1 ]; |
|
767 | 832 | }; |
|
768 | 833 | }; |
|
769 | 834 | ipython = super.buildPythonPackage { |
|
770 | 835 | name = "ipython-3.1.0"; |
|
771 | 836 | buildInputs = with self; []; |
|
772 | 837 | doCheck = false; |
|
773 | 838 | propagatedBuildInputs = with self; []; |
|
774 | 839 | src = fetchurl { |
|
775 | 840 | url = "https://pypi.python.org/packages/06/91/120c0835254c120af89f066afaabf81289bc2726c1fc3ca0555df6882f58/ipython-3.1.0.tar.gz"; |
|
776 | 841 | md5 = "a749d90c16068687b0ec45a27e72ef8f"; |
|
777 | 842 | }; |
|
778 | 843 | meta = { |
|
779 | 844 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
780 | 845 | }; |
|
781 | 846 | }; |
|
782 | 847 | iso8601 = super.buildPythonPackage { |
|
783 | 848 | name = "iso8601-0.1.11"; |
|
784 | 849 | buildInputs = with self; []; |
|
785 | 850 | doCheck = false; |
|
786 | 851 | propagatedBuildInputs = with self; []; |
|
787 | 852 | src = fetchurl { |
|
788 | 853 | url = "https://pypi.python.org/packages/c0/75/c9209ee4d1b5975eb8c2cba4428bde6b61bd55664a98290dd015cdb18e98/iso8601-0.1.11.tar.gz"; |
|
789 | 854 | md5 = "b06d11cd14a64096f907086044f0fe38"; |
|
790 | 855 | }; |
|
791 | 856 | meta = { |
|
792 | 857 | license = [ pkgs.lib.licenses.mit ]; |
|
793 | 858 | }; |
|
794 | 859 | }; |
|
795 | 860 | itsdangerous = super.buildPythonPackage { |
|
796 | 861 | name = "itsdangerous-0.24"; |
|
797 | 862 | buildInputs = with self; []; |
|
798 | 863 | doCheck = false; |
|
799 | 864 | propagatedBuildInputs = with self; []; |
|
800 | 865 | src = fetchurl { |
|
801 | 866 | url = "https://pypi.python.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz"; |
|
802 | 867 | md5 = "a3d55aa79369aef5345c036a8a26307f"; |
|
803 | 868 | }; |
|
804 | 869 | meta = { |
|
805 | 870 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
806 | 871 | }; |
|
807 | 872 | }; |
|
808 | 873 | kombu = super.buildPythonPackage { |
|
809 | 874 | name = "kombu-1.5.1"; |
|
810 | 875 | buildInputs = with self; []; |
|
811 | 876 | doCheck = false; |
|
812 | 877 | propagatedBuildInputs = with self; [anyjson amqplib]; |
|
813 | 878 | src = fetchurl { |
|
814 | 879 | url = "https://pypi.python.org/packages/19/53/74bf2a624644b45f0850a638752514fc10a8e1cbd738f10804951a6df3f5/kombu-1.5.1.tar.gz"; |
|
815 | 880 | md5 = "50662f3c7e9395b3d0721fb75d100b63"; |
|
816 | 881 | }; |
|
817 | 882 | meta = { |
|
818 | 883 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
819 | 884 | }; |
|
820 | 885 | }; |
|
821 | 886 | lxml = super.buildPythonPackage { |
|
822 | 887 | name = "lxml-3.4.4"; |
|
823 | 888 | buildInputs = with self; []; |
|
824 | 889 | doCheck = false; |
|
825 | 890 | propagatedBuildInputs = with self; []; |
|
826 | 891 | src = fetchurl { |
|
827 | 892 | url = "https://pypi.python.org/packages/63/c7/4f2a2a4ad6c6fa99b14be6b3c1cece9142e2d915aa7c43c908677afc8fa4/lxml-3.4.4.tar.gz"; |
|
828 | 893 | md5 = "a9a65972afc173ec7a39c585f4eea69c"; |
|
829 | 894 | }; |
|
830 | 895 | meta = { |
|
831 | 896 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
832 | 897 | }; |
|
833 | 898 | }; |
|
834 | 899 | mccabe = super.buildPythonPackage { |
|
835 | 900 | name = "mccabe-0.3"; |
|
836 | 901 | buildInputs = with self; []; |
|
837 | 902 | doCheck = false; |
|
838 | 903 | propagatedBuildInputs = with self; []; |
|
839 | 904 | src = fetchurl { |
|
840 | 905 | url = "https://pypi.python.org/packages/c9/2e/75231479e11a906b64ac43bad9d0bb534d00080b18bdca8db9da46e1faf7/mccabe-0.3.tar.gz"; |
|
841 | 906 | md5 = "81640948ff226f8c12b3277059489157"; |
|
842 | 907 | }; |
|
843 | 908 | meta = { |
|
844 | 909 | license = [ { fullName = "Expat license"; } pkgs.lib.licenses.mit ]; |
|
845 | 910 | }; |
|
846 | 911 | }; |
|
847 | 912 | meld3 = super.buildPythonPackage { |
|
848 | 913 | name = "meld3-1.0.2"; |
|
849 | 914 | buildInputs = with self; []; |
|
850 | 915 | doCheck = false; |
|
851 | 916 | propagatedBuildInputs = with self; []; |
|
852 | 917 | src = fetchurl { |
|
853 | 918 | url = "https://pypi.python.org/packages/45/a0/317c6422b26c12fe0161e936fc35f36552069ba8e6f7ecbd99bbffe32a5f/meld3-1.0.2.tar.gz"; |
|
854 | 919 | md5 = "3ccc78cd79cffd63a751ad7684c02c91"; |
|
855 | 920 | }; |
|
856 | 921 | meta = { |
|
857 | 922 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
858 | 923 | }; |
|
859 | 924 | }; |
|
860 | 925 | mock = super.buildPythonPackage { |
|
861 | 926 | name = "mock-1.0.1"; |
|
862 | 927 | buildInputs = with self; []; |
|
863 | 928 | doCheck = false; |
|
864 | 929 | propagatedBuildInputs = with self; []; |
|
865 | 930 | src = fetchurl { |
|
866 | 931 | url = "https://pypi.python.org/packages/15/45/30273ee91feb60dabb8fbb2da7868520525f02cf910279b3047182feed80/mock-1.0.1.zip"; |
|
867 | 932 | md5 = "869f08d003c289a97c1a6610faf5e913"; |
|
868 | 933 | }; |
|
869 | 934 | meta = { |
|
870 | 935 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
871 | 936 | }; |
|
872 | 937 | }; |
|
873 | 938 | msgpack-python = super.buildPythonPackage { |
|
874 | 939 | name = "msgpack-python-0.4.6"; |
|
875 | 940 | buildInputs = with self; []; |
|
876 | 941 | doCheck = false; |
|
877 | 942 | propagatedBuildInputs = with self; []; |
|
878 | 943 | src = fetchurl { |
|
879 | 944 | url = "https://pypi.python.org/packages/15/ce/ff2840885789ef8035f66cd506ea05bdb228340307d5e71a7b1e3f82224c/msgpack-python-0.4.6.tar.gz"; |
|
880 | 945 | md5 = "8b317669314cf1bc881716cccdaccb30"; |
|
881 | 946 | }; |
|
882 | 947 | meta = { |
|
883 | 948 | license = [ pkgs.lib.licenses.asl20 ]; |
|
884 | 949 | }; |
|
885 | 950 | }; |
|
886 | 951 | nose = super.buildPythonPackage { |
|
887 | 952 | name = "nose-1.3.6"; |
|
888 | 953 | buildInputs = with self; []; |
|
889 | 954 | doCheck = false; |
|
890 | 955 | propagatedBuildInputs = with self; []; |
|
891 | 956 | src = fetchurl { |
|
892 | 957 | url = "https://pypi.python.org/packages/70/c7/469e68148d17a0d3db5ed49150242fd70a74a8147b8f3f8b87776e028d99/nose-1.3.6.tar.gz"; |
|
893 | 958 | md5 = "0ca546d81ca8309080fc80cb389e7a16"; |
|
894 | 959 | }; |
|
895 | 960 | meta = { |
|
896 | 961 | license = [ { fullName = "GNU Library or Lesser General Public License (LGPL)"; } { fullName = "GNU LGPL"; } ]; |
|
897 | 962 | }; |
|
898 | 963 | }; |
|
899 | 964 | objgraph = super.buildPythonPackage { |
|
900 | 965 | name = "objgraph-2.0.0"; |
|
901 | 966 | buildInputs = with self; []; |
|
902 | 967 | doCheck = false; |
|
903 | 968 | propagatedBuildInputs = with self; []; |
|
904 | 969 | src = fetchurl { |
|
905 | 970 | url = "https://pypi.python.org/packages/d7/33/ace750b59247496ed769b170586c5def7202683f3d98e737b75b767ff29e/objgraph-2.0.0.tar.gz"; |
|
906 | 971 | md5 = "25b0d5e5adc74aa63ead15699614159c"; |
|
907 | 972 | }; |
|
908 | 973 | meta = { |
|
909 | 974 | license = [ pkgs.lib.licenses.mit ]; |
|
910 | 975 | }; |
|
911 | 976 | }; |
|
912 | 977 | packaging = super.buildPythonPackage { |
|
913 | 978 | name = "packaging-15.2"; |
|
914 | 979 | buildInputs = with self; []; |
|
915 | 980 | doCheck = false; |
|
916 | 981 | propagatedBuildInputs = with self; []; |
|
917 | 982 | src = fetchurl { |
|
918 | 983 | url = "https://pypi.python.org/packages/24/c4/185da1304f07047dc9e0c46c31db75c0351bd73458ac3efad7da3dbcfbe1/packaging-15.2.tar.gz"; |
|
919 | 984 | md5 = "c16093476f6ced42128bf610e5db3784"; |
|
920 | 985 | }; |
|
921 | 986 | meta = { |
|
922 | 987 | license = [ pkgs.lib.licenses.asl20 ]; |
|
923 | 988 | }; |
|
924 | 989 | }; |
|
925 | 990 | paramiko = super.buildPythonPackage { |
|
926 | 991 | name = "paramiko-1.15.1"; |
|
927 | 992 | buildInputs = with self; []; |
|
928 | 993 | doCheck = false; |
|
929 | 994 | propagatedBuildInputs = with self; [pycrypto ecdsa]; |
|
930 | 995 | src = fetchurl { |
|
931 | 996 | url = "https://pypi.python.org/packages/04/2b/a22d2a560c1951abbbf95a0628e245945565f70dc082d9e784666887222c/paramiko-1.15.1.tar.gz"; |
|
932 | 997 | md5 = "48c274c3f9b1282932567b21f6acf3b5"; |
|
933 | 998 | }; |
|
934 | 999 | meta = { |
|
935 | 1000 | license = [ { fullName = "LGPL"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
936 | 1001 | }; |
|
937 | 1002 | }; |
|
938 | 1003 | pep8 = super.buildPythonPackage { |
|
939 | 1004 | name = "pep8-1.5.7"; |
|
940 | 1005 | buildInputs = with self; []; |
|
941 | 1006 | doCheck = false; |
|
942 | 1007 | propagatedBuildInputs = with self; []; |
|
943 | 1008 | src = fetchurl { |
|
944 | 1009 | url = "https://pypi.python.org/packages/8b/de/259f5e735897ada1683489dd514b2a1c91aaa74e5e6b68f80acf128a6368/pep8-1.5.7.tar.gz"; |
|
945 | 1010 | md5 = "f6adbdd69365ecca20513c709f9b7c93"; |
|
946 | 1011 | }; |
|
947 | 1012 | meta = { |
|
948 | 1013 | license = [ { fullName = "Expat license"; } pkgs.lib.licenses.mit ]; |
|
949 | 1014 | }; |
|
950 | 1015 | }; |
|
1016 | peppercorn = super.buildPythonPackage { | |
|
1017 | name = "peppercorn-0.5"; | |
|
1018 | buildInputs = with self; []; | |
|
1019 | doCheck = false; | |
|
1020 | propagatedBuildInputs = with self; []; | |
|
1021 | src = fetchurl { | |
|
1022 | url = "https://pypi.python.org/packages/45/ec/a62ec317d1324a01567c5221b420742f094f05ee48097e5157d32be3755c/peppercorn-0.5.tar.gz"; | |
|
1023 | md5 = "f08efbca5790019ab45d76b7244abd40"; | |
|
1024 | }; | |
|
1025 | meta = { | |
|
1026 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; | |
|
1027 | }; | |
|
1028 | }; | |
|
951 | 1029 | psutil = super.buildPythonPackage { |
|
952 | 1030 | name = "psutil-2.2.1"; |
|
953 | 1031 | buildInputs = with self; []; |
|
954 | 1032 | doCheck = false; |
|
955 | 1033 | propagatedBuildInputs = with self; []; |
|
956 | 1034 | src = fetchurl { |
|
957 | 1035 | url = "https://pypi.python.org/packages/df/47/ee54ef14dd40f8ce831a7581001a5096494dc99fe71586260ca6b531fe86/psutil-2.2.1.tar.gz"; |
|
958 | 1036 | md5 = "1a2b58cd9e3a53528bb6148f0c4d5244"; |
|
959 | 1037 | }; |
|
960 | 1038 | meta = { |
|
961 | 1039 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
962 | 1040 | }; |
|
963 | 1041 | }; |
|
964 | 1042 | psycopg2 = super.buildPythonPackage { |
|
965 | name = "psycopg2-2.6"; | |
|
1043 | name = "psycopg2-2.6.1"; | |
|
966 | 1044 | buildInputs = with self; []; |
|
967 | 1045 | doCheck = false; |
|
968 | 1046 | propagatedBuildInputs = with self; []; |
|
969 | 1047 | src = fetchurl { |
|
970 |
url = "https://pypi.python.org/packages/ |
|
|
971 | md5 = "fbbb039a8765d561a1c04969bbae7c74"; | |
|
1048 | url = "https://pypi.python.org/packages/86/fd/cc8315be63a41fe000cce20482a917e874cdc1151e62cb0141f5e55f711e/psycopg2-2.6.1.tar.gz"; | |
|
1049 | md5 = "842b44f8c95517ed5b792081a2370da1"; | |
|
972 | 1050 | }; |
|
973 | 1051 | meta = { |
|
974 | 1052 | license = [ pkgs.lib.licenses.zpt21 { fullName = "GNU Library or Lesser General Public License (LGPL)"; } { fullName = "LGPL with exceptions or ZPL"; } ]; |
|
975 | 1053 | }; |
|
976 | 1054 | }; |
|
977 | 1055 | py = super.buildPythonPackage { |
|
978 | 1056 | name = "py-1.4.29"; |
|
979 | 1057 | buildInputs = with self; []; |
|
980 | 1058 | doCheck = false; |
|
981 | 1059 | propagatedBuildInputs = with self; []; |
|
982 | 1060 | src = fetchurl { |
|
983 | 1061 | url = "https://pypi.python.org/packages/2a/bc/a1a4a332ac10069b8e5e25136a35e08a03f01fd6ab03d819889d79a1fd65/py-1.4.29.tar.gz"; |
|
984 | 1062 | md5 = "c28e0accba523a29b35a48bb703fb96c"; |
|
985 | 1063 | }; |
|
986 | 1064 | meta = { |
|
987 | 1065 | license = [ pkgs.lib.licenses.mit ]; |
|
988 | 1066 | }; |
|
989 | 1067 | }; |
|
990 | 1068 | py-bcrypt = super.buildPythonPackage { |
|
991 | 1069 | name = "py-bcrypt-0.4"; |
|
992 | 1070 | buildInputs = with self; []; |
|
993 | 1071 | doCheck = false; |
|
994 | 1072 | propagatedBuildInputs = with self; []; |
|
995 | 1073 | src = fetchurl { |
|
996 | 1074 | url = "https://pypi.python.org/packages/68/b1/1c3068c5c4d2e35c48b38dcc865301ebfdf45f54507086ac65ced1fd3b3d/py-bcrypt-0.4.tar.gz"; |
|
997 | 1075 | md5 = "dd8b367d6b716a2ea2e72392525f4e36"; |
|
998 | 1076 | }; |
|
999 | 1077 | meta = { |
|
1000 | 1078 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1001 | 1079 | }; |
|
1002 | 1080 | }; |
|
1081 | py-gfm = super.buildPythonPackage { | |
|
1082 | name = "py-gfm-0.1.3"; | |
|
1083 | buildInputs = with self; []; | |
|
1084 | doCheck = false; | |
|
1085 | propagatedBuildInputs = with self; [setuptools Markdown]; | |
|
1086 | src = fetchurl { | |
|
1087 | url = "https://pypi.python.org/packages/12/e4/6b3d8678da04f97d7490d8264d8de51c2dc9fb91209ccee9c515c95e14c5/py-gfm-0.1.3.tar.gz"; | |
|
1088 | md5 = "e588d9e69640a241b97e2c59c22527a6"; | |
|
1089 | }; | |
|
1090 | meta = { | |
|
1091 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
|
1092 | }; | |
|
1093 | }; | |
|
1003 | 1094 | pycrypto = super.buildPythonPackage { |
|
1004 | 1095 | name = "pycrypto-2.6.1"; |
|
1005 | 1096 | buildInputs = with self; []; |
|
1006 | 1097 | doCheck = false; |
|
1007 | 1098 | propagatedBuildInputs = with self; []; |
|
1008 | 1099 | src = fetchurl { |
|
1009 | 1100 | url = "https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz"; |
|
1010 | 1101 | md5 = "55a61a054aa66812daf5161a0d5d7eda"; |
|
1011 | 1102 | }; |
|
1012 | 1103 | meta = { |
|
1013 | 1104 | license = [ pkgs.lib.licenses.publicDomain ]; |
|
1014 | 1105 | }; |
|
1015 | 1106 | }; |
|
1016 | 1107 | pycurl = super.buildPythonPackage { |
|
1017 | 1108 | name = "pycurl-7.19.5"; |
|
1018 | 1109 | buildInputs = with self; []; |
|
1019 | 1110 | doCheck = false; |
|
1020 | 1111 | propagatedBuildInputs = with self; []; |
|
1021 | 1112 | src = fetchurl { |
|
1022 | 1113 | url = "https://pypi.python.org/packages/6c/48/13bad289ef6f4869b1d8fc11ae54de8cfb3cc4a2eb9f7419c506f763be46/pycurl-7.19.5.tar.gz"; |
|
1023 | 1114 | md5 = "47b4eac84118e2606658122104e62072"; |
|
1024 | 1115 | }; |
|
1025 | 1116 | meta = { |
|
1026 | 1117 | license = [ pkgs.lib.licenses.mit { fullName = "LGPL/MIT"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
1027 | 1118 | }; |
|
1028 | 1119 | }; |
|
1029 | 1120 | pyflakes = super.buildPythonPackage { |
|
1030 | 1121 | name = "pyflakes-0.8.1"; |
|
1031 | 1122 | buildInputs = with self; []; |
|
1032 | 1123 | doCheck = false; |
|
1033 | 1124 | propagatedBuildInputs = with self; []; |
|
1034 | 1125 | src = fetchurl { |
|
1035 | 1126 | url = "https://pypi.python.org/packages/75/22/a90ec0252f4f87f3ffb6336504de71fe16a49d69c4538dae2f12b9360a38/pyflakes-0.8.1.tar.gz"; |
|
1036 | 1127 | md5 = "905fe91ad14b912807e8fdc2ac2e2c23"; |
|
1037 | 1128 | }; |
|
1038 | 1129 | meta = { |
|
1039 | 1130 | license = [ pkgs.lib.licenses.mit ]; |
|
1040 | 1131 | }; |
|
1041 | 1132 | }; |
|
1042 | 1133 | pyparsing = super.buildPythonPackage { |
|
1043 | 1134 | name = "pyparsing-1.5.7"; |
|
1044 | 1135 | buildInputs = with self; []; |
|
1045 | 1136 | doCheck = false; |
|
1046 | 1137 | propagatedBuildInputs = with self; []; |
|
1047 | 1138 | src = fetchurl { |
|
1048 | 1139 | url = "https://pypi.python.org/packages/2e/26/e8fb5b4256a5f5036be7ce115ef8db8d06bc537becfbdc46c6af008314ee/pyparsing-1.5.7.zip"; |
|
1049 | 1140 | md5 = "b86854857a368d6ccb4d5b6e76d0637f"; |
|
1050 | 1141 | }; |
|
1051 | 1142 | meta = { |
|
1052 | 1143 | license = [ pkgs.lib.licenses.mit ]; |
|
1053 | 1144 | }; |
|
1054 | 1145 | }; |
|
1055 | 1146 | pyramid = super.buildPythonPackage { |
|
1056 | 1147 | name = "pyramid-1.6.1"; |
|
1057 | 1148 | buildInputs = with self; []; |
|
1058 | 1149 | doCheck = false; |
|
1059 | 1150 | propagatedBuildInputs = with self; [setuptools WebOb repoze.lru zope.interface zope.deprecation venusian translationstring PasteDeploy]; |
|
1060 | 1151 | src = fetchurl { |
|
1061 | 1152 | url = "https://pypi.python.org/packages/30/b3/fcc4a2a4800cbf21989e00454b5828cf1f7fe35c63e0810b350e56d4c475/pyramid-1.6.1.tar.gz"; |
|
1062 | 1153 | md5 = "b18688ff3cc33efdbb098a35b45dd122"; |
|
1063 | 1154 | }; |
|
1064 | 1155 | meta = { |
|
1065 | 1156 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1066 | 1157 | }; |
|
1067 | 1158 | }; |
|
1068 | 1159 | pyramid-beaker = super.buildPythonPackage { |
|
1069 | 1160 | name = "pyramid-beaker-0.8"; |
|
1070 | 1161 | buildInputs = with self; []; |
|
1071 | 1162 | doCheck = false; |
|
1072 | 1163 | propagatedBuildInputs = with self; [pyramid Beaker]; |
|
1073 | 1164 | src = fetchurl { |
|
1074 | 1165 | url = "https://pypi.python.org/packages/d9/6e/b85426e00fd3d57f4545f74e1c3828552d8700f13ededeef9233f7bca8be/pyramid_beaker-0.8.tar.gz"; |
|
1075 | 1166 | md5 = "22f14be31b06549f80890e2c63a93834"; |
|
1076 | 1167 | }; |
|
1077 | 1168 | meta = { |
|
1078 | 1169 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1079 | 1170 | }; |
|
1080 | 1171 | }; |
|
1081 | 1172 | pyramid-debugtoolbar = super.buildPythonPackage { |
|
1082 | 1173 | name = "pyramid-debugtoolbar-2.4.2"; |
|
1083 | 1174 | buildInputs = with self; []; |
|
1084 | 1175 | doCheck = false; |
|
1085 | 1176 | propagatedBuildInputs = with self; [pyramid pyramid-mako repoze.lru Pygments]; |
|
1086 | 1177 | src = fetchurl { |
|
1087 | 1178 | url = "https://pypi.python.org/packages/89/00/ed5426ee41ed747ba3ffd30e8230841a6878286ea67d480b1444d24f06a2/pyramid_debugtoolbar-2.4.2.tar.gz"; |
|
1088 | 1179 | md5 = "073ea67086cc4bd5decc3a000853642d"; |
|
1089 | 1180 | }; |
|
1090 | 1181 | meta = { |
|
1091 | 1182 | license = [ { fullName = "Repoze Public License"; } pkgs.lib.licenses.bsdOriginal ]; |
|
1092 | 1183 | }; |
|
1093 | 1184 | }; |
|
1094 | 1185 | pyramid-jinja2 = super.buildPythonPackage { |
|
1095 | 1186 | name = "pyramid-jinja2-2.5"; |
|
1096 | 1187 | buildInputs = with self; []; |
|
1097 | 1188 | doCheck = false; |
|
1098 | 1189 | propagatedBuildInputs = with self; [pyramid zope.deprecation Jinja2 MarkupSafe]; |
|
1099 | 1190 | src = fetchurl { |
|
1100 | 1191 | url = "https://pypi.python.org/packages/a1/80/595e26ffab7deba7208676b6936b7e5a721875710f982e59899013cae1ed/pyramid_jinja2-2.5.tar.gz"; |
|
1101 | 1192 | md5 = "07cb6547204ac5e6f0b22a954ccee928"; |
|
1102 | 1193 | }; |
|
1103 | 1194 | meta = { |
|
1104 | 1195 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1105 | 1196 | }; |
|
1106 | 1197 | }; |
|
1107 | 1198 | pyramid-mako = super.buildPythonPackage { |
|
1108 | 1199 | name = "pyramid-mako-1.0.2"; |
|
1109 | 1200 | buildInputs = with self; []; |
|
1110 | 1201 | doCheck = false; |
|
1111 | 1202 | propagatedBuildInputs = with self; [pyramid Mako]; |
|
1112 | 1203 | src = fetchurl { |
|
1113 | 1204 | url = "https://pypi.python.org/packages/f1/92/7e69bcf09676d286a71cb3bbb887b16595b96f9ba7adbdc239ffdd4b1eb9/pyramid_mako-1.0.2.tar.gz"; |
|
1114 | 1205 | md5 = "ee25343a97eb76bd90abdc2a774eb48a"; |
|
1115 | 1206 | }; |
|
1116 | 1207 | meta = { |
|
1117 | 1208 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1118 | 1209 | }; |
|
1119 | 1210 | }; |
|
1120 | 1211 | pysqlite = super.buildPythonPackage { |
|
1121 | 1212 | name = "pysqlite-2.6.3"; |
|
1122 | 1213 | buildInputs = with self; []; |
|
1123 | 1214 | doCheck = false; |
|
1124 | 1215 | propagatedBuildInputs = with self; []; |
|
1125 | 1216 | src = fetchurl { |
|
1126 | 1217 | url = "https://pypi.python.org/packages/5c/a6/1c429cd4c8069cf4bfbd0eb4d592b3f4042155a8202df83d7e9b93aa3dc2/pysqlite-2.6.3.tar.gz"; |
|
1127 | 1218 | md5 = "7ff1cedee74646b50117acff87aa1cfa"; |
|
1128 | 1219 | }; |
|
1129 | 1220 | meta = { |
|
1130 | 1221 | license = [ { fullName = "zlib/libpng License"; } { fullName = "zlib/libpng license"; } ]; |
|
1131 | 1222 | }; |
|
1132 | 1223 | }; |
|
1133 | 1224 | pytest = super.buildPythonPackage { |
|
1134 | 1225 | name = "pytest-2.8.5"; |
|
1135 | 1226 | buildInputs = with self; []; |
|
1136 | 1227 | doCheck = false; |
|
1137 | 1228 | propagatedBuildInputs = with self; [py]; |
|
1138 | 1229 | src = fetchurl { |
|
1139 | 1230 | url = "https://pypi.python.org/packages/b1/3d/d7ea9b0c51e0cacded856e49859f0a13452747491e842c236bbab3714afe/pytest-2.8.5.zip"; |
|
1140 | 1231 | md5 = "8493b06f700862f1294298d6c1b715a9"; |
|
1141 | 1232 | }; |
|
1142 | 1233 | meta = { |
|
1143 | 1234 | license = [ pkgs.lib.licenses.mit ]; |
|
1144 | 1235 | }; |
|
1145 | 1236 | }; |
|
1146 | 1237 | pytest-catchlog = super.buildPythonPackage { |
|
1147 | 1238 | name = "pytest-catchlog-1.2.2"; |
|
1148 | 1239 | buildInputs = with self; []; |
|
1149 | 1240 | doCheck = false; |
|
1150 | 1241 | propagatedBuildInputs = with self; [py pytest]; |
|
1151 | 1242 | src = fetchurl { |
|
1152 | 1243 | url = "https://pypi.python.org/packages/f2/2b/2faccdb1a978fab9dd0bf31cca9f6847fbe9184a0bdcc3011ac41dd44191/pytest-catchlog-1.2.2.zip"; |
|
1153 | 1244 | md5 = "09d890c54c7456c818102b7ff8c182c8"; |
|
1154 | 1245 | }; |
|
1155 | 1246 | meta = { |
|
1156 | 1247 | license = [ pkgs.lib.licenses.mit ]; |
|
1157 | 1248 | }; |
|
1158 | 1249 | }; |
|
1159 | 1250 | pytest-cov = super.buildPythonPackage { |
|
1160 | 1251 | name = "pytest-cov-1.8.1"; |
|
1161 | 1252 | buildInputs = with self; []; |
|
1162 | 1253 | doCheck = false; |
|
1163 | 1254 | propagatedBuildInputs = with self; [py pytest coverage cov-core]; |
|
1164 | 1255 | src = fetchurl { |
|
1165 | 1256 | url = "https://pypi.python.org/packages/11/4b/b04646e97f1721878eb21e9f779102d84dd044d324382263b1770a3e4838/pytest-cov-1.8.1.tar.gz"; |
|
1166 | 1257 | md5 = "76c778afa2494088270348be42d759fc"; |
|
1167 | 1258 | }; |
|
1168 | 1259 | meta = { |
|
1169 | 1260 | license = [ pkgs.lib.licenses.mit ]; |
|
1170 | 1261 | }; |
|
1171 | 1262 | }; |
|
1172 | 1263 | pytest-profiling = super.buildPythonPackage { |
|
1173 | 1264 | name = "pytest-profiling-1.0.1"; |
|
1174 | 1265 | buildInputs = with self; []; |
|
1175 | 1266 | doCheck = false; |
|
1176 | 1267 | propagatedBuildInputs = with self; [six pytest gprof2dot]; |
|
1177 | 1268 | src = fetchurl { |
|
1178 | 1269 | url = "https://pypi.python.org/packages/d8/67/8ffab73406e22870e07fa4dc8dce1d7689b26dba8efd00161c9b6fc01ec0/pytest-profiling-1.0.1.tar.gz"; |
|
1179 | 1270 | md5 = "354404eb5b3fd4dc5eb7fffbb3d9b68b"; |
|
1180 | 1271 | }; |
|
1181 | 1272 | meta = { |
|
1182 | 1273 | license = [ pkgs.lib.licenses.mit ]; |
|
1183 | 1274 | }; |
|
1184 | 1275 | }; |
|
1185 | 1276 | pytest-runner = super.buildPythonPackage { |
|
1186 | 1277 | name = "pytest-runner-2.7.1"; |
|
1187 | 1278 | buildInputs = with self; []; |
|
1188 | 1279 | doCheck = false; |
|
1189 | 1280 | propagatedBuildInputs = with self; []; |
|
1190 | 1281 | src = fetchurl { |
|
1191 | 1282 | url = "https://pypi.python.org/packages/99/6b/c4ff4418d3424d4475b7af60724fd4a5cdd91ed8e489dc9443281f0052bc/pytest-runner-2.7.1.tar.gz"; |
|
1192 | 1283 | md5 = "e56f0bc8d79a6bd91772b44ef4215c7e"; |
|
1193 | 1284 | }; |
|
1194 | 1285 | meta = { |
|
1195 | 1286 | license = [ pkgs.lib.licenses.mit ]; |
|
1196 | 1287 | }; |
|
1197 | 1288 | }; |
|
1198 | 1289 | pytest-timeout = super.buildPythonPackage { |
|
1199 | 1290 | name = "pytest-timeout-0.4"; |
|
1200 | 1291 | buildInputs = with self; []; |
|
1201 | 1292 | doCheck = false; |
|
1202 | 1293 | propagatedBuildInputs = with self; [pytest]; |
|
1203 | 1294 | src = fetchurl { |
|
1204 | 1295 | url = "https://pypi.python.org/packages/24/48/5f6bd4b8026a26e1dd427243d560a29a0f1b24a5c7cffca4bf049a7bb65b/pytest-timeout-0.4.tar.gz"; |
|
1205 | 1296 | md5 = "03b28aff69cbbfb959ed35ade5fde262"; |
|
1206 | 1297 | }; |
|
1207 | 1298 | meta = { |
|
1208 | 1299 | license = [ pkgs.lib.licenses.mit { fullName = "DFSG approved"; } ]; |
|
1209 | 1300 | }; |
|
1210 | 1301 | }; |
|
1211 | 1302 | python-dateutil = super.buildPythonPackage { |
|
1212 | 1303 | name = "python-dateutil-1.5"; |
|
1213 | 1304 | buildInputs = with self; []; |
|
1214 | 1305 | doCheck = false; |
|
1215 | 1306 | propagatedBuildInputs = with self; []; |
|
1216 | 1307 | src = fetchurl { |
|
1217 | 1308 | url = "https://pypi.python.org/packages/b4/7c/df59c89a753eb33c7c44e1dd42de0e9bc2ccdd5a4d576e0bfad97cc280cb/python-dateutil-1.5.tar.gz"; |
|
1218 | 1309 | md5 = "0dcb1de5e5cad69490a3b6ab63f0cfa5"; |
|
1219 | 1310 | }; |
|
1220 | 1311 | meta = { |
|
1221 | 1312 | license = [ pkgs.lib.licenses.psfl ]; |
|
1222 | 1313 | }; |
|
1223 | 1314 | }; |
|
1224 | 1315 | python-editor = super.buildPythonPackage { |
|
1225 | 1316 | name = "python-editor-1.0.1"; |
|
1226 | 1317 | buildInputs = with self; []; |
|
1227 | 1318 | doCheck = false; |
|
1228 | 1319 | propagatedBuildInputs = with self; []; |
|
1229 | 1320 | src = fetchurl { |
|
1230 | 1321 | url = "https://pypi.python.org/packages/2b/c0/df7b87d5cf016f82eab3b05cd35f53287c1178ad8c42bfb6fa61b89b22f6/python-editor-1.0.1.tar.gz"; |
|
1231 | 1322 | md5 = "e1fa63535b40e022fa4fd646fd8b511a"; |
|
1232 | 1323 | }; |
|
1233 | 1324 | meta = { |
|
1234 | 1325 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1235 | 1326 | }; |
|
1236 | 1327 | }; |
|
1237 | 1328 | python-ldap = super.buildPythonPackage { |
|
1238 | 1329 | name = "python-ldap-2.4.19"; |
|
1239 | 1330 | buildInputs = with self; []; |
|
1240 | 1331 | doCheck = false; |
|
1241 | 1332 | propagatedBuildInputs = with self; [setuptools]; |
|
1242 | 1333 | src = fetchurl { |
|
1243 | 1334 | url = "https://pypi.python.org/packages/42/81/1b64838c82e64f14d4e246ff00b52e650a35c012551b891ada2b85d40737/python-ldap-2.4.19.tar.gz"; |
|
1244 | 1335 | md5 = "b941bf31d09739492aa19ef679e94ae3"; |
|
1245 | 1336 | }; |
|
1246 | 1337 | meta = { |
|
1247 | 1338 | license = [ pkgs.lib.licenses.psfl ]; |
|
1248 | 1339 | }; |
|
1249 | 1340 | }; |
|
1250 | 1341 | python-memcached = super.buildPythonPackage { |
|
1251 | 1342 | name = "python-memcached-1.57"; |
|
1252 | 1343 | buildInputs = with self; []; |
|
1253 | 1344 | doCheck = false; |
|
1254 | 1345 | propagatedBuildInputs = with self; [six]; |
|
1255 | 1346 | src = fetchurl { |
|
1256 | 1347 | url = "https://pypi.python.org/packages/52/9d/eebc0dcbc5c7c66840ad207dfc1baa376dadb74912484bff73819cce01e6/python-memcached-1.57.tar.gz"; |
|
1257 | 1348 | md5 = "de21f64b42b2d961f3d4ad7beb5468a1"; |
|
1258 | 1349 | }; |
|
1259 | 1350 | meta = { |
|
1260 | 1351 | license = [ pkgs.lib.licenses.psfl ]; |
|
1261 | 1352 | }; |
|
1262 | 1353 | }; |
|
1263 | 1354 | python-pam = super.buildPythonPackage { |
|
1264 | 1355 | name = "python-pam-1.8.2"; |
|
1265 | 1356 | buildInputs = with self; []; |
|
1266 | 1357 | doCheck = false; |
|
1267 | 1358 | propagatedBuildInputs = with self; []; |
|
1268 | 1359 | src = fetchurl { |
|
1269 | 1360 | url = "https://pypi.python.org/packages/de/8c/f8f5d38b4f26893af267ea0b39023d4951705ab0413a39e0cf7cf4900505/python-pam-1.8.2.tar.gz"; |
|
1270 | 1361 | md5 = "db71b6b999246fb05d78ecfbe166629d"; |
|
1271 | 1362 | }; |
|
1272 | 1363 | meta = { |
|
1273 | 1364 | license = [ { fullName = "License :: OSI Approved :: MIT License"; } pkgs.lib.licenses.mit ]; |
|
1274 | 1365 | }; |
|
1275 | 1366 | }; |
|
1276 | 1367 | pytz = super.buildPythonPackage { |
|
1277 | 1368 | name = "pytz-2015.4"; |
|
1278 | 1369 | buildInputs = with self; []; |
|
1279 | 1370 | doCheck = false; |
|
1280 | 1371 | propagatedBuildInputs = with self; []; |
|
1281 | 1372 | src = fetchurl { |
|
1282 | 1373 | url = "https://pypi.python.org/packages/7e/1a/f43b5c92df7b156822030fed151327ea096bcf417e45acc23bd1df43472f/pytz-2015.4.zip"; |
|
1283 | 1374 | md5 = "233f2a2b370d03f9b5911700cc9ebf3c"; |
|
1284 | 1375 | }; |
|
1285 | 1376 | meta = { |
|
1286 | 1377 | license = [ pkgs.lib.licenses.mit ]; |
|
1287 | 1378 | }; |
|
1288 | 1379 | }; |
|
1289 | 1380 | pyzmq = super.buildPythonPackage { |
|
1290 | 1381 | name = "pyzmq-14.6.0"; |
|
1291 | 1382 | buildInputs = with self; []; |
|
1292 | 1383 | doCheck = false; |
|
1293 | 1384 | propagatedBuildInputs = with self; []; |
|
1294 | 1385 | src = fetchurl { |
|
1295 | 1386 | url = "https://pypi.python.org/packages/8a/3b/5463d5a9d712cd8bbdac335daece0d69f6a6792da4e3dd89956c0db4e4e6/pyzmq-14.6.0.tar.gz"; |
|
1296 | 1387 | md5 = "395b5de95a931afa5b14c9349a5b8024"; |
|
1297 | 1388 | }; |
|
1298 | 1389 | meta = { |
|
1299 | 1390 | license = [ pkgs.lib.licenses.bsdOriginal { fullName = "LGPL+BSD"; } { fullName = "GNU Library or Lesser General Public License (LGPL)"; } ]; |
|
1300 | 1391 | }; |
|
1301 | 1392 | }; |
|
1302 | 1393 | recaptcha-client = super.buildPythonPackage { |
|
1303 | 1394 | name = "recaptcha-client-1.0.6"; |
|
1304 | 1395 | buildInputs = with self; []; |
|
1305 | 1396 | doCheck = false; |
|
1306 | 1397 | propagatedBuildInputs = with self; []; |
|
1307 | 1398 | src = fetchurl { |
|
1308 | 1399 | url = "https://pypi.python.org/packages/0a/ea/5f2fbbfd894bdac1c68ef8d92019066cfcf9fbff5fe3d728d2b5c25c8db4/recaptcha-client-1.0.6.tar.gz"; |
|
1309 | 1400 | md5 = "74228180f7e1fb76c4d7089160b0d919"; |
|
1310 | 1401 | }; |
|
1311 | 1402 | meta = { |
|
1312 | 1403 | license = [ { fullName = "MIT/X11"; } ]; |
|
1313 | 1404 | }; |
|
1314 | 1405 | }; |
|
1315 | 1406 | repoze.lru = super.buildPythonPackage { |
|
1316 | 1407 | name = "repoze.lru-0.6"; |
|
1317 | 1408 | buildInputs = with self; []; |
|
1318 | 1409 | doCheck = false; |
|
1319 | 1410 | propagatedBuildInputs = with self; []; |
|
1320 | 1411 | src = fetchurl { |
|
1321 | 1412 | url = "https://pypi.python.org/packages/6e/1e/aa15cc90217e086dc8769872c8778b409812ff036bf021b15795638939e4/repoze.lru-0.6.tar.gz"; |
|
1322 | 1413 | md5 = "2c3b64b17a8e18b405f55d46173e14dd"; |
|
1323 | 1414 | }; |
|
1324 | 1415 | meta = { |
|
1325 | 1416 | license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1326 | 1417 | }; |
|
1327 | 1418 | }; |
|
1328 | 1419 | requests = super.buildPythonPackage { |
|
1329 | 1420 | name = "requests-2.9.1"; |
|
1330 | 1421 | buildInputs = with self; []; |
|
1331 | 1422 | doCheck = false; |
|
1332 | 1423 | propagatedBuildInputs = with self; []; |
|
1333 | 1424 | src = fetchurl { |
|
1334 | 1425 | url = "https://pypi.python.org/packages/f9/6d/07c44fb1ebe04d069459a189e7dab9e4abfe9432adcd4477367c25332748/requests-2.9.1.tar.gz"; |
|
1335 | 1426 | md5 = "0b7f480d19012ec52bab78292efd976d"; |
|
1336 | 1427 | }; |
|
1337 | 1428 | meta = { |
|
1338 | 1429 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1339 | 1430 | }; |
|
1340 | 1431 | }; |
|
1341 | 1432 | rhodecode-enterprise-ce = super.buildPythonPackage { |
|
1342 |
name = "rhodecode-enterprise-ce-4. |
|
|
1433 | name = "rhodecode-enterprise-ce-4.3.0"; | |
|
1343 | 1434 | buildInputs = with self; [WebTest configobj cssselect flake8 lxml mock pytest pytest-cov pytest-runner]; |
|
1344 | 1435 | doCheck = true; |
|
1345 | propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery colander decorator docutils gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors psutil py-bcrypt]; | |
|
1436 | propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt]; | |
|
1346 | 1437 | src = ./.; |
|
1347 | 1438 | meta = { |
|
1348 | 1439 | license = [ { fullName = "AGPLv3, and Commercial License"; } ]; |
|
1349 | 1440 | }; |
|
1350 | 1441 | }; |
|
1351 | 1442 | rhodecode-tools = super.buildPythonPackage { |
|
1352 |
name = "rhodecode-tools-0. |
|
|
1443 | name = "rhodecode-tools-0.10.0"; | |
|
1353 | 1444 | buildInputs = with self; []; |
|
1354 | 1445 | doCheck = false; |
|
1355 | 1446 | propagatedBuildInputs = with self; [click future six Mako MarkupSafe requests Whoosh elasticsearch elasticsearch-dsl]; |
|
1356 | 1447 | src = fetchurl { |
|
1357 |
url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0. |
|
|
1358 | md5 = "9acdfd71b8ddf4056057065f37ab9ccb"; | |
|
1448 | url = "https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.10.0.zip"; | |
|
1449 | md5 = "4762391473ded761bead3aa58c748044"; | |
|
1359 | 1450 | }; |
|
1360 | 1451 | meta = { |
|
1361 | 1452 | license = [ { fullName = "AGPLv3 and Proprietary"; } ]; |
|
1362 | 1453 | }; |
|
1363 | 1454 | }; |
|
1364 | 1455 | serpent = super.buildPythonPackage { |
|
1365 | 1456 | name = "serpent-1.12"; |
|
1366 | 1457 | buildInputs = with self; []; |
|
1367 | 1458 | doCheck = false; |
|
1368 | 1459 | propagatedBuildInputs = with self; []; |
|
1369 | 1460 | src = fetchurl { |
|
1370 | 1461 | url = "https://pypi.python.org/packages/3b/19/1e0e83b47c09edaef8398655088036e7e67386b5c48770218ebb339fbbd5/serpent-1.12.tar.gz"; |
|
1371 | 1462 | md5 = "05869ac7b062828b34f8f927f0457b65"; |
|
1372 | 1463 | }; |
|
1373 | 1464 | meta = { |
|
1374 | 1465 | license = [ pkgs.lib.licenses.mit ]; |
|
1375 | 1466 | }; |
|
1376 | 1467 | }; |
|
1377 | 1468 | setproctitle = super.buildPythonPackage { |
|
1378 | 1469 | name = "setproctitle-1.1.8"; |
|
1379 | 1470 | buildInputs = with self; []; |
|
1380 | 1471 | doCheck = false; |
|
1381 | 1472 | propagatedBuildInputs = with self; []; |
|
1382 | 1473 | src = fetchurl { |
|
1383 | 1474 | url = "https://pypi.python.org/packages/33/c3/ad367a4f4f1ca90468863ae727ac62f6edb558fc09a003d344a02cfc6ea6/setproctitle-1.1.8.tar.gz"; |
|
1384 | 1475 | md5 = "728f4c8c6031bbe56083a48594027edd"; |
|
1385 | 1476 | }; |
|
1386 | 1477 | meta = { |
|
1387 | 1478 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
1388 | 1479 | }; |
|
1389 | 1480 | }; |
|
1390 | 1481 | setuptools = super.buildPythonPackage { |
|
1391 | 1482 | name = "setuptools-20.8.1"; |
|
1392 | 1483 | buildInputs = with self; []; |
|
1393 | 1484 | doCheck = false; |
|
1394 | 1485 | propagatedBuildInputs = with self; []; |
|
1395 | 1486 | src = fetchurl { |
|
1396 | 1487 | url = "https://pypi.python.org/packages/c4/19/c1bdc88b53da654df43770f941079dbab4e4788c2dcb5658fb86259894c7/setuptools-20.8.1.zip"; |
|
1397 | 1488 | md5 = "fe58a5cac0df20bb83942b252a4b0543"; |
|
1398 | 1489 | }; |
|
1399 | 1490 | meta = { |
|
1400 | 1491 | license = [ pkgs.lib.licenses.mit ]; |
|
1401 | 1492 | }; |
|
1402 | 1493 | }; |
|
1403 | 1494 | setuptools-scm = super.buildPythonPackage { |
|
1404 | 1495 | name = "setuptools-scm-1.11.0"; |
|
1405 | 1496 | buildInputs = with self; []; |
|
1406 | 1497 | doCheck = false; |
|
1407 | 1498 | propagatedBuildInputs = with self; []; |
|
1408 | 1499 | src = fetchurl { |
|
1409 | 1500 | url = "https://pypi.python.org/packages/cd/5f/e3a038292358058d83d764a47d09114aa5a8003ed4529518f9e580f1a94f/setuptools_scm-1.11.0.tar.gz"; |
|
1410 | 1501 | md5 = "4c5c896ba52e134bbc3507bac6400087"; |
|
1411 | 1502 | }; |
|
1412 | 1503 | meta = { |
|
1413 | 1504 | license = [ pkgs.lib.licenses.mit ]; |
|
1414 | 1505 | }; |
|
1415 | 1506 | }; |
|
1416 | 1507 | simplejson = super.buildPythonPackage { |
|
1417 | 1508 | name = "simplejson-3.7.2"; |
|
1418 | 1509 | buildInputs = with self; []; |
|
1419 | 1510 | doCheck = false; |
|
1420 | 1511 | propagatedBuildInputs = with self; []; |
|
1421 | 1512 | src = fetchurl { |
|
1422 | 1513 | url = "https://pypi.python.org/packages/6d/89/7f13f099344eea9d6722779a1f165087cb559598107844b1ac5dbd831fb1/simplejson-3.7.2.tar.gz"; |
|
1423 | 1514 | md5 = "a5fc7d05d4cb38492285553def5d4b46"; |
|
1424 | 1515 | }; |
|
1425 | 1516 | meta = { |
|
1426 | 1517 | license = [ pkgs.lib.licenses.mit pkgs.lib.licenses.afl21 ]; |
|
1427 | 1518 | }; |
|
1428 | 1519 | }; |
|
1429 | 1520 | six = super.buildPythonPackage { |
|
1430 | 1521 | name = "six-1.9.0"; |
|
1431 | 1522 | buildInputs = with self; []; |
|
1432 | 1523 | doCheck = false; |
|
1433 | 1524 | propagatedBuildInputs = with self; []; |
|
1434 | 1525 | src = fetchurl { |
|
1435 | 1526 | url = "https://pypi.python.org/packages/16/64/1dc5e5976b17466fd7d712e59cbe9fb1e18bec153109e5ba3ed6c9102f1a/six-1.9.0.tar.gz"; |
|
1436 | 1527 | md5 = "476881ef4012262dfc8adc645ee786c4"; |
|
1437 | 1528 | }; |
|
1438 | 1529 | meta = { |
|
1439 | 1530 | license = [ pkgs.lib.licenses.mit ]; |
|
1440 | 1531 | }; |
|
1441 | 1532 | }; |
|
1442 | 1533 | subprocess32 = super.buildPythonPackage { |
|
1443 | 1534 | name = "subprocess32-3.2.6"; |
|
1444 | 1535 | buildInputs = with self; []; |
|
1445 | 1536 | doCheck = false; |
|
1446 | 1537 | propagatedBuildInputs = with self; []; |
|
1447 | 1538 | src = fetchurl { |
|
1448 | 1539 | url = "https://pypi.python.org/packages/28/8d/33ccbff51053f59ae6c357310cac0e79246bbed1d345ecc6188b176d72c3/subprocess32-3.2.6.tar.gz"; |
|
1449 | 1540 | md5 = "754c5ab9f533e764f931136974b618f1"; |
|
1450 | 1541 | }; |
|
1451 | 1542 | meta = { |
|
1452 | 1543 | license = [ pkgs.lib.licenses.psfl ]; |
|
1453 | 1544 | }; |
|
1454 | 1545 | }; |
|
1455 | 1546 | supervisor = super.buildPythonPackage { |
|
1456 |
name = "supervisor-3. |
|
|
1547 | name = "supervisor-3.3.0"; | |
|
1457 | 1548 | buildInputs = with self; []; |
|
1458 | 1549 | doCheck = false; |
|
1459 | 1550 | propagatedBuildInputs = with self; [meld3]; |
|
1460 | 1551 | src = fetchurl { |
|
1461 |
url = "https://pypi.python.org/packages/ |
|
|
1462 | md5 = "aad263c4fbc070de63dd354864d5e552"; | |
|
1552 | url = "https://pypi.python.org/packages/44/80/d28047d120bfcc8158b4e41127706731ee6a3419c661e0a858fb0e7c4b2d/supervisor-3.3.0.tar.gz"; | |
|
1553 | md5 = "46bac00378d1eddb616752b990c67416"; | |
|
1463 | 1554 | }; |
|
1464 | 1555 | meta = { |
|
1465 | 1556 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1466 | 1557 | }; |
|
1467 | 1558 | }; |
|
1468 | 1559 | transifex-client = super.buildPythonPackage { |
|
1469 | 1560 | name = "transifex-client-0.10"; |
|
1470 | 1561 | buildInputs = with self; []; |
|
1471 | 1562 | doCheck = false; |
|
1472 | 1563 | propagatedBuildInputs = with self; []; |
|
1473 | 1564 | src = fetchurl { |
|
1474 | 1565 | url = "https://pypi.python.org/packages/f3/4e/7b925192aee656fb3e04fa6381c8b3dc40198047c3b4a356f6cfd642c809/transifex-client-0.10.tar.gz"; |
|
1475 | 1566 | md5 = "5549538d84b8eede6b254cd81ae024fa"; |
|
1476 | 1567 | }; |
|
1477 | 1568 | meta = { |
|
1478 | 1569 | license = [ pkgs.lib.licenses.gpl2 ]; |
|
1479 | 1570 | }; |
|
1480 | 1571 | }; |
|
1481 | 1572 | translationstring = super.buildPythonPackage { |
|
1482 | 1573 | name = "translationstring-1.3"; |
|
1483 | 1574 | buildInputs = with self; []; |
|
1484 | 1575 | doCheck = false; |
|
1485 | 1576 | propagatedBuildInputs = with self; []; |
|
1486 | 1577 | src = fetchurl { |
|
1487 | 1578 | url = "https://pypi.python.org/packages/5e/eb/bee578cc150b44c653b63f5ebe258b5d0d812ddac12497e5f80fcad5d0b4/translationstring-1.3.tar.gz"; |
|
1488 | 1579 | md5 = "a4b62e0f3c189c783a1685b3027f7c90"; |
|
1489 | 1580 | }; |
|
1490 | 1581 | meta = { |
|
1491 | 1582 | license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ]; |
|
1492 | 1583 | }; |
|
1493 | 1584 | }; |
|
1494 | 1585 | trollius = super.buildPythonPackage { |
|
1495 | 1586 | name = "trollius-1.0.4"; |
|
1496 | 1587 | buildInputs = with self; []; |
|
1497 | 1588 | doCheck = false; |
|
1498 | 1589 | propagatedBuildInputs = with self; [futures]; |
|
1499 | 1590 | src = fetchurl { |
|
1500 | 1591 | url = "https://pypi.python.org/packages/aa/e6/4141db437f55e6ee7a3fb69663239e3fde7841a811b4bef293145ad6c836/trollius-1.0.4.tar.gz"; |
|
1501 | 1592 | md5 = "3631a464d49d0cbfd30ab2918ef2b783"; |
|
1502 | 1593 | }; |
|
1503 | 1594 | meta = { |
|
1504 | 1595 | license = [ pkgs.lib.licenses.asl20 ]; |
|
1505 | 1596 | }; |
|
1506 | 1597 | }; |
|
1507 | 1598 | uWSGI = super.buildPythonPackage { |
|
1508 | 1599 | name = "uWSGI-2.0.11.2"; |
|
1509 | 1600 | buildInputs = with self; []; |
|
1510 | 1601 | doCheck = false; |
|
1511 | 1602 | propagatedBuildInputs = with self; []; |
|
1512 | 1603 | src = fetchurl { |
|
1513 | 1604 | url = "https://pypi.python.org/packages/9b/78/918db0cfab0546afa580c1e565209c49aaf1476bbfe491314eadbe47c556/uwsgi-2.0.11.2.tar.gz"; |
|
1514 | 1605 | md5 = "1f02dcbee7f6f61de4b1fd68350cf16f"; |
|
1515 | 1606 | }; |
|
1516 | 1607 | meta = { |
|
1517 | 1608 | license = [ pkgs.lib.licenses.gpl2 ]; |
|
1518 | 1609 | }; |
|
1519 | 1610 | }; |
|
1520 | 1611 | urllib3 = super.buildPythonPackage { |
|
1521 | 1612 | name = "urllib3-1.16"; |
|
1522 | 1613 | buildInputs = with self; []; |
|
1523 | 1614 | doCheck = false; |
|
1524 | 1615 | propagatedBuildInputs = with self; []; |
|
1525 | 1616 | src = fetchurl { |
|
1526 | 1617 | url = "https://pypi.python.org/packages/3b/f0/e763169124e3f5db0926bc3dbfcd580a105f9ca44cf5d8e6c7a803c9f6b5/urllib3-1.16.tar.gz"; |
|
1527 | 1618 | md5 = "fcaab1c5385c57deeb7053d3d7d81d59"; |
|
1528 | 1619 | }; |
|
1529 | 1620 | meta = { |
|
1530 | 1621 | license = [ pkgs.lib.licenses.mit ]; |
|
1531 | 1622 | }; |
|
1532 | 1623 | }; |
|
1533 | 1624 | venusian = super.buildPythonPackage { |
|
1534 | 1625 | name = "venusian-1.0"; |
|
1535 | 1626 | buildInputs = with self; []; |
|
1536 | 1627 | doCheck = false; |
|
1537 | 1628 | propagatedBuildInputs = with self; []; |
|
1538 | 1629 | src = fetchurl { |
|
1539 | 1630 | url = "https://pypi.python.org/packages/86/20/1948e0dfc4930ddde3da8c33612f6a5717c0b4bc28f591a5c5cf014dd390/venusian-1.0.tar.gz"; |
|
1540 | 1631 | md5 = "dccf2eafb7113759d60c86faf5538756"; |
|
1541 | 1632 | }; |
|
1542 | 1633 | meta = { |
|
1543 | 1634 | license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; |
|
1544 | 1635 | }; |
|
1545 | 1636 | }; |
|
1546 | 1637 | waitress = super.buildPythonPackage { |
|
1547 | 1638 | name = "waitress-0.8.9"; |
|
1548 | 1639 | buildInputs = with self; []; |
|
1549 | 1640 | doCheck = false; |
|
1550 | 1641 | propagatedBuildInputs = with self; [setuptools]; |
|
1551 | 1642 | src = fetchurl { |
|
1552 | 1643 | url = "https://pypi.python.org/packages/ee/65/fc9dee74a909a1187ca51e4f15ad9c4d35476e4ab5813f73421505c48053/waitress-0.8.9.tar.gz"; |
|
1553 | 1644 | md5 = "da3f2e62b3676be5dd630703a68e2a04"; |
|
1554 | 1645 | }; |
|
1555 | 1646 | meta = { |
|
1556 | 1647 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1557 | 1648 | }; |
|
1558 | 1649 | }; |
|
1650 | ws4py = super.buildPythonPackage { | |
|
1651 | name = "ws4py-0.3.5"; | |
|
1652 | buildInputs = with self; []; | |
|
1653 | doCheck = false; | |
|
1654 | propagatedBuildInputs = with self; []; | |
|
1655 | src = fetchurl { | |
|
1656 | url = "https://pypi.python.org/packages/b6/4f/34af703be86939629479e74d6e650e39f3bd73b3b09212c34e5125764cbc/ws4py-0.3.5.zip"; | |
|
1657 | md5 = "a261b75c20b980e55ce7451a3576a867"; | |
|
1658 | }; | |
|
1659 | meta = { | |
|
1660 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
|
1661 | }; | |
|
1662 | }; | |
|
1559 | 1663 | wsgiref = super.buildPythonPackage { |
|
1560 | 1664 | name = "wsgiref-0.1.2"; |
|
1561 | 1665 | buildInputs = with self; []; |
|
1562 | 1666 | doCheck = false; |
|
1563 | 1667 | propagatedBuildInputs = with self; []; |
|
1564 | 1668 | src = fetchurl { |
|
1565 | 1669 | url = "https://pypi.python.org/packages/41/9e/309259ce8dff8c596e8c26df86dbc4e848b9249fd36797fd60be456f03fc/wsgiref-0.1.2.zip"; |
|
1566 | 1670 | md5 = "29b146e6ebd0f9fb119fe321f7bcf6cb"; |
|
1567 | 1671 | }; |
|
1568 | 1672 | meta = { |
|
1569 | 1673 | license = [ { fullName = "PSF or ZPL"; } ]; |
|
1570 | 1674 | }; |
|
1571 | 1675 | }; |
|
1572 | 1676 | zope.cachedescriptors = super.buildPythonPackage { |
|
1573 | 1677 | name = "zope.cachedescriptors-4.0.0"; |
|
1574 | 1678 | buildInputs = with self; []; |
|
1575 | 1679 | doCheck = false; |
|
1576 | 1680 | propagatedBuildInputs = with self; [setuptools]; |
|
1577 | 1681 | src = fetchurl { |
|
1578 | 1682 | url = "https://pypi.python.org/packages/40/33/694b6644c37f28553f4b9f20b3c3a20fb709a22574dff20b5bdffb09ecd5/zope.cachedescriptors-4.0.0.tar.gz"; |
|
1579 | 1683 | md5 = "8d308de8c936792c8e758058fcb7d0f0"; |
|
1580 | 1684 | }; |
|
1581 | 1685 | meta = { |
|
1582 | 1686 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1583 | 1687 | }; |
|
1584 | 1688 | }; |
|
1585 | 1689 | zope.deprecation = super.buildPythonPackage { |
|
1586 | 1690 | name = "zope.deprecation-4.1.2"; |
|
1587 | 1691 | buildInputs = with self; []; |
|
1588 | 1692 | doCheck = false; |
|
1589 | 1693 | propagatedBuildInputs = with self; [setuptools]; |
|
1590 | 1694 | src = fetchurl { |
|
1591 | 1695 | url = "https://pypi.python.org/packages/c1/d3/3919492d5e57d8dd01b36f30b34fc8404a30577392b1eb817c303499ad20/zope.deprecation-4.1.2.tar.gz"; |
|
1592 | 1696 | md5 = "e9a663ded58f4f9f7881beb56cae2782"; |
|
1593 | 1697 | }; |
|
1594 | 1698 | meta = { |
|
1595 | 1699 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1596 | 1700 | }; |
|
1597 | 1701 | }; |
|
1598 | 1702 | zope.event = super.buildPythonPackage { |
|
1599 | 1703 | name = "zope.event-4.0.3"; |
|
1600 | 1704 | buildInputs = with self; []; |
|
1601 | 1705 | doCheck = false; |
|
1602 | 1706 | propagatedBuildInputs = with self; [setuptools]; |
|
1603 | 1707 | src = fetchurl { |
|
1604 | 1708 | url = "https://pypi.python.org/packages/c1/29/91ba884d7d6d96691df592e9e9c2bfa57a47040ec1ff47eff18c85137152/zope.event-4.0.3.tar.gz"; |
|
1605 | 1709 | md5 = "9a3780916332b18b8b85f522bcc3e249"; |
|
1606 | 1710 | }; |
|
1607 | 1711 | meta = { |
|
1608 | 1712 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1609 | 1713 | }; |
|
1610 | 1714 | }; |
|
1611 | 1715 | zope.interface = super.buildPythonPackage { |
|
1612 | 1716 | name = "zope.interface-4.1.3"; |
|
1613 | 1717 | buildInputs = with self; []; |
|
1614 | 1718 | doCheck = false; |
|
1615 | 1719 | propagatedBuildInputs = with self; [setuptools]; |
|
1616 | 1720 | src = fetchurl { |
|
1617 | 1721 | url = "https://pypi.python.org/packages/9d/81/2509ca3c6f59080123c1a8a97125eb48414022618cec0e64eb1313727bfe/zope.interface-4.1.3.tar.gz"; |
|
1618 | 1722 | md5 = "9ae3d24c0c7415deb249dd1a132f0f79"; |
|
1619 | 1723 | }; |
|
1620 | 1724 | meta = { |
|
1621 | 1725 | license = [ pkgs.lib.licenses.zpt21 ]; |
|
1622 | 1726 | }; |
|
1623 | 1727 | }; |
|
1624 | 1728 | |
|
1625 | 1729 | ### Test requirements |
|
1626 | 1730 | |
|
1627 | 1731 | |
|
1628 | 1732 | } |
@@ -1,150 +1,151 b'' | |||
|
1 | 1 | Babel==1.3 |
|
2 | 2 | Beaker==1.7.0 |
|
3 | 3 | CProfileV==1.0.6 |
|
4 | 4 | Fabric==1.10.0 |
|
5 | 5 | FormEncode==1.2.4 |
|
6 | 6 | Jinja2==2.7.3 |
|
7 | 7 | Mako==1.0.1 |
|
8 | 8 | Markdown==2.6.2 |
|
9 | 9 | MarkupSafe==0.23 |
|
10 | 10 | MySQL-python==1.2.5 |
|
11 | 11 | Paste==2.0.2 |
|
12 | 12 | PasteDeploy==1.5.2 |
|
13 | 13 | PasteScript==1.7.5 |
|
14 |
Pygments==2. |
|
|
14 | Pygments==2.1.3 | |
|
15 | 15 | |
|
16 | 16 | # TODO: This version is not available on PyPI |
|
17 | 17 | # Pylons==1.0.2.dev20160108 |
|
18 | 18 | Pylons==1.0.1 |
|
19 | 19 | |
|
20 | 20 | # TODO: This version is not available, but newer ones are |
|
21 | 21 | # Pyro4==4.35 |
|
22 | 22 | Pyro4==4.41 |
|
23 | 23 | |
|
24 | 24 | # TODO: This should probably not be in here |
|
25 | 25 | # -e hg+https://johbo@code.rhodecode.com/johbo/rhodecode-fork@3a454bd1f17c0b2b2a951cf2b111e0320d7942a9#egg=RhodeCodeEnterprise-dev |
|
26 | 26 | |
|
27 | # TODO: This is not really a dependency, we should add it only | |
|
28 | # into the development environment, since there it is useful. | |
|
29 | # RhodeCodeVCSServer==3.9.0 | |
|
30 | ||
|
31 | 27 | Routes==1.13 |
|
32 | 28 | SQLAlchemy==0.9.9 |
|
33 | 29 | Sphinx==1.2.2 |
|
34 | 30 | Tempita==0.5.2 |
|
35 | 31 | URLObject==2.4.0 |
|
36 | 32 | WebError==0.10.3 |
|
37 | 33 | |
|
38 | 34 | # TODO: This is modified by us, needs a better integration. For now |
|
39 | 35 | # using the latest version before. |
|
40 | 36 | # WebHelpers==1.3.dev20150807 |
|
41 | 37 | WebHelpers==1.3 |
|
42 | 38 | |
|
43 | 39 | WebHelpers2==2.0 |
|
44 | 40 | WebOb==1.3.1 |
|
45 | 41 | WebTest==1.4.3 |
|
46 | 42 | Whoosh==2.7.0 |
|
47 | 43 | alembic==0.8.4 |
|
48 | 44 | amqplib==1.0.2 |
|
49 | 45 | anyjson==0.3.3 |
|
50 | 46 | appenlight-client==0.6.14 |
|
51 | 47 | authomatic==0.1.0.post1; |
|
52 | 48 | backport-ipaddress==0.1 |
|
53 | 49 | bottle==0.12.8 |
|
54 | 50 | bumpversion==0.5.3 |
|
55 | 51 | celery==2.2.10 |
|
52 | channelstream==0.5.2 | |
|
56 | 53 | click==5.1 |
|
57 | 54 | colander==1.2 |
|
58 | 55 | configobj==5.0.6 |
|
59 | 56 | cov-core==1.15.0 |
|
60 | 57 | coverage==3.7.1 |
|
61 | 58 | cssselect==0.9.1 |
|
62 | 59 | decorator==3.4.2 |
|
60 | deform==2.0a2 | |
|
63 | 61 | docutils==0.12 |
|
64 |
dogpile.cache==0. |
|
|
62 | dogpile.cache==0.6.1 | |
|
65 | 63 | dogpile.core==0.4.1 |
|
66 | 64 | dulwich==0.12.0 |
|
67 | 65 | ecdsa==0.11 |
|
68 | 66 | flake8==2.4.1 |
|
69 | 67 | future==0.14.3 |
|
70 | 68 | futures==3.0.2 |
|
69 | gevent==1.1.1 | |
|
71 | 70 | gprof2dot==2015.12.1 |
|
71 | greenlet==0.4.9 | |
|
72 | 72 | gunicorn==19.6.0 |
|
73 | 73 | |
|
74 | 74 | # TODO: Needs subvertpy and blows up without Subversion headers, |
|
75 | 75 | # actually we should not need this for Enterprise at all. |
|
76 | 76 | # hgsubversion==1.8.2 |
|
77 | 77 | |
|
78 | 78 | gnureadline==6.3.3 |
|
79 | 79 | infrae.cache==1.0.1 |
|
80 | 80 | invoke==0.13.0 |
|
81 | 81 | ipdb==0.8 |
|
82 | 82 | ipython==3.1.0 |
|
83 | 83 | iso8601==0.1.11 |
|
84 | 84 | itsdangerous==0.24 |
|
85 | 85 | kombu==1.5.1 |
|
86 | 86 | lxml==3.4.4 |
|
87 | 87 | mccabe==0.3 |
|
88 | 88 | meld3==1.0.2 |
|
89 | 89 | mock==1.0.1 |
|
90 | 90 | msgpack-python==0.4.6 |
|
91 | 91 | nose==1.3.6 |
|
92 | 92 | objgraph==2.0.0 |
|
93 | 93 | packaging==15.2 |
|
94 | 94 | paramiko==1.15.1 |
|
95 | 95 | pep8==1.5.7 |
|
96 | 96 | psutil==2.2.1 |
|
97 | psycopg2==2.6 | |
|
97 | psycopg2==2.6.1 | |
|
98 | 98 | py==1.4.29 |
|
99 | 99 | py-bcrypt==0.4 |
|
100 | py-gfm==0.1.3 | |
|
100 | 101 | pycrypto==2.6.1 |
|
101 | 102 | pycurl==7.19.5 |
|
102 | 103 | pyflakes==0.8.1 |
|
103 | 104 | pyparsing==1.5.7 |
|
104 | 105 | pyramid==1.6.1 |
|
105 | 106 | pyramid-beaker==0.8 |
|
106 | 107 | pyramid-debugtoolbar==2.4.2 |
|
107 | 108 | pyramid-jinja2==2.5 |
|
108 | 109 | pyramid-mako==1.0.2 |
|
109 | 110 | pysqlite==2.6.3 |
|
110 | 111 | pytest==2.8.5 |
|
111 | 112 | pytest-runner==2.7.1 |
|
112 | 113 | pytest-catchlog==1.2.2 |
|
113 | 114 | pytest-cov==1.8.1 |
|
114 | 115 | pytest-profiling==1.0.1 |
|
115 | 116 | pytest-timeout==0.4 |
|
116 | 117 | python-dateutil==1.5 |
|
117 | 118 | python-ldap==2.4.19 |
|
118 | 119 | python-memcached==1.57 |
|
119 | 120 | python-pam==1.8.2 |
|
120 | 121 | pytz==2015.4 |
|
121 | 122 | pyzmq==14.6.0 |
|
122 | 123 | |
|
123 | 124 | # TODO: This is not available in public |
|
124 | 125 | # rc-testdata==0.2.0 |
|
125 | 126 | |
|
126 |
https://code.rhodecode.com/rhodecode-tools-ce/archive/v0. |
|
|
127 | https://code.rhodecode.com/rhodecode-tools-ce/archive/v0.10.0.zip#md5=4762391473ded761bead3aa58c748044 | |
|
127 | 128 | |
|
128 | 129 | |
|
129 | 130 | recaptcha-client==1.0.6 |
|
130 | 131 | repoze.lru==0.6 |
|
131 | 132 | requests==2.9.1 |
|
132 | 133 | serpent==1.12 |
|
133 | 134 | setproctitle==1.1.8 |
|
134 | 135 | setuptools==20.8.1 |
|
135 | 136 | setuptools-scm==1.11.0 |
|
136 | 137 | simplejson==3.7.2 |
|
137 | 138 | six==1.9.0 |
|
138 | 139 | subprocess32==3.2.6 |
|
139 |
supervisor==3. |
|
|
140 | supervisor==3.3.0 | |
|
140 | 141 | transifex-client==0.10 |
|
141 | 142 | translationstring==1.3 |
|
142 | 143 | trollius==1.0.4 |
|
143 | 144 | uWSGI==2.0.11.2 |
|
144 | 145 | venusian==1.0 |
|
145 | 146 | waitress==0.8.9 |
|
146 | 147 | wsgiref==0.1.2 |
|
147 | 148 | zope.cachedescriptors==4.0.0 |
|
148 | 149 | zope.deprecation==4.1.2 |
|
149 | 150 | zope.event==4.0.3 |
|
150 | 151 | zope.interface==4.1.3 |
@@ -1,58 +1,62 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | """ |
|
22 | 22 | |
|
23 | 23 | RhodeCode, a web based repository management software |
|
24 | 24 | versioning implementation: http://www.python.org/dev/peps/pep-0386/ |
|
25 | 25 | """ |
|
26 | 26 | |
|
27 | 27 | import os |
|
28 | 28 | import sys |
|
29 | 29 | import platform |
|
30 | 30 | |
|
31 | 31 | VERSION = tuple(open(os.path.join( |
|
32 | 32 | os.path.dirname(__file__), 'VERSION')).read().split('.')) |
|
33 | 33 | |
|
34 | 34 | BACKENDS = { |
|
35 | 35 | 'hg': 'Mercurial repository', |
|
36 | 36 | 'git': 'Git repository', |
|
37 | 37 | 'svn': 'Subversion repository', |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | CELERY_ENABLED = False |
|
41 | 41 | CELERY_EAGER = False |
|
42 | 42 | |
|
43 | 43 | # link to config for pylons |
|
44 | 44 | CONFIG = {} |
|
45 | 45 | |
|
46 | # Populated with the settings dictionary from application init in | |
|
47 | # rhodecode.conf.environment.load_pyramid_environment | |
|
48 | PYRAMID_SETTINGS = {} | |
|
49 | ||
|
46 | 50 | # Linked module for extensions |
|
47 | 51 | EXTENSIONS = {} |
|
48 | 52 | |
|
49 | 53 | __version__ = ('.'.join((str(each) for each in VERSION[:3]))) |
|
50 |
__dbversion__ = 5 |
|
|
54 | __dbversion__ = 55 # defines current db version for migrations | |
|
51 | 55 | __platform__ = platform.system() |
|
52 | 56 | __license__ = 'AGPLv3, and Commercial License' |
|
53 | 57 | __author__ = 'RhodeCode GmbH' |
|
54 | 58 | __url__ = 'http://rhodecode.com' |
|
55 | 59 | |
|
56 | 60 | is_windows = __platform__ in ['Windows'] |
|
57 | 61 | is_unix = not is_windows |
|
58 | 62 | is_test = False |
@@ -1,124 +1,126 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | import logging |
|
23 | 23 | import collections |
|
24 | 24 | |
|
25 | 25 | from pylons import url |
|
26 | 26 | from zope.interface import implementer |
|
27 | 27 | |
|
28 | 28 | from rhodecode.admin.interfaces import IAdminNavigationRegistry |
|
29 | 29 | from rhodecode.lib.utils import get_registry |
|
30 | 30 | from rhodecode.translation import _ |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | log = logging.getLogger(__name__) |
|
34 | 34 | |
|
35 | 35 | NavListEntry = collections.namedtuple('NavListEntry', ['key', 'name', 'url']) |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | class NavEntry(object): |
|
39 | 39 | """ |
|
40 | 40 | Represents an entry in the admin navigation. |
|
41 | 41 | |
|
42 | 42 | :param key: Unique identifier used to store reference in an OrderedDict. |
|
43 | 43 | :param name: Display name, usually a translation string. |
|
44 | 44 | :param view_name: Name of the view, used generate the URL. |
|
45 | 45 | :param pyramid: Indicator to use pyramid for URL generation. This should |
|
46 | 46 | be removed as soon as we are fully migrated to pyramid. |
|
47 | 47 | """ |
|
48 | 48 | |
|
49 | 49 | def __init__(self, key, name, view_name, pyramid=False): |
|
50 | 50 | self.key = key |
|
51 | 51 | self.name = name |
|
52 | 52 | self.view_name = view_name |
|
53 | 53 | self.pyramid = pyramid |
|
54 | 54 | |
|
55 | 55 | def generate_url(self, request): |
|
56 | 56 | if self.pyramid: |
|
57 | 57 | if hasattr(request, 'route_path'): |
|
58 | 58 | return request.route_path(self.view_name) |
|
59 | 59 | else: |
|
60 | 60 | # TODO: johbo: Remove this after migrating to pyramid. |
|
61 | 61 | # We need the pyramid request here to generate URLs to pyramid |
|
62 | 62 | # views from within pylons views. |
|
63 | 63 | from pyramid.threadlocal import get_current_request |
|
64 | 64 | pyramid_request = get_current_request() |
|
65 | 65 | return pyramid_request.route_path(self.view_name) |
|
66 | 66 | else: |
|
67 | 67 | return url(self.view_name) |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | @implementer(IAdminNavigationRegistry) |
|
71 | 71 | class NavigationRegistry(object): |
|
72 | 72 | |
|
73 | 73 | _base_entries = [ |
|
74 | 74 | NavEntry('global', _('Global'), 'admin_settings_global'), |
|
75 | 75 | NavEntry('vcs', _('VCS'), 'admin_settings_vcs'), |
|
76 | 76 | NavEntry('visual', _('Visual'), 'admin_settings_visual'), |
|
77 | 77 | NavEntry('mapping', _('Remap and Rescan'), 'admin_settings_mapping'), |
|
78 | 78 | NavEntry('issuetracker', _('Issue Tracker'), |
|
79 | 79 | 'admin_settings_issuetracker'), |
|
80 | 80 | NavEntry('email', _('Email'), 'admin_settings_email'), |
|
81 | 81 | NavEntry('hooks', _('Hooks'), 'admin_settings_hooks'), |
|
82 | 82 | NavEntry('search', _('Full Text Search'), 'admin_settings_search'), |
|
83 | NavEntry('integrations', _('Integrations'), | |
|
84 | 'global_integrations_home', pyramid=True), | |
|
83 | 85 | NavEntry('system', _('System Info'), 'admin_settings_system'), |
|
84 | 86 | NavEntry('open_source', _('Open Source Licenses'), |
|
85 | 87 | 'admin_settings_open_source', pyramid=True), |
|
86 | 88 | # TODO: marcink: we disable supervisor now until the supervisor stats |
|
87 | 89 | # page is fixed in the nix configuration |
|
88 | 90 | # NavEntry('supervisor', _('Supervisor'), 'admin_settings_supervisor'), |
|
89 | 91 | ] |
|
90 | 92 | |
|
91 | 93 | _labs_entry = NavEntry('labs', _('Labs'), |
|
92 | 94 | 'admin_settings_labs') |
|
93 | 95 | |
|
94 | 96 | def __init__(self, labs_active=False): |
|
95 | 97 | self._registered_entries = collections.OrderedDict([ |
|
96 | 98 | (item.key, item) for item in self.__class__._base_entries |
|
97 | 99 | ]) |
|
98 | 100 | |
|
99 | 101 | if labs_active: |
|
100 | 102 | self.add_entry(self._labs_entry) |
|
101 | 103 | |
|
102 | 104 | def add_entry(self, entry): |
|
103 | 105 | self._registered_entries[entry.key] = entry |
|
104 | 106 | |
|
105 | 107 | def get_navlist(self, request): |
|
106 | 108 | navlist = [NavListEntry(i.key, i.name, i.generate_url(request)) |
|
107 | 109 | for i in self._registered_entries.values()] |
|
108 | 110 | return navlist |
|
109 | 111 | |
|
110 | 112 | |
|
111 | 113 | def navigation_registry(request): |
|
112 | 114 | """ |
|
113 | 115 | Helper that returns the admin navigation registry. |
|
114 | 116 | """ |
|
115 | 117 | pyramid_registry = get_registry(request) |
|
116 | 118 | nav_registry = pyramid_registry.queryUtility(IAdminNavigationRegistry) |
|
117 | 119 | return nav_registry |
|
118 | 120 | |
|
119 | 121 | |
|
120 | 122 | def navigation_list(request): |
|
121 | 123 | """ |
|
122 | 124 | Helper that returns the admin navigation as list of NavListEntry objects. |
|
123 | 125 | """ |
|
124 | 126 | return navigation_registry(request).get_navlist(request) |
@@ -1,497 +1,505 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2011-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import inspect |
|
22 | 22 | import itertools |
|
23 | 23 | import logging |
|
24 | 24 | import types |
|
25 | 25 | |
|
26 | 26 | import decorator |
|
27 | 27 | import venusian |
|
28 | from collections import OrderedDict | |
|
29 | ||
|
28 | 30 | from pyramid.exceptions import ConfigurationError |
|
29 | 31 | from pyramid.renderers import render |
|
30 | 32 | from pyramid.response import Response |
|
31 | 33 | from pyramid.httpexceptions import HTTPNotFound |
|
32 | 34 | |
|
33 | from rhodecode.api.exc import JSONRPCBaseError, JSONRPCError, JSONRPCForbidden | |
|
35 | from rhodecode.api.exc import ( | |
|
36 | JSONRPCBaseError, JSONRPCError, JSONRPCForbidden, JSONRPCValidationError) | |
|
34 | 37 | from rhodecode.lib.auth import AuthUser |
|
35 | 38 | from rhodecode.lib.base import get_ip_addr |
|
36 | 39 | from rhodecode.lib.ext_json import json |
|
37 | 40 | from rhodecode.lib.utils2 import safe_str |
|
38 | 41 | from rhodecode.lib.plugins.utils import get_plugin_settings |
|
39 | 42 | from rhodecode.model.db import User, UserApiKeys |
|
40 | 43 | |
|
41 | 44 | log = logging.getLogger(__name__) |
|
42 | 45 | |
|
43 | 46 | DEFAULT_RENDERER = 'jsonrpc_renderer' |
|
44 | 47 | DEFAULT_URL = '/_admin/apiv2' |
|
45 | 48 | |
|
46 | 49 | |
|
47 | 50 | class ExtJsonRenderer(object): |
|
48 | 51 | """ |
|
49 | 52 | Custom renderer that mkaes use of our ext_json lib |
|
50 | 53 | |
|
51 | 54 | """ |
|
52 | 55 | |
|
53 | 56 | def __init__(self, serializer=json.dumps, **kw): |
|
54 | 57 | """ Any keyword arguments will be passed to the ``serializer`` |
|
55 | 58 | function.""" |
|
56 | 59 | self.serializer = serializer |
|
57 | 60 | self.kw = kw |
|
58 | 61 | |
|
59 | 62 | def __call__(self, info): |
|
60 | 63 | """ Returns a plain JSON-encoded string with content-type |
|
61 | 64 | ``application/json``. The content-type may be overridden by |
|
62 | 65 | setting ``request.response.content_type``.""" |
|
63 | 66 | |
|
64 | 67 | def _render(value, system): |
|
65 | 68 | request = system.get('request') |
|
66 | 69 | if request is not None: |
|
67 | 70 | response = request.response |
|
68 | 71 | ct = response.content_type |
|
69 | 72 | if ct == response.default_content_type: |
|
70 | 73 | response.content_type = 'application/json' |
|
71 | 74 | |
|
72 | 75 | return self.serializer(value, **self.kw) |
|
73 | 76 | |
|
74 | 77 | return _render |
|
75 | 78 | |
|
76 | 79 | |
|
77 | 80 | def jsonrpc_response(request, result): |
|
78 | 81 | rpc_id = getattr(request, 'rpc_id', None) |
|
79 | 82 | response = request.response |
|
80 | 83 | |
|
81 | 84 | # store content_type before render is called |
|
82 | 85 | ct = response.content_type |
|
83 | 86 | |
|
84 | 87 | ret_value = '' |
|
85 | 88 | if rpc_id: |
|
86 | 89 | ret_value = { |
|
87 | 90 | 'id': rpc_id, |
|
88 | 91 | 'result': result, |
|
89 | 92 | 'error': None, |
|
90 | 93 | } |
|
91 | 94 | |
|
92 | 95 | # fetch deprecation warnings, and store it inside results |
|
93 | 96 | deprecation = getattr(request, 'rpc_deprecation', None) |
|
94 | 97 | if deprecation: |
|
95 | 98 | ret_value['DEPRECATION_WARNING'] = deprecation |
|
96 | 99 | |
|
97 | 100 | raw_body = render(DEFAULT_RENDERER, ret_value, request=request) |
|
98 | 101 | response.body = safe_str(raw_body, response.charset) |
|
99 | 102 | |
|
100 | 103 | if ct == response.default_content_type: |
|
101 | 104 | response.content_type = 'application/json' |
|
102 | 105 | |
|
103 | 106 | return response |
|
104 | 107 | |
|
105 | 108 | |
|
106 | 109 | def jsonrpc_error(request, message, retid=None, code=None): |
|
107 | 110 | """ |
|
108 | 111 | Generate a Response object with a JSON-RPC error body |
|
109 | 112 | |
|
110 | 113 | :param code: |
|
111 | 114 | :param retid: |
|
112 | 115 | :param message: |
|
113 | 116 | """ |
|
114 | 117 | err_dict = {'id': retid, 'result': None, 'error': message} |
|
115 | 118 | body = render(DEFAULT_RENDERER, err_dict, request=request).encode('utf-8') |
|
116 | 119 | return Response( |
|
117 | 120 | body=body, |
|
118 | 121 | status=code, |
|
119 | 122 | content_type='application/json' |
|
120 | 123 | ) |
|
121 | 124 | |
|
122 | 125 | |
|
123 | 126 | def exception_view(exc, request): |
|
124 | 127 | rpc_id = getattr(request, 'rpc_id', None) |
|
125 | 128 | |
|
126 | 129 | fault_message = 'undefined error' |
|
127 | 130 | if isinstance(exc, JSONRPCError): |
|
128 | 131 | fault_message = exc.message |
|
129 | 132 | log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message) |
|
133 | elif isinstance(exc, JSONRPCValidationError): | |
|
134 | colander_exc = exc.colander_exception | |
|
135 | #TODO: think maybe of nicer way to serialize errors ? | |
|
136 | fault_message = colander_exc.asdict() | |
|
137 | log.debug('json-rpc error rpc_id:%s "%s"', rpc_id, fault_message) | |
|
130 | 138 | elif isinstance(exc, JSONRPCForbidden): |
|
131 | 139 | fault_message = 'Access was denied to this resource.' |
|
132 | 140 | log.warning('json-rpc forbidden call rpc_id:%s "%s"', rpc_id, fault_message) |
|
133 | 141 | elif isinstance(exc, HTTPNotFound): |
|
134 | 142 | method = request.rpc_method |
|
135 | 143 | log.debug('json-rpc method `%s` not found in list of ' |
|
136 | 144 | 'api calls: %s, rpc_id:%s', |
|
137 | 145 | method, request.registry.jsonrpc_methods.keys(), rpc_id) |
|
138 | 146 | fault_message = "No such method: {}".format(method) |
|
139 | 147 | |
|
140 | 148 | return jsonrpc_error(request, fault_message, rpc_id) |
|
141 | 149 | |
|
142 | 150 | |
|
143 | 151 | def request_view(request): |
|
144 | 152 | """ |
|
145 | 153 | Main request handling method. It handles all logic to call a specific |
|
146 | 154 | exposed method |
|
147 | 155 | """ |
|
148 | 156 | |
|
149 | 157 | # check if we can find this session using api_key, get_by_auth_token |
|
150 | 158 | # search not expired tokens only |
|
151 | 159 | |
|
152 | 160 | try: |
|
153 | 161 | u = User.get_by_auth_token(request.rpc_api_key) |
|
154 | 162 | |
|
155 | 163 | if u is None: |
|
156 | 164 | return jsonrpc_error( |
|
157 | 165 | request, retid=request.rpc_id, message='Invalid API KEY') |
|
158 | 166 | |
|
159 | 167 | if not u.active: |
|
160 | 168 | return jsonrpc_error( |
|
161 | 169 | request, retid=request.rpc_id, |
|
162 | 170 | message='Request from this user not allowed') |
|
163 | 171 | |
|
164 | 172 | # check if we are allowed to use this IP |
|
165 | 173 | auth_u = AuthUser( |
|
166 | 174 | u.user_id, request.rpc_api_key, ip_addr=request.rpc_ip_addr) |
|
167 | 175 | if not auth_u.ip_allowed: |
|
168 | 176 | return jsonrpc_error( |
|
169 | 177 | request, retid=request.rpc_id, |
|
170 | 178 | message='Request from IP:%s not allowed' % ( |
|
171 | 179 | request.rpc_ip_addr,)) |
|
172 | 180 | else: |
|
173 | 181 | log.info('Access for IP:%s allowed' % (request.rpc_ip_addr,)) |
|
174 | 182 | |
|
175 | 183 | # now check if token is valid for API |
|
176 | 184 | role = UserApiKeys.ROLE_API |
|
177 | 185 | extra_auth_tokens = [ |
|
178 | 186 | x.api_key for x in User.extra_valid_auth_tokens(u, role=role)] |
|
179 | 187 | active_tokens = [u.api_key] + extra_auth_tokens |
|
180 | 188 | |
|
181 | 189 | log.debug('Checking if API key has proper role') |
|
182 | 190 | if request.rpc_api_key not in active_tokens: |
|
183 | 191 | return jsonrpc_error( |
|
184 | 192 | request, retid=request.rpc_id, |
|
185 | 193 | message='API KEY has bad role for an API call') |
|
186 | 194 | |
|
187 | 195 | except Exception as e: |
|
188 | 196 | log.exception('Error on API AUTH') |
|
189 | 197 | return jsonrpc_error( |
|
190 | 198 | request, retid=request.rpc_id, message='Invalid API KEY') |
|
191 | 199 | |
|
192 | 200 | method = request.rpc_method |
|
193 | 201 | func = request.registry.jsonrpc_methods[method] |
|
194 | 202 | |
|
195 | 203 | # now that we have a method, add request._req_params to |
|
196 | 204 | # self.kargs and dispatch control to WGIController |
|
197 | 205 | argspec = inspect.getargspec(func) |
|
198 | 206 | arglist = argspec[0] |
|
199 | 207 | defaults = map(type, argspec[3] or []) |
|
200 | 208 | default_empty = types.NotImplementedType |
|
201 | 209 | |
|
202 | 210 | # kw arguments required by this method |
|
203 | 211 | func_kwargs = dict(itertools.izip_longest( |
|
204 | 212 | reversed(arglist), reversed(defaults), fillvalue=default_empty)) |
|
205 | 213 | |
|
206 | 214 | # This attribute will need to be first param of a method that uses |
|
207 | 215 | # api_key, which is translated to instance of user at that name |
|
208 | 216 | user_var = 'apiuser' |
|
209 | 217 | request_var = 'request' |
|
210 | 218 | |
|
211 | 219 | for arg in [user_var, request_var]: |
|
212 | 220 | if arg not in arglist: |
|
213 | 221 | return jsonrpc_error( |
|
214 | 222 | request, |
|
215 | 223 | retid=request.rpc_id, |
|
216 | 224 | message='This method [%s] does not support ' |
|
217 | 225 | 'required parameter `%s`' % (func.__name__, arg)) |
|
218 | 226 | |
|
219 | 227 | # get our arglist and check if we provided them as args |
|
220 | 228 | for arg, default in func_kwargs.items(): |
|
221 | 229 | if arg in [user_var, request_var]: |
|
222 | 230 | # user_var and request_var are pre-hardcoded parameters and we |
|
223 | 231 | # don't need to do any translation |
|
224 | 232 | continue |
|
225 | 233 | |
|
226 | 234 | # skip the required param check if it's default value is |
|
227 | 235 | # NotImplementedType (default_empty) |
|
228 | 236 | if default == default_empty and arg not in request.rpc_params: |
|
229 | 237 | return jsonrpc_error( |
|
230 | 238 | request, |
|
231 | 239 | retid=request.rpc_id, |
|
232 | 240 | message=('Missing non optional `%s` arg in JSON DATA' % arg) |
|
233 | 241 | ) |
|
234 | 242 | |
|
235 | 243 | # sanitze extra passed arguments |
|
236 | 244 | for k in request.rpc_params.keys()[:]: |
|
237 | 245 | if k not in func_kwargs: |
|
238 | 246 | del request.rpc_params[k] |
|
239 | 247 | |
|
240 | 248 | call_params = request.rpc_params |
|
241 | 249 | call_params.update({ |
|
242 | 250 | 'request': request, |
|
243 | 251 | 'apiuser': auth_u |
|
244 | 252 | }) |
|
245 | 253 | try: |
|
246 | 254 | ret_value = func(**call_params) |
|
247 | 255 | return jsonrpc_response(request, ret_value) |
|
248 | 256 | except JSONRPCBaseError: |
|
249 | 257 | raise |
|
250 | 258 | except Exception: |
|
251 | 259 | log.exception('Unhandled exception occured on api call: %s', func) |
|
252 | 260 | return jsonrpc_error(request, retid=request.rpc_id, |
|
253 | 261 | message='Internal server error') |
|
254 | 262 | |
|
255 | 263 | |
|
256 | 264 | def setup_request(request): |
|
257 | 265 | """ |
|
258 | 266 | Parse a JSON-RPC request body. It's used inside the predicates method |
|
259 | 267 | to validate and bootstrap requests for usage in rpc calls. |
|
260 | 268 | |
|
261 | 269 | We need to raise JSONRPCError here if we want to return some errors back to |
|
262 | 270 | user. |
|
263 | 271 | """ |
|
264 | 272 | log.debug('Executing setup request: %r', request) |
|
265 | 273 | request.rpc_ip_addr = get_ip_addr(request.environ) |
|
266 | 274 | # TODO: marcink, deprecate GET at some point |
|
267 | 275 | if request.method not in ['POST', 'GET']: |
|
268 | 276 | log.debug('unsupported request method "%s"', request.method) |
|
269 | 277 | raise JSONRPCError( |
|
270 | 278 | 'unsupported request method "%s". Please use POST' % request.method) |
|
271 | 279 | |
|
272 | 280 | if 'CONTENT_LENGTH' not in request.environ: |
|
273 | 281 | log.debug("No Content-Length") |
|
274 | 282 | raise JSONRPCError("Empty body, No Content-Length in request") |
|
275 | 283 | |
|
276 | 284 | else: |
|
277 | 285 | length = request.environ['CONTENT_LENGTH'] |
|
278 | 286 | log.debug('Content-Length: %s', length) |
|
279 | 287 | |
|
280 | 288 | if length == 0: |
|
281 | 289 | log.debug("Content-Length is 0") |
|
282 | 290 | raise JSONRPCError("Content-Length is 0") |
|
283 | 291 | |
|
284 | 292 | raw_body = request.body |
|
285 | 293 | try: |
|
286 | 294 | json_body = json.loads(raw_body) |
|
287 | 295 | except ValueError as e: |
|
288 | 296 | # catch JSON errors Here |
|
289 | 297 | raise JSONRPCError("JSON parse error ERR:%s RAW:%r" % (e, raw_body)) |
|
290 | 298 | |
|
291 | 299 | request.rpc_id = json_body.get('id') |
|
292 | 300 | request.rpc_method = json_body.get('method') |
|
293 | 301 | |
|
294 | 302 | # check required base parameters |
|
295 | 303 | try: |
|
296 | 304 | api_key = json_body.get('api_key') |
|
297 | 305 | if not api_key: |
|
298 | 306 | api_key = json_body.get('auth_token') |
|
299 | 307 | |
|
300 | 308 | if not api_key: |
|
301 | 309 | raise KeyError('api_key or auth_token') |
|
302 | 310 | |
|
303 | 311 | request.rpc_api_key = api_key |
|
304 | 312 | request.rpc_id = json_body['id'] |
|
305 | 313 | request.rpc_method = json_body['method'] |
|
306 | 314 | request.rpc_params = json_body['args'] \ |
|
307 | 315 | if isinstance(json_body['args'], dict) else {} |
|
308 | 316 | |
|
309 | 317 | log.debug( |
|
310 | 318 | 'method: %s, params: %s' % (request.rpc_method, request.rpc_params)) |
|
311 | 319 | except KeyError as e: |
|
312 | 320 | raise JSONRPCError('Incorrect JSON data. Missing %s' % e) |
|
313 | 321 | |
|
314 | 322 | log.debug('setup complete, now handling method:%s rpcid:%s', |
|
315 | 323 | request.rpc_method, request.rpc_id, ) |
|
316 | 324 | |
|
317 | 325 | |
|
318 | 326 | class RoutePredicate(object): |
|
319 | 327 | def __init__(self, val, config): |
|
320 | 328 | self.val = val |
|
321 | 329 | |
|
322 | 330 | def text(self): |
|
323 | 331 | return 'jsonrpc route = %s' % self.val |
|
324 | 332 | |
|
325 | 333 | phash = text |
|
326 | 334 | |
|
327 | 335 | def __call__(self, info, request): |
|
328 | 336 | if self.val: |
|
329 | 337 | # potentially setup and bootstrap our call |
|
330 | 338 | setup_request(request) |
|
331 | 339 | |
|
332 | 340 | # Always return True so that even if it isn't a valid RPC it |
|
333 | 341 | # will fall through to the underlaying handlers like notfound_view |
|
334 | 342 | return True |
|
335 | 343 | |
|
336 | 344 | |
|
337 | 345 | class NotFoundPredicate(object): |
|
338 | 346 | def __init__(self, val, config): |
|
339 | 347 | self.val = val |
|
340 | 348 | |
|
341 | 349 | def text(self): |
|
342 | 350 | return 'jsonrpc method not found = %s' % self.val |
|
343 | 351 | |
|
344 | 352 | phash = text |
|
345 | 353 | |
|
346 | 354 | def __call__(self, info, request): |
|
347 | 355 | return hasattr(request, 'rpc_method') |
|
348 | 356 | |
|
349 | 357 | |
|
350 | 358 | class MethodPredicate(object): |
|
351 | 359 | def __init__(self, val, config): |
|
352 | 360 | self.method = val |
|
353 | 361 | |
|
354 | 362 | def text(self): |
|
355 | 363 | return 'jsonrpc method = %s' % self.method |
|
356 | 364 | |
|
357 | 365 | phash = text |
|
358 | 366 | |
|
359 | 367 | def __call__(self, context, request): |
|
360 | 368 | # we need to explicitly return False here, so pyramid doesn't try to |
|
361 | 369 | # execute our view directly. We need our main handler to execute things |
|
362 | 370 | return getattr(request, 'rpc_method') == self.method |
|
363 | 371 | |
|
364 | 372 | |
|
365 | 373 | def add_jsonrpc_method(config, view, **kwargs): |
|
366 | 374 | # pop the method name |
|
367 | 375 | method = kwargs.pop('method', None) |
|
368 | 376 | |
|
369 | 377 | if method is None: |
|
370 | 378 | raise ConfigurationError( |
|
371 | 379 | 'Cannot register a JSON-RPC method without specifying the ' |
|
372 | 380 | '"method"') |
|
373 | 381 | |
|
374 | 382 | # we define custom predicate, to enable to detect conflicting methods, |
|
375 | 383 | # those predicates are kind of "translation" from the decorator variables |
|
376 | 384 | # to internal predicates names |
|
377 | 385 | |
|
378 | 386 | kwargs['jsonrpc_method'] = method |
|
379 | 387 | |
|
380 | 388 | # register our view into global view store for validation |
|
381 | 389 | config.registry.jsonrpc_methods[method] = view |
|
382 | 390 | |
|
383 | 391 | # we're using our main request_view handler, here, so each method |
|
384 | 392 | # has a unified handler for itself |
|
385 | 393 | config.add_view(request_view, route_name='apiv2', **kwargs) |
|
386 | 394 | |
|
387 | 395 | |
|
388 | 396 | class jsonrpc_method(object): |
|
389 | 397 | """ |
|
390 | 398 | decorator that works similar to @add_view_config decorator, |
|
391 | 399 | but tailored for our JSON RPC |
|
392 | 400 | """ |
|
393 | 401 | |
|
394 | 402 | venusian = venusian # for testing injection |
|
395 | 403 | |
|
396 | 404 | def __init__(self, method=None, **kwargs): |
|
397 | 405 | self.method = method |
|
398 | 406 | self.kwargs = kwargs |
|
399 | 407 | |
|
400 | 408 | def __call__(self, wrapped): |
|
401 | 409 | kwargs = self.kwargs.copy() |
|
402 | 410 | kwargs['method'] = self.method or wrapped.__name__ |
|
403 | 411 | depth = kwargs.pop('_depth', 0) |
|
404 | 412 | |
|
405 | 413 | def callback(context, name, ob): |
|
406 | 414 | config = context.config.with_package(info.module) |
|
407 | 415 | config.add_jsonrpc_method(view=ob, **kwargs) |
|
408 | 416 | |
|
409 | 417 | info = venusian.attach(wrapped, callback, category='pyramid', |
|
410 | 418 | depth=depth + 1) |
|
411 | 419 | if info.scope == 'class': |
|
412 | 420 | # ensure that attr is set if decorating a class method |
|
413 | 421 | kwargs.setdefault('attr', wrapped.__name__) |
|
414 | 422 | |
|
415 | 423 | kwargs['_info'] = info.codeinfo # fbo action_method |
|
416 | 424 | return wrapped |
|
417 | 425 | |
|
418 | 426 | |
|
419 | 427 | class jsonrpc_deprecated_method(object): |
|
420 | 428 | """ |
|
421 | 429 | Marks method as deprecated, adds log.warning, and inject special key to |
|
422 | 430 | the request variable to mark method as deprecated. |
|
423 | 431 | Also injects special docstring that extract_docs will catch to mark |
|
424 | 432 | method as deprecated. |
|
425 | 433 | |
|
426 | 434 | :param use_method: specify which method should be used instead of |
|
427 | 435 | the decorated one |
|
428 | 436 | |
|
429 | 437 | Use like:: |
|
430 | 438 | |
|
431 | 439 | @jsonrpc_method() |
|
432 | 440 | @jsonrpc_deprecated_method(use_method='new_func', deprecated_at_version='3.0.0') |
|
433 | 441 | def old_func(request, apiuser, arg1, arg2): |
|
434 | 442 | ... |
|
435 | 443 | """ |
|
436 | 444 | |
|
437 | 445 | def __init__(self, use_method, deprecated_at_version): |
|
438 | 446 | self.use_method = use_method |
|
439 | 447 | self.deprecated_at_version = deprecated_at_version |
|
440 | 448 | self.deprecated_msg = '' |
|
441 | 449 | |
|
442 | 450 | def __call__(self, func): |
|
443 | 451 | self.deprecated_msg = 'Please use method `{method}` instead.'.format( |
|
444 | 452 | method=self.use_method) |
|
445 | 453 | |
|
446 | 454 | docstring = """\n |
|
447 | 455 | .. deprecated:: {version} |
|
448 | 456 | |
|
449 | 457 | {deprecation_message} |
|
450 | 458 | |
|
451 | 459 | {original_docstring} |
|
452 | 460 | """ |
|
453 | 461 | func.__doc__ = docstring.format( |
|
454 | 462 | version=self.deprecated_at_version, |
|
455 | 463 | deprecation_message=self.deprecated_msg, |
|
456 | 464 | original_docstring=func.__doc__) |
|
457 | 465 | return decorator.decorator(self.__wrapper, func) |
|
458 | 466 | |
|
459 | 467 | def __wrapper(self, func, *fargs, **fkwargs): |
|
460 | 468 | log.warning('DEPRECATED API CALL on function %s, please ' |
|
461 | 469 | 'use `%s` instead', func, self.use_method) |
|
462 | 470 | # alter function docstring to mark as deprecated, this is picked up |
|
463 | 471 | # via fabric file that generates API DOC. |
|
464 | 472 | result = func(*fargs, **fkwargs) |
|
465 | 473 | |
|
466 | 474 | request = fargs[0] |
|
467 | 475 | request.rpc_deprecation = 'DEPRECATED METHOD ' + self.deprecated_msg |
|
468 | 476 | return result |
|
469 | 477 | |
|
470 | 478 | |
|
471 | 479 | def includeme(config): |
|
472 | 480 | plugin_module = 'rhodecode.api' |
|
473 | 481 | plugin_settings = get_plugin_settings( |
|
474 | 482 | plugin_module, config.registry.settings) |
|
475 | 483 | |
|
476 | 484 | if not hasattr(config.registry, 'jsonrpc_methods'): |
|
477 |
config.registry.jsonrpc_methods = |
|
|
485 | config.registry.jsonrpc_methods = OrderedDict() | |
|
478 | 486 | |
|
479 | 487 | # match filter by given method only |
|
480 | 488 | config.add_view_predicate( |
|
481 | 489 | 'jsonrpc_method', MethodPredicate) |
|
482 | 490 | |
|
483 | 491 | config.add_renderer(DEFAULT_RENDERER, ExtJsonRenderer( |
|
484 | 492 | serializer=json.dumps, indent=4)) |
|
485 | 493 | config.add_directive('add_jsonrpc_method', add_jsonrpc_method) |
|
486 | 494 | |
|
487 | 495 | config.add_route_predicate( |
|
488 | 496 | 'jsonrpc_call', RoutePredicate) |
|
489 | 497 | |
|
490 | 498 | config.add_route( |
|
491 | 499 | 'apiv2', plugin_settings.get('url', DEFAULT_URL), jsonrpc_call=True) |
|
492 | 500 | |
|
493 | 501 | config.scan(plugin_module, ignore='rhodecode.api.tests') |
|
494 | 502 | # register some exception handling view |
|
495 | 503 | config.add_view(exception_view, context=JSONRPCBaseError) |
|
496 | 504 | config.add_view_predicate('jsonrpc_method_not_found', NotFoundPredicate) |
|
497 | 505 | config.add_notfound_view(exception_view, jsonrpc_method_not_found=True) |
@@ -1,31 +1,39 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2011-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | class JSONRPCBaseError(Exception): |
|
23 | 23 | pass |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | class JSONRPCError(JSONRPCBaseError): |
|
27 | 27 | pass |
|
28 | 28 | |
|
29 | 29 | |
|
30 | class JSONRPCValidationError(JSONRPCBaseError): | |
|
31 | ||
|
32 | def __init__(self, *args, **kwargs): | |
|
33 | self.colander_exception = kwargs.pop('colander_exc') | |
|
34 | super(JSONRPCValidationError, self).__init__(*args, **kwargs) | |
|
35 | ||
|
36 | ||
|
30 | 37 | class JSONRPCForbidden(JSONRPCBaseError): |
|
31 | 38 | pass |
|
39 |
@@ -1,76 +1,102 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import mock |
|
22 | 22 | import pytest |
|
23 | 23 | |
|
24 | 24 | from rhodecode.model.db import Gist |
|
25 | 25 | from rhodecode.model.gist import GistModel |
|
26 | 26 | from rhodecode.api.tests.utils import ( |
|
27 | 27 | build_data, api_call, assert_error, assert_ok, crash) |
|
28 | 28 | from rhodecode.tests.fixture import Fixture |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | @pytest.mark.usefixtures("testuser_api", "app") |
|
32 | 32 | class TestApiCreateGist(object): |
|
33 | 33 | @pytest.mark.parametrize("lifetime, gist_type, gist_acl_level", [ |
|
34 | 34 | (10, Gist.GIST_PUBLIC, Gist.ACL_LEVEL_PUBLIC), |
|
35 | 35 | (20, Gist.GIST_PUBLIC, Gist.ACL_LEVEL_PRIVATE), |
|
36 | 36 | (40, Gist.GIST_PRIVATE, Gist.ACL_LEVEL_PUBLIC), |
|
37 | 37 | (80, Gist.GIST_PRIVATE, Gist.ACL_LEVEL_PRIVATE), |
|
38 | 38 | ]) |
|
39 | 39 | def test_api_create_gist(self, lifetime, gist_type, gist_acl_level): |
|
40 | 40 | id_, params = build_data( |
|
41 | 41 | self.apikey_regular, 'create_gist', |
|
42 | 42 | lifetime=lifetime, |
|
43 | 43 | description='foobar-gist', |
|
44 | 44 | gist_type=gist_type, |
|
45 | 45 | acl_level=gist_acl_level, |
|
46 | files={'foobar': {'content': 'foo'}}) | |
|
46 | files={'foobar_ąć': {'content': 'foo'}}) | |
|
47 | 47 | response = api_call(self.app, params) |
|
48 | 48 | response_json = response.json |
|
49 | 49 | gist = response_json['result']['gist'] |
|
50 | 50 | expected = { |
|
51 | 51 | 'gist': { |
|
52 | 52 | 'access_id': gist['access_id'], |
|
53 | 53 | 'created_on': gist['created_on'], |
|
54 | 54 | 'modified_at': gist['modified_at'], |
|
55 | 55 | 'description': 'foobar-gist', |
|
56 | 56 | 'expires': gist['expires'], |
|
57 | 57 | 'gist_id': gist['gist_id'], |
|
58 | 58 | 'type': gist_type, |
|
59 | 59 | 'url': gist['url'], |
|
60 | 60 | # content is empty since we don't show it here |
|
61 | 61 | 'content': None, |
|
62 | 62 | 'acl_level': gist_acl_level, |
|
63 | 63 | }, |
|
64 | 64 | 'msg': 'created new gist' |
|
65 | 65 | } |
|
66 | 66 | try: |
|
67 | 67 | assert_ok(id_, expected, given=response.body) |
|
68 | 68 | finally: |
|
69 | 69 | Fixture().destroy_gists() |
|
70 | 70 | |
|
71 | @pytest.mark.parametrize("expected, lifetime, gist_type, gist_acl_level, files", [ | |
|
72 | ({'gist_type': '"ups" is not one of private, public'}, | |
|
73 | 10, 'ups', Gist.ACL_LEVEL_PUBLIC, {'f': {'content': 'f'}}), | |
|
74 | ||
|
75 | ({'lifetime': '-120 is less than minimum value -1'}, | |
|
76 | -120, Gist.GIST_PUBLIC, Gist.ACL_LEVEL_PUBLIC, {'f': {'content': 'f'}}), | |
|
77 | ||
|
78 | ({'0.content': 'Required'}, | |
|
79 | 10, Gist.GIST_PUBLIC, Gist.ACL_LEVEL_PUBLIC, {'f': {'x': 'f'}}), | |
|
80 | ]) | |
|
81 | def test_api_try_create_gist( | |
|
82 | self, expected, lifetime, gist_type, gist_acl_level, files): | |
|
83 | id_, params = build_data( | |
|
84 | self.apikey_regular, 'create_gist', | |
|
85 | lifetime=lifetime, | |
|
86 | description='foobar-gist', | |
|
87 | gist_type=gist_type, | |
|
88 | acl_level=gist_acl_level, | |
|
89 | files=files) | |
|
90 | response = api_call(self.app, params) | |
|
91 | ||
|
92 | try: | |
|
93 | assert_error(id_, expected, given=response.body) | |
|
94 | finally: | |
|
95 | Fixture().destroy_gists() | |
|
96 | ||
|
71 | 97 | @mock.patch.object(GistModel, 'create', crash) |
|
72 | 98 | def test_api_create_gist_exception_occurred(self): |
|
73 | 99 | id_, params = build_data(self.apikey_regular, 'create_gist', files={}) |
|
74 | 100 | response = api_call(self.app, params) |
|
75 | 101 | expected = 'failed to create gist' |
|
76 | 102 | assert_error(id_, expected, given=response.body) |
@@ -1,79 +1,79 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | import pytest |
|
23 | 23 | |
|
24 |
from rhodecode.api.views import depr |
|
|
24 | from rhodecode.api.views import deprecated_api | |
|
25 | 25 | from rhodecode.lib.ext_json import json |
|
26 | 26 | from rhodecode.api.tests.utils import ( |
|
27 | 27 | build_data, api_call) |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | @pytest.mark.usefixtures("testuser_api", "app") |
|
31 | 31 | class TestCommitComment(object): |
|
32 | 32 | def test_deprecated_message_in_docstring(self): |
|
33 |
docstring = depr |
|
|
33 | docstring = deprecated_api.changeset_comment.__doc__ | |
|
34 | 34 | assert '.. deprecated:: 3.4.0' in docstring |
|
35 | 35 | assert 'Please use method `comment_commit` instead.' in docstring |
|
36 | 36 | |
|
37 | 37 | def test_deprecated_message_in_retvalue(self): |
|
38 | 38 | |
|
39 | 39 | id_, params = build_data( |
|
40 | 40 | self.apikey, 'show_ip') |
|
41 | 41 | response = api_call(self.app, params) |
|
42 | 42 | |
|
43 | 43 | expected = { |
|
44 | 44 | 'id': id_, |
|
45 | 45 | 'error': None, |
|
46 | 46 | 'result': json.loads(response.body)['result'], |
|
47 | 47 | 'DEPRECATION_WARNING': |
|
48 | 48 | 'DEPRECATED METHOD Please use method `get_ip` instead.' |
|
49 | 49 | } |
|
50 | 50 | assert expected == json.loads(response.body) |
|
51 | 51 | |
|
52 | 52 | # def test_calls_comment_commit(self, backend, no_notifications): |
|
53 | 53 | # data = { |
|
54 | 54 | # 'repoid': backend.repo_name, |
|
55 | 55 | # 'status': ChangesetStatus.STATUS_APPROVED, |
|
56 | 56 | # 'message': 'Approved', |
|
57 | 57 | # 'revision': 'tip' |
|
58 | 58 | # } |
|
59 | 59 | # with patch.object(repo_api, 'changeset_commit') as comment_mock: |
|
60 | 60 | # id_, params = build_data(self.apikey, 'comment_commit', **data) |
|
61 | 61 | # api_call(self.app, params) |
|
62 | 62 | # |
|
63 | 63 | # _, call_args = comment_mock.call_args |
|
64 | 64 | # data['commit_id'] = data.pop('revision') |
|
65 | 65 | # for key in data: |
|
66 | 66 | # assert call_args[key] == data[key] |
|
67 | 67 | |
|
68 | 68 | # def test_warning_log_contains_deprecation_message(self): |
|
69 | 69 | # api = self.SampleApi() |
|
70 | 70 | # with patch.object(utils, 'log') as log_mock: |
|
71 | 71 | # api.api_method() |
|
72 | 72 | # |
|
73 | 73 | # assert log_mock.warning.call_count == 1 |
|
74 | 74 | # call_args = log_mock.warning.call_args[0] |
|
75 | 75 | # assert ( |
|
76 | 76 | # call_args[0] == |
|
77 | 77 | # 'DEPRECATED API CALL on function %s, please use `%s` instead') |
|
78 | 78 | # assert call_args[1].__name__ == 'api_method' |
|
79 | 79 | # assert call_args[2] == 'new_method' No newline at end of file |
@@ -1,119 +1,142 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | import pytest |
|
23 | 23 | |
|
24 | 24 | from rhodecode.model.meta import Session |
|
25 | 25 | from rhodecode.model.repo import RepoModel |
|
26 | 26 | from rhodecode.api.tests.utils import ( |
|
27 | 27 | build_data, api_call, assert_error, assert_ok) |
|
28 | 28 | |
|
29 | 29 | |
|
30 | 30 | @pytest.mark.usefixtures("testuser_api", "app") |
|
31 | 31 | class TestGetRepoNodes(object): |
|
32 | 32 | @pytest.mark.parametrize("name, ret_type", [ |
|
33 | 33 | ('all', 'all'), |
|
34 | 34 | ('dirs', 'dirs'), |
|
35 | 35 | ('files', 'files'), |
|
36 | 36 | ]) |
|
37 | 37 | def test_api_get_repo_nodes(self, name, ret_type, backend): |
|
38 | 38 | commit_id = 'tip' |
|
39 | 39 | path = '/' |
|
40 | 40 | id_, params = build_data( |
|
41 | 41 | self.apikey, 'get_repo_nodes', |
|
42 | 42 | repoid=backend.repo_name, revision=commit_id, |
|
43 | 43 | root_path=path, |
|
44 | 44 | ret_type=ret_type) |
|
45 | 45 | response = api_call(self.app, params) |
|
46 | 46 | |
|
47 | 47 | # we don't the actual return types here since it's tested somewhere |
|
48 | 48 | # else |
|
49 | 49 | expected = response.json['result'] |
|
50 | 50 | assert_ok(id_, expected, given=response.body) |
|
51 | 51 | |
|
52 | 52 | def test_api_get_repo_nodes_bad_commits(self, backend): |
|
53 | 53 | commit_id = 'i-dont-exist' |
|
54 | 54 | path = '/' |
|
55 | 55 | id_, params = build_data( |
|
56 | 56 | self.apikey, 'get_repo_nodes', |
|
57 | 57 | repoid=backend.repo_name, revision=commit_id, |
|
58 | 58 | root_path=path, ) |
|
59 | 59 | response = api_call(self.app, params) |
|
60 | 60 | |
|
61 | 61 | expected = 'failed to get repo: `%s` nodes' % (backend.repo_name,) |
|
62 | 62 | assert_error(id_, expected, given=response.body) |
|
63 | 63 | |
|
64 | 64 | def test_api_get_repo_nodes_bad_path(self, backend): |
|
65 | 65 | commit_id = 'tip' |
|
66 | 66 | path = '/idontexits' |
|
67 | 67 | id_, params = build_data( |
|
68 | 68 | self.apikey, 'get_repo_nodes', |
|
69 | 69 | repoid=backend.repo_name, revision=commit_id, |
|
70 | 70 | root_path=path, ) |
|
71 | 71 | response = api_call(self.app, params) |
|
72 | 72 | |
|
73 | 73 | expected = 'failed to get repo: `%s` nodes' % (backend.repo_name,) |
|
74 | 74 | assert_error(id_, expected, given=response.body) |
|
75 | 75 | |
|
76 | def test_api_get_repo_nodes_max_file_bytes(self, backend): | |
|
77 | commit_id = 'tip' | |
|
78 | path = '/' | |
|
79 | max_file_bytes = 500 | |
|
80 | ||
|
81 | id_, params = build_data( | |
|
82 | self.apikey, 'get_repo_nodes', | |
|
83 | repoid=backend.repo_name, revision=commit_id, details='full', | |
|
84 | root_path=path) | |
|
85 | response = api_call(self.app, params) | |
|
86 | assert any(file['content'] and len(file['content']) > max_file_bytes | |
|
87 | for file in response.json['result']) | |
|
88 | ||
|
89 | id_, params = build_data( | |
|
90 | self.apikey, 'get_repo_nodes', | |
|
91 | repoid=backend.repo_name, revision=commit_id, | |
|
92 | root_path=path, details='full', | |
|
93 | max_file_bytes=max_file_bytes) | |
|
94 | response = api_call(self.app, params) | |
|
95 | assert all( | |
|
96 | file['content'] is None if file['size'] > max_file_bytes else True | |
|
97 | for file in response.json['result']) | |
|
98 | ||
|
76 | 99 | def test_api_get_repo_nodes_bad_ret_type(self, backend): |
|
77 | 100 | commit_id = 'tip' |
|
78 | 101 | path = '/' |
|
79 | 102 | ret_type = 'error' |
|
80 | 103 | id_, params = build_data( |
|
81 | 104 | self.apikey, 'get_repo_nodes', |
|
82 | 105 | repoid=backend.repo_name, revision=commit_id, |
|
83 | 106 | root_path=path, |
|
84 | 107 | ret_type=ret_type) |
|
85 | 108 | response = api_call(self.app, params) |
|
86 | 109 | |
|
87 | 110 | expected = ('ret_type must be one of %s' |
|
88 | 111 | % (','.join(['all', 'dirs', 'files']))) |
|
89 | 112 | assert_error(id_, expected, given=response.body) |
|
90 | 113 | |
|
91 | 114 | @pytest.mark.parametrize("name, ret_type, grant_perm", [ |
|
92 | 115 | ('all', 'all', 'repository.write'), |
|
93 | 116 | ('dirs', 'dirs', 'repository.admin'), |
|
94 | 117 | ('files', 'files', 'repository.read'), |
|
95 | 118 | ]) |
|
96 | 119 | def test_api_get_repo_nodes_by_regular_user( |
|
97 | 120 | self, name, ret_type, grant_perm, backend): |
|
98 | 121 | RepoModel().grant_user_permission(repo=backend.repo_name, |
|
99 | 122 | user=self.TEST_USER_LOGIN, |
|
100 | 123 | perm=grant_perm) |
|
101 | 124 | Session().commit() |
|
102 | 125 | |
|
103 | 126 | commit_id = 'tip' |
|
104 | 127 | path = '/' |
|
105 | 128 | id_, params = build_data( |
|
106 | 129 | self.apikey_regular, 'get_repo_nodes', |
|
107 | 130 | repoid=backend.repo_name, revision=commit_id, |
|
108 | 131 | root_path=path, |
|
109 | 132 | ret_type=ret_type) |
|
110 | 133 | response = api_call(self.app, params) |
|
111 | 134 | |
|
112 | 135 | # we don't the actual return types here since it's tested somewhere |
|
113 | 136 | # else |
|
114 | 137 | expected = response.json['result'] |
|
115 | 138 | try: |
|
116 | 139 | assert_ok(id_, expected, given=response.body) |
|
117 | 140 | finally: |
|
118 | 141 | RepoModel().revoke_user_permission( |
|
119 | 142 | backend.repo_name, self.TEST_USER_LOGIN) |
@@ -1,158 +1,163 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import mock |
|
22 | 22 | import pytest |
|
23 | 23 | |
|
24 | 24 | from rhodecode.model.repo import RepoModel |
|
25 | 25 | from rhodecode.tests import TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN |
|
26 | 26 | from rhodecode.api.tests.utils import ( |
|
27 | 27 | build_data, api_call, assert_error, assert_ok, crash, jsonify) |
|
28 | 28 | from rhodecode.tests.fixture import Fixture |
|
29 | 29 | |
|
30 | 30 | |
|
31 | 31 | fixture = Fixture() |
|
32 | 32 | |
|
33 | 33 | UPDATE_REPO_NAME = 'api_update_me' |
|
34 | 34 | |
|
35 | 35 | class SAME_AS_UPDATES(object): """ Constant used for tests below """ |
|
36 | 36 | |
|
37 | 37 | @pytest.mark.usefixtures("testuser_api", "app") |
|
38 | 38 | class TestApiUpdateRepo(object): |
|
39 | 39 | |
|
40 | 40 | @pytest.mark.parametrize("updates, expected", [ |
|
41 | 41 | ({'owner': TEST_USER_REGULAR_LOGIN}, SAME_AS_UPDATES), |
|
42 | 42 | ({'description': 'new description'}, SAME_AS_UPDATES), |
|
43 | 43 | ({'clone_uri': 'http://foo.com/repo'}, SAME_AS_UPDATES), |
|
44 | 44 | ({'clone_uri': None}, {'clone_uri': ''}), |
|
45 | 45 | ({'clone_uri': ''}, {'clone_uri': ''}), |
|
46 | 46 | ({'landing_rev': 'branch:master'}, {'landing_rev': ['branch','master']}), |
|
47 | 47 | ({'enable_statistics': True}, SAME_AS_UPDATES), |
|
48 | 48 | ({'enable_locking': True}, SAME_AS_UPDATES), |
|
49 | 49 | ({'enable_downloads': True}, SAME_AS_UPDATES), |
|
50 |
({'name': 'new_repo_name'}, { |
|
|
51 | ({'group': 'test_group_for_update'}, | |
|
52 | {'repo_name': 'test_group_for_update/%s' % UPDATE_REPO_NAME}), | |
|
50 | ({'name': 'new_repo_name'}, { | |
|
51 | 'repo_name': 'new_repo_name', | |
|
52 | 'url': 'http://test.example.com:80/new_repo_name', | |
|
53 | }), | |
|
54 | ({'group': 'test_group_for_update'}, { | |
|
55 | 'repo_name': 'test_group_for_update/%s' % UPDATE_REPO_NAME, | |
|
56 | 'url': 'http://test.example.com:80/test_group_for_update/%s' % UPDATE_REPO_NAME | |
|
57 | }), | |
|
53 | 58 | ]) |
|
54 | 59 | def test_api_update_repo(self, updates, expected, backend): |
|
55 | 60 | repo_name = UPDATE_REPO_NAME |
|
56 | 61 | repo = fixture.create_repo(repo_name, repo_type=backend.alias) |
|
57 | 62 | if updates.get('group'): |
|
58 | 63 | fixture.create_repo_group(updates['group']) |
|
59 | 64 | |
|
60 | 65 | expected_api_data = repo.get_api_data(include_secrets=True) |
|
61 | 66 | if expected is SAME_AS_UPDATES: |
|
62 | 67 | expected_api_data.update(updates) |
|
63 | 68 | else: |
|
64 | 69 | expected_api_data.update(expected) |
|
65 | 70 | |
|
66 | 71 | |
|
67 | 72 | id_, params = build_data( |
|
68 | 73 | self.apikey, 'update_repo', repoid=repo_name, **updates) |
|
69 | 74 | response = api_call(self.app, params) |
|
70 | 75 | |
|
71 | 76 | if updates.get('name'): |
|
72 | 77 | repo_name = updates['name'] |
|
73 | 78 | if updates.get('group'): |
|
74 | 79 | repo_name = '/'.join([updates['group'], repo_name]) |
|
75 | 80 | |
|
76 | 81 | try: |
|
77 | 82 | expected = { |
|
78 | 83 | 'msg': 'updated repo ID:%s %s' % (repo.repo_id, repo_name), |
|
79 | 84 | 'repository': jsonify(expected_api_data) |
|
80 | 85 | } |
|
81 | 86 | assert_ok(id_, expected, given=response.body) |
|
82 | 87 | finally: |
|
83 | 88 | fixture.destroy_repo(repo_name) |
|
84 | 89 | if updates.get('group'): |
|
85 | 90 | fixture.destroy_repo_group(updates['group']) |
|
86 | 91 | |
|
87 | 92 | def test_api_update_repo_fork_of_field(self, backend): |
|
88 | 93 | master_repo = backend.create_repo() |
|
89 | 94 | repo = backend.create_repo() |
|
90 | 95 | updates = { |
|
91 | 96 | 'fork_of': master_repo.repo_name |
|
92 | 97 | } |
|
93 | 98 | expected_api_data = repo.get_api_data(include_secrets=True) |
|
94 | 99 | expected_api_data.update(updates) |
|
95 | 100 | |
|
96 | 101 | id_, params = build_data( |
|
97 | 102 | self.apikey, 'update_repo', repoid=repo.repo_name, **updates) |
|
98 | 103 | response = api_call(self.app, params) |
|
99 | 104 | expected = { |
|
100 | 105 | 'msg': 'updated repo ID:%s %s' % (repo.repo_id, repo.repo_name), |
|
101 | 106 | 'repository': jsonify(expected_api_data) |
|
102 | 107 | } |
|
103 | 108 | assert_ok(id_, expected, given=response.body) |
|
104 | 109 | result = response.json['result']['repository'] |
|
105 | 110 | assert result['fork_of'] == master_repo.repo_name |
|
106 | 111 | |
|
107 | 112 | def test_api_update_repo_fork_of_not_found(self, backend): |
|
108 | 113 | master_repo_name = 'fake-parent-repo' |
|
109 | 114 | repo = backend.create_repo() |
|
110 | 115 | updates = { |
|
111 | 116 | 'fork_of': master_repo_name |
|
112 | 117 | } |
|
113 | 118 | id_, params = build_data( |
|
114 | 119 | self.apikey, 'update_repo', repoid=repo.repo_name, **updates) |
|
115 | 120 | response = api_call(self.app, params) |
|
116 | 121 | expected = 'repository `{}` does not exist'.format(master_repo_name) |
|
117 | 122 | assert_error(id_, expected, given=response.body) |
|
118 | 123 | |
|
119 | 124 | def test_api_update_repo_with_repo_group_not_existing(self): |
|
120 | 125 | repo_name = 'admin_owned' |
|
121 | 126 | fixture.create_repo(repo_name) |
|
122 | 127 | updates = {'group': 'test_group_for_update'} |
|
123 | 128 | id_, params = build_data( |
|
124 | 129 | self.apikey, 'update_repo', repoid=repo_name, **updates) |
|
125 | 130 | response = api_call(self.app, params) |
|
126 | 131 | try: |
|
127 | 132 | expected = 'repository group `%s` does not exist' % ( |
|
128 | 133 | updates['group'],) |
|
129 | 134 | assert_error(id_, expected, given=response.body) |
|
130 | 135 | finally: |
|
131 | 136 | fixture.destroy_repo(repo_name) |
|
132 | 137 | |
|
133 | 138 | def test_api_update_repo_regular_user_not_allowed(self): |
|
134 | 139 | repo_name = 'admin_owned' |
|
135 | 140 | fixture.create_repo(repo_name) |
|
136 | 141 | updates = {'active': False} |
|
137 | 142 | id_, params = build_data( |
|
138 | 143 | self.apikey_regular, 'update_repo', repoid=repo_name, **updates) |
|
139 | 144 | response = api_call(self.app, params) |
|
140 | 145 | try: |
|
141 | 146 | expected = 'repository `%s` does not exist' % (repo_name,) |
|
142 | 147 | assert_error(id_, expected, given=response.body) |
|
143 | 148 | finally: |
|
144 | 149 | fixture.destroy_repo(repo_name) |
|
145 | 150 | |
|
146 | 151 | @mock.patch.object(RepoModel, 'update', crash) |
|
147 | 152 | def test_api_update_repo_exception_occurred(self, backend): |
|
148 | 153 | repo_name = UPDATE_REPO_NAME |
|
149 | 154 | fixture.create_repo(repo_name, repo_type=backend.alias) |
|
150 | 155 | id_, params = build_data( |
|
151 | 156 | self.apikey, 'update_repo', repoid=repo_name, |
|
152 | 157 | owner=TEST_USER_ADMIN_LOGIN,) |
|
153 | 158 | response = api_call(self.app, params) |
|
154 | 159 | try: |
|
155 | 160 | expected = 'failed to update repo `%s`' % (repo_name,) |
|
156 | 161 | assert_error(id_, expected, given=response.body) |
|
157 | 162 | finally: |
|
158 | 163 | fixture.destroy_repo(repo_name) |
@@ -1,378 +1,376 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2014-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | """ |
|
22 | 22 | JSON RPC utils |
|
23 | 23 | """ |
|
24 | 24 | |
|
25 | 25 | import collections |
|
26 | 26 | import logging |
|
27 | 27 | |
|
28 | 28 | from rhodecode.api.exc import JSONRPCError |
|
29 | 29 | from rhodecode.lib.auth import HasPermissionAnyApi, HasRepoPermissionAnyApi |
|
30 | 30 | from rhodecode.lib.utils import safe_unicode |
|
31 | 31 | from rhodecode.controllers.utils import get_commit_from_ref_name |
|
32 | 32 | from rhodecode.lib.vcs.exceptions import RepositoryError |
|
33 | 33 | |
|
34 | 34 | log = logging.getLogger(__name__) |
|
35 | 35 | |
|
36 | 36 | |
|
37 | ||
|
38 | ||
|
39 | 37 | class OAttr(object): |
|
40 | 38 | """ |
|
41 | 39 | Special Option that defines other attribute, and can default to them |
|
42 | 40 | |
|
43 | 41 | Example:: |
|
44 | 42 | |
|
45 | 43 | def test(apiuser, userid=Optional(OAttr('apiuser')): |
|
46 | 44 | user = Optional.extract(userid, evaluate_locals=local()) |
|
47 | 45 | #if we pass in userid, we get it, else it will default to apiuser |
|
48 | 46 | #attribute |
|
49 | 47 | """ |
|
50 | 48 | |
|
51 | 49 | def __init__(self, attr_name): |
|
52 | 50 | self.attr_name = attr_name |
|
53 | 51 | |
|
54 | 52 | def __repr__(self): |
|
55 | 53 | return '<OptionalAttr:%s>' % self.attr_name |
|
56 | 54 | |
|
57 | 55 | def __call__(self): |
|
58 | 56 | return self |
|
59 | 57 | |
|
60 | 58 | |
|
61 | 59 | class Optional(object): |
|
62 | 60 | """ |
|
63 | 61 | Defines an optional parameter:: |
|
64 | 62 | |
|
65 | 63 | param = param.getval() if isinstance(param, Optional) else param |
|
66 | 64 | param = param() if isinstance(param, Optional) else param |
|
67 | 65 | |
|
68 | 66 | is equivalent of:: |
|
69 | 67 | |
|
70 | 68 | param = Optional.extract(param) |
|
71 | 69 | |
|
72 | 70 | """ |
|
73 | 71 | |
|
74 | 72 | def __init__(self, type_): |
|
75 | 73 | self.type_ = type_ |
|
76 | 74 | |
|
77 | 75 | def __repr__(self): |
|
78 | 76 | return '<Optional:%s>' % self.type_.__repr__() |
|
79 | 77 | |
|
80 | 78 | def __call__(self): |
|
81 | 79 | return self.getval() |
|
82 | 80 | |
|
83 | 81 | def getval(self, evaluate_locals=None): |
|
84 | 82 | """ |
|
85 | 83 | returns value from this Optional instance |
|
86 | 84 | """ |
|
87 | 85 | if isinstance(self.type_, OAttr): |
|
88 | 86 | param_name = self.type_.attr_name |
|
89 | 87 | if evaluate_locals: |
|
90 | 88 | return evaluate_locals[param_name] |
|
91 | 89 | # use params name |
|
92 | 90 | return param_name |
|
93 | 91 | return self.type_ |
|
94 | 92 | |
|
95 | 93 | @classmethod |
|
96 | 94 | def extract(cls, val, evaluate_locals=None): |
|
97 | 95 | """ |
|
98 | 96 | Extracts value from Optional() instance |
|
99 | 97 | |
|
100 | 98 | :param val: |
|
101 | 99 | :return: original value if it's not Optional instance else |
|
102 | 100 | value of instance |
|
103 | 101 | """ |
|
104 | 102 | if isinstance(val, cls): |
|
105 | 103 | return val.getval(evaluate_locals) |
|
106 | 104 | return val |
|
107 | 105 | |
|
108 | 106 | |
|
109 | 107 | def parse_args(cli_args, key_prefix=''): |
|
110 | 108 | from rhodecode.lib.utils2 import (escape_split) |
|
111 | 109 | kwargs = collections.defaultdict(dict) |
|
112 | 110 | for el in escape_split(cli_args, ','): |
|
113 | 111 | kv = escape_split(el, '=', 1) |
|
114 | 112 | if len(kv) == 2: |
|
115 | 113 | k, v = kv |
|
116 | 114 | kwargs[key_prefix + k] = v |
|
117 | 115 | return kwargs |
|
118 | 116 | |
|
119 | 117 | |
|
120 | 118 | def get_origin(obj): |
|
121 | 119 | """ |
|
122 | 120 | Get origin of permission from object. |
|
123 | 121 | |
|
124 | 122 | :param obj: |
|
125 | 123 | """ |
|
126 | 124 | origin = 'permission' |
|
127 | 125 | |
|
128 | 126 | if getattr(obj, 'owner_row', '') and getattr(obj, 'admin_row', ''): |
|
129 | 127 | # admin and owner case, maybe we should use dual string ? |
|
130 | 128 | origin = 'owner' |
|
131 | 129 | elif getattr(obj, 'owner_row', ''): |
|
132 | 130 | origin = 'owner' |
|
133 | 131 | elif getattr(obj, 'admin_row', ''): |
|
134 | 132 | origin = 'super-admin' |
|
135 | 133 | return origin |
|
136 | 134 | |
|
137 | 135 | |
|
138 | 136 | def store_update(updates, attr, name): |
|
139 | 137 | """ |
|
140 | 138 | Stores param in updates dict if it's not instance of Optional |
|
141 | 139 | allows easy updates of passed in params |
|
142 | 140 | """ |
|
143 | 141 | if not isinstance(attr, Optional): |
|
144 | 142 | updates[name] = attr |
|
145 | 143 | |
|
146 | 144 | |
|
147 | 145 | def has_superadmin_permission(apiuser): |
|
148 | 146 | """ |
|
149 | 147 | Return True if apiuser is admin or return False |
|
150 | 148 | |
|
151 | 149 | :param apiuser: |
|
152 | 150 | """ |
|
153 | 151 | if HasPermissionAnyApi('hg.admin')(user=apiuser): |
|
154 | 152 | return True |
|
155 | 153 | return False |
|
156 | 154 | |
|
157 | 155 | |
|
158 | 156 | def has_repo_permissions(apiuser, repoid, repo, perms): |
|
159 | 157 | """ |
|
160 | 158 | Raise JsonRPCError if apiuser is not authorized or return True |
|
161 | 159 | |
|
162 | 160 | :param apiuser: |
|
163 | 161 | :param repoid: |
|
164 | 162 | :param repo: |
|
165 | 163 | :param perms: |
|
166 | 164 | """ |
|
167 | 165 | if not HasRepoPermissionAnyApi(*perms)( |
|
168 | 166 | user=apiuser, repo_name=repo.repo_name): |
|
169 | 167 | raise JSONRPCError( |
|
170 | 168 | 'repository `%s` does not exist' % repoid) |
|
171 | 169 | |
|
172 | 170 | return True |
|
173 | 171 | |
|
174 | 172 | |
|
175 | 173 | def get_user_or_error(userid): |
|
176 | 174 | """ |
|
177 | 175 | Get user by id or name or return JsonRPCError if not found |
|
178 | 176 | |
|
179 | 177 | :param userid: |
|
180 | 178 | """ |
|
181 | 179 | from rhodecode.model.user import UserModel |
|
182 | 180 | |
|
183 | 181 | user_model = UserModel() |
|
184 | 182 | try: |
|
185 | 183 | user = user_model.get_user(int(userid)) |
|
186 | 184 | except ValueError: |
|
187 | 185 | user = user_model.get_by_username(userid) |
|
188 | 186 | |
|
189 | 187 | if user is None: |
|
190 | 188 | raise JSONRPCError("user `%s` does not exist" % (userid,)) |
|
191 | 189 | return user |
|
192 | 190 | |
|
193 | 191 | |
|
194 | 192 | def get_repo_or_error(repoid): |
|
195 | 193 | """ |
|
196 | 194 | Get repo by id or name or return JsonRPCError if not found |
|
197 | 195 | |
|
198 | 196 | :param repoid: |
|
199 | 197 | """ |
|
200 | 198 | from rhodecode.model.repo import RepoModel |
|
201 | 199 | |
|
202 | 200 | repo = RepoModel().get_repo(repoid) |
|
203 | 201 | if repo is None: |
|
204 | 202 | raise JSONRPCError('repository `%s` does not exist' % (repoid,)) |
|
205 | 203 | return repo |
|
206 | 204 | |
|
207 | 205 | |
|
208 | 206 | def get_repo_group_or_error(repogroupid): |
|
209 | 207 | """ |
|
210 | 208 | Get repo group by id or name or return JsonRPCError if not found |
|
211 | 209 | |
|
212 | 210 | :param repogroupid: |
|
213 | 211 | """ |
|
214 | 212 | from rhodecode.model.repo_group import RepoGroupModel |
|
215 | 213 | |
|
216 | 214 | repo_group = RepoGroupModel()._get_repo_group(repogroupid) |
|
217 | 215 | if repo_group is None: |
|
218 | 216 | raise JSONRPCError( |
|
219 | 217 | 'repository group `%s` does not exist' % (repogroupid,)) |
|
220 | 218 | return repo_group |
|
221 | 219 | |
|
222 | 220 | |
|
223 | 221 | def get_user_group_or_error(usergroupid): |
|
224 | 222 | """ |
|
225 | 223 | Get user group by id or name or return JsonRPCError if not found |
|
226 | 224 | |
|
227 | 225 | :param usergroupid: |
|
228 | 226 | """ |
|
229 | 227 | from rhodecode.model.user_group import UserGroupModel |
|
230 | 228 | |
|
231 | 229 | user_group = UserGroupModel().get_group(usergroupid) |
|
232 | 230 | if user_group is None: |
|
233 | 231 | raise JSONRPCError('user group `%s` does not exist' % (usergroupid,)) |
|
234 | 232 | return user_group |
|
235 | 233 | |
|
236 | 234 | |
|
237 | 235 | def get_perm_or_error(permid, prefix=None): |
|
238 | 236 | """ |
|
239 | 237 | Get permission by id or name or return JsonRPCError if not found |
|
240 | 238 | |
|
241 | 239 | :param permid: |
|
242 | 240 | """ |
|
243 | 241 | from rhodecode.model.permission import PermissionModel |
|
244 | 242 | |
|
245 | 243 | perm = PermissionModel.cls.get_by_key(permid) |
|
246 | 244 | if perm is None: |
|
247 | 245 | raise JSONRPCError('permission `%s` does not exist' % (permid,)) |
|
248 | 246 | if prefix: |
|
249 | 247 | if not perm.permission_name.startswith(prefix): |
|
250 | 248 | raise JSONRPCError('permission `%s` is invalid, ' |
|
251 | 249 | 'should start with %s' % (permid, prefix)) |
|
252 | 250 | return perm |
|
253 | 251 | |
|
254 | 252 | |
|
255 | 253 | def get_gist_or_error(gistid): |
|
256 | 254 | """ |
|
257 | 255 | Get gist by id or gist_access_id or return JsonRPCError if not found |
|
258 | 256 | |
|
259 | 257 | :param gistid: |
|
260 | 258 | """ |
|
261 | 259 | from rhodecode.model.gist import GistModel |
|
262 | 260 | |
|
263 | 261 | gist = GistModel.cls.get_by_access_id(gistid) |
|
264 | 262 | if gist is None: |
|
265 | 263 | raise JSONRPCError('gist `%s` does not exist' % (gistid,)) |
|
266 | 264 | return gist |
|
267 | 265 | |
|
268 | 266 | |
|
269 | 267 | def get_pull_request_or_error(pullrequestid): |
|
270 | 268 | """ |
|
271 | 269 | Get pull request by id or return JsonRPCError if not found |
|
272 | 270 | |
|
273 | 271 | :param pullrequestid: |
|
274 | 272 | """ |
|
275 | 273 | from rhodecode.model.pull_request import PullRequestModel |
|
276 | 274 | |
|
277 | 275 | try: |
|
278 | 276 | pull_request = PullRequestModel().get(int(pullrequestid)) |
|
279 | 277 | except ValueError: |
|
280 | 278 | raise JSONRPCError('pullrequestid must be an integer') |
|
281 | 279 | if not pull_request: |
|
282 | 280 | raise JSONRPCError('pull request `%s` does not exist' % ( |
|
283 | 281 | pullrequestid,)) |
|
284 | 282 | return pull_request |
|
285 | 283 | |
|
286 | 284 | |
|
287 | 285 | def build_commit_data(commit, detail_level): |
|
288 | 286 | parsed_diff = [] |
|
289 | 287 | if detail_level == 'extended': |
|
290 | 288 | for f in commit.added: |
|
291 | 289 | parsed_diff.append(_get_commit_dict(filename=f.path, op='A')) |
|
292 | 290 | for f in commit.changed: |
|
293 | 291 | parsed_diff.append(_get_commit_dict(filename=f.path, op='M')) |
|
294 | 292 | for f in commit.removed: |
|
295 | 293 | parsed_diff.append(_get_commit_dict(filename=f.path, op='D')) |
|
296 | 294 | |
|
297 | 295 | elif detail_level == 'full': |
|
298 | 296 | from rhodecode.lib.diffs import DiffProcessor |
|
299 | 297 | diff_processor = DiffProcessor(commit.diff()) |
|
300 | 298 | for dp in diff_processor.prepare(): |
|
301 | 299 | del dp['stats']['ops'] |
|
302 | 300 | _stats = dp['stats'] |
|
303 | 301 | parsed_diff.append(_get_commit_dict( |
|
304 | 302 | filename=dp['filename'], op=dp['operation'], |
|
305 | 303 | new_revision=dp['new_revision'], |
|
306 | 304 | old_revision=dp['old_revision'], |
|
307 | 305 | raw_diff=dp['raw_diff'], stats=_stats)) |
|
308 | 306 | |
|
309 | 307 | return parsed_diff |
|
310 | 308 | |
|
311 | 309 | |
|
312 | 310 | def get_commit_or_error(ref, repo): |
|
313 | 311 | try: |
|
314 | 312 | ref_type, _, ref_hash = ref.split(':') |
|
315 | 313 | except ValueError: |
|
316 | 314 | raise JSONRPCError( |
|
317 | 315 | 'Ref `{ref}` given in a wrong format. Please check the API' |
|
318 | 316 | ' documentation for more details'.format(ref=ref)) |
|
319 | 317 | try: |
|
320 | 318 | # TODO: dan: refactor this to use repo.scm_instance().get_commit() |
|
321 | 319 | # once get_commit supports ref_types |
|
322 | 320 | return get_commit_from_ref_name(repo, ref_hash) |
|
323 | 321 | except RepositoryError: |
|
324 | 322 | raise JSONRPCError('Ref `{ref}` does not exist'.format(ref=ref)) |
|
325 | 323 | |
|
326 | 324 | |
|
327 | 325 | def resolve_ref_or_error(ref, repo): |
|
328 | 326 | def _parse_ref(type_, name, hash_=None): |
|
329 | 327 | return type_, name, hash_ |
|
330 | 328 | |
|
331 | 329 | try: |
|
332 | 330 | ref_type, ref_name, ref_hash = _parse_ref(*ref.split(':')) |
|
333 | 331 | except TypeError: |
|
334 | 332 | raise JSONRPCError( |
|
335 | 333 | 'Ref `{ref}` given in a wrong format. Please check the API' |
|
336 | 334 | ' documentation for more details'.format(ref=ref)) |
|
337 | 335 | |
|
338 | 336 | try: |
|
339 | 337 | ref_hash = ref_hash or _get_ref_hash(repo, ref_type, ref_name) |
|
340 | 338 | except (KeyError, ValueError): |
|
341 | 339 | raise JSONRPCError( |
|
342 | 340 | 'The specified {type} `{name}` does not exist'.format( |
|
343 | 341 | type=ref_type, name=ref_name)) |
|
344 | 342 | |
|
345 | 343 | return ':'.join([ref_type, ref_name, ref_hash]) |
|
346 | 344 | |
|
347 | 345 | |
|
348 | 346 | def _get_commit_dict( |
|
349 | 347 | filename, op, new_revision=None, old_revision=None, |
|
350 | 348 | raw_diff=None, stats=None): |
|
351 | 349 | if stats is None: |
|
352 | 350 | stats = { |
|
353 | 351 | "added": None, |
|
354 | 352 | "binary": None, |
|
355 | 353 | "deleted": None |
|
356 | 354 | } |
|
357 | 355 | return { |
|
358 | 356 | "filename": safe_unicode(filename), |
|
359 | 357 | "op": op, |
|
360 | 358 | |
|
361 | 359 | # extra details |
|
362 | 360 | "new_revision": new_revision, |
|
363 | 361 | "old_revision": old_revision, |
|
364 | 362 | |
|
365 | 363 | "raw_diff": raw_diff, |
|
366 | 364 | "stats": stats |
|
367 | 365 | } |
|
368 | 366 | |
|
369 | 367 | |
|
370 | 368 | # TODO: mikhail: Think about moving this function to some library |
|
371 | 369 | def _get_ref_hash(repo, type_, name): |
|
372 | 370 | vcs_repo = repo.scm_instance() |
|
373 | 371 | if type_ == 'branch' and vcs_repo.alias in ('hg', 'git'): |
|
374 | 372 | return vcs_repo.branches[name] |
|
375 | 373 | elif type_ == 'bookmark' and vcs_repo.alias == 'hg': |
|
376 | 374 | return vcs_repo.bookmarks[name] |
|
377 | 375 | else: |
|
378 | 376 | raise ValueError() |
|
1 | NO CONTENT: file renamed from rhodecode/api/views/depracated_api.py to rhodecode/api/views/deprecated_api.py |
@@ -1,226 +1,255 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2011-2016 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | import logging |
|
23 | 23 | import time |
|
24 | 24 | |
|
25 | 25 | from rhodecode.api import jsonrpc_method, JSONRPCError |
|
26 | from rhodecode.api.exc import JSONRPCValidationError | |
|
26 | 27 | from rhodecode.api.utils import ( |
|
27 | 28 | Optional, OAttr, get_gist_or_error, get_user_or_error, |
|
28 | 29 | has_superadmin_permission) |
|
29 | 30 | from rhodecode.model.db import Session, or_ |
|
30 | 31 | from rhodecode.model.gist import Gist, GistModel |
|
31 | 32 | |
|
32 | 33 | log = logging.getLogger(__name__) |
|
33 | 34 | |
|
34 | 35 | |
|
35 | 36 | @jsonrpc_method() |
|
36 | 37 | def get_gist(request, apiuser, gistid, content=Optional(False)): |
|
37 | 38 | """ |
|
38 | 39 | Get the specified gist, based on the gist ID. |
|
39 | 40 | |
|
40 | 41 | :param apiuser: This is filled automatically from the |authtoken|. |
|
41 | 42 | :type apiuser: AuthUser |
|
42 | 43 | :param gistid: Set the id of the private or public gist |
|
43 | 44 | :type gistid: str |
|
44 | 45 | :param content: Return the gist content. Default is false. |
|
45 | 46 | :type content: Optional(bool) |
|
46 | 47 | """ |
|
47 | 48 | |
|
48 | 49 | gist = get_gist_or_error(gistid) |
|
49 | 50 | content = Optional.extract(content) |
|
50 | 51 | if not has_superadmin_permission(apiuser): |
|
51 | 52 | if gist.gist_owner != apiuser.user_id: |
|
52 | 53 | raise JSONRPCError('gist `%s` does not exist' % (gistid,)) |
|
53 | 54 | data = gist.get_api_data() |
|
54 | 55 | if content: |
|
55 | 56 | from rhodecode.model.gist import GistModel |
|
56 | 57 | rev, gist_files = GistModel().get_gist_files(gistid) |
|
57 | 58 | data['content'] = dict([(x.path, x.content) for x in gist_files]) |
|
58 | 59 | return data |
|
59 | 60 | |
|
60 | 61 | |
|
61 | 62 | @jsonrpc_method() |
|
62 | 63 | def get_gists(request, apiuser, userid=Optional(OAttr('apiuser'))): |
|
63 | 64 | """ |
|
64 | 65 | Get all gists for given user. If userid is empty returned gists |
|
65 | 66 | are for user who called the api |
|
66 | 67 | |
|
67 | 68 | :param apiuser: This is filled automatically from the |authtoken|. |
|
68 | 69 | :type apiuser: AuthUser |
|
69 | 70 | :param userid: user to get gists for |
|
70 | 71 | :type userid: Optional(str or int) |
|
71 | 72 | """ |
|
72 | 73 | |
|
73 | 74 | if not has_superadmin_permission(apiuser): |
|
74 | 75 | # make sure normal user does not pass someone else userid, |
|
75 | 76 | # he is not allowed to do that |
|
76 | 77 | if not isinstance(userid, Optional) and userid != apiuser.user_id: |
|
77 | 78 | raise JSONRPCError( |
|
78 | 79 | 'userid is not the same as your user' |
|
79 | 80 | ) |
|
80 | 81 | |
|
81 | 82 | if isinstance(userid, Optional): |
|
82 | 83 | user_id = apiuser.user_id |
|
83 | 84 | else: |
|
84 | 85 | user_id = get_user_or_error(userid).user_id |
|
85 | 86 | |
|
86 | 87 | gists = [] |
|
87 | 88 | _gists = Gist().query() \ |
|
88 | 89 | .filter(or_( |
|
89 | 90 | Gist.gist_expires == -1, Gist.gist_expires >= time.time())) \ |
|
90 | 91 | .filter(Gist.gist_owner == user_id) \ |
|
91 | 92 | .order_by(Gist.created_on.desc()) |
|
92 | 93 | for gist in _gists: |
|
93 | 94 | gists.append(gist.get_api_data()) |
|
94 | 95 | return gists |
|
95 | 96 | |
|
96 | 97 | |
|
97 | 98 | @jsonrpc_method() |
|
98 | 99 | def create_gist( |
|
99 |
request, apiuser, files, |
|
|
100 | request, apiuser, files, gistid=Optional(None), | |
|
101 | owner=Optional(OAttr('apiuser')), | |
|
100 | 102 | gist_type=Optional(Gist.GIST_PUBLIC), lifetime=Optional(-1), |
|
101 | 103 | acl_level=Optional(Gist.ACL_LEVEL_PUBLIC), |
|
102 | 104 | description=Optional('')): |
|
103 | 105 | """ |
|
104 | 106 | Creates a new Gist. |
|
105 | 107 | |
|
106 | 108 | :param apiuser: This is filled automatically from the |authtoken|. |
|
107 | 109 | :type apiuser: AuthUser |
|
108 | 110 | :param files: files to be added to the gist. The data structure has |
|
109 | 111 | to match the following example:: |
|
110 | 112 | |
|
111 |
{'filename': {'content':'...' |
|
|
112 | 'filename2': {'content':'...', 'lexer': null}} | |
|
113 | {'filename1': {'content':'...'}, 'filename2': {'content':'...'}} | |
|
113 | 114 | |
|
114 | 115 | :type files: dict |
|
116 | :param gistid: Set a custom id for the gist | |
|
117 | :type gistid: Optional(str) | |
|
115 | 118 | :param owner: Set the gist owner, defaults to api method caller |
|
116 | 119 | :type owner: Optional(str or int) |
|
117 | 120 | :param gist_type: type of gist ``public`` or ``private`` |
|
118 | 121 | :type gist_type: Optional(str) |
|
119 | 122 | :param lifetime: time in minutes of gist lifetime |
|
120 | 123 | :type lifetime: Optional(int) |
|
121 | 124 | :param acl_level: acl level for this gist, can be |
|
122 | 125 | ``acl_public`` or ``acl_private`` If the value is set to |
|
123 | 126 | ``acl_private`` only logged in users are able to access this gist. |
|
124 | 127 | If not set it defaults to ``acl_public``. |
|
125 | 128 | :type acl_level: Optional(str) |
|
126 | 129 | :param description: gist description |
|
127 | 130 | :type description: Optional(str) |
|
128 | 131 | |
|
129 | 132 | Example output: |
|
130 | 133 | |
|
131 | 134 | .. code-block:: bash |
|
132 | 135 | |
|
133 | 136 | id : <id_given_in_input> |
|
134 | 137 | result : { |
|
135 | 138 | "msg": "created new gist", |
|
136 | 139 | "gist": {} |
|
137 | 140 | } |
|
138 | 141 | error : null |
|
139 | 142 | |
|
140 | 143 | Example error output: |
|
141 | 144 | |
|
142 | 145 | .. code-block:: bash |
|
143 | 146 | |
|
144 | 147 | id : <id_given_in_input> |
|
145 | 148 | result : null |
|
146 | 149 | error : { |
|
147 | 150 | "failed to create gist" |
|
148 | 151 | } |
|
149 | 152 | |
|
150 | 153 | """ |
|
154 | from rhodecode.model import validation_schema | |
|
155 | from rhodecode.model.validation_schema.schemas import gist_schema | |
|
156 | ||
|
157 | if isinstance(owner, Optional): | |
|
158 | owner = apiuser.user_id | |
|
159 | ||
|
160 | owner = get_user_or_error(owner) | |
|
161 | ||
|
162 | lifetime = Optional.extract(lifetime) | |
|
163 | schema = gist_schema.GistSchema().bind( | |
|
164 | # bind the given values if it's allowed, however the deferred | |
|
165 | # validator will still validate it according to other rules | |
|
166 | lifetime_options=[lifetime]) | |
|
151 | 167 | |
|
152 | 168 | try: |
|
153 | if isinstance(owner, Optional): | |
|
154 | owner = apiuser.user_id | |
|
169 | nodes = gist_schema.nodes_to_sequence( | |
|
170 | files, colander_node=schema.get('nodes')) | |
|
171 | ||
|
172 | schema_data = schema.deserialize(dict( | |
|
173 | gistid=Optional.extract(gistid), | |
|
174 | description=Optional.extract(description), | |
|
175 | gist_type=Optional.extract(gist_type), | |
|
176 | lifetime=lifetime, | |
|
177 | gist_acl_level=Optional.extract(acl_level), | |
|
178 | nodes=nodes | |
|
179 | )) | |
|
155 | 180 | |
|
156 | owner = get_user_or_error(owner) | |
|
157 | description = Optional.extract(description) | |
|
158 | gist_type = Optional.extract(gist_type) | |
|
159 | lifetime = Optional.extract(lifetime) | |
|
160 | acl_level = Optional.extract(acl_level) | |
|
181 | # convert to safer format with just KEYs so we sure no duplicates | |
|
182 | schema_data['nodes'] = gist_schema.sequence_to_nodes( | |
|
183 | schema_data['nodes'], colander_node=schema.get('nodes')) | |
|
184 | ||
|
185 | except validation_schema.Invalid as err: | |
|
186 | raise JSONRPCValidationError(colander_exc=err) | |
|
161 | 187 | |
|
162 | gist = GistModel().create(description=description, | |
|
163 | owner=owner, | |
|
164 | gist_mapping=files, | |
|
165 | gist_type=gist_type, | |
|
166 | lifetime=lifetime, | |
|
167 | gist_acl_level=acl_level) | |
|
188 | try: | |
|
189 | gist = GistModel().create( | |
|
190 | owner=owner, | |
|
191 | gist_id=schema_data['gistid'], | |
|
192 | description=schema_data['description'], | |
|
193 | gist_mapping=schema_data['nodes'], | |
|
194 | gist_type=schema_data['gist_type'], | |
|
195 | lifetime=schema_data['lifetime'], | |
|
196 | gist_acl_level=schema_data['gist_acl_level']) | |
|
168 | 197 | Session().commit() |
|
169 | 198 | return { |
|
170 | 199 | 'msg': 'created new gist', |
|
171 | 200 | 'gist': gist.get_api_data() |
|
172 | 201 | } |
|
173 | 202 | except Exception: |
|
174 | 203 | log.exception('Error occurred during creation of gist') |
|
175 | 204 | raise JSONRPCError('failed to create gist') |
|
176 | 205 | |
|
177 | 206 | |
|
178 | 207 | @jsonrpc_method() |
|
179 | 208 | def delete_gist(request, apiuser, gistid): |
|
180 | 209 | """ |
|
181 | 210 | Deletes existing gist |
|
182 | 211 | |
|
183 | 212 | :param apiuser: filled automatically from apikey |
|
184 | 213 | :type apiuser: AuthUser |
|
185 | 214 | :param gistid: id of gist to delete |
|
186 | 215 | :type gistid: str |
|
187 | 216 | |
|
188 | 217 | Example output: |
|
189 | 218 | |
|
190 | 219 | .. code-block:: bash |
|
191 | 220 | |
|
192 | 221 | id : <id_given_in_input> |
|
193 | 222 | result : { |
|
194 | 223 | "deleted gist ID: <gist_id>", |
|
195 | 224 | "gist": null |
|
196 | 225 | } |
|
197 | 226 | error : null |
|
198 | 227 | |
|
199 | 228 | Example error output: |
|
200 | 229 | |
|
201 | 230 | .. code-block:: bash |
|
202 | 231 | |
|
203 | 232 | id : <id_given_in_input> |
|
204 | 233 | result : null |
|
205 | 234 | error : { |
|
206 | 235 | "failed to delete gist ID:<gist_id>" |
|
207 | 236 | } |
|
208 | 237 | |
|
209 | 238 | """ |
|
210 | 239 | |
|
211 | 240 | gist = get_gist_or_error(gistid) |
|
212 | 241 | if not has_superadmin_permission(apiuser): |
|
213 | 242 | if gist.gist_owner != apiuser.user_id: |
|
214 | 243 | raise JSONRPCError('gist `%s` does not exist' % (gistid,)) |
|
215 | 244 | |
|
216 | 245 | try: |
|
217 | 246 | GistModel().delete(gist) |
|
218 | 247 | Session().commit() |
|
219 | 248 | return { |
|
220 | 249 | 'msg': 'deleted gist ID:%s' % (gist.gist_access_id,), |
|
221 | 250 | 'gist': None |
|
222 | 251 | } |
|
223 | 252 | except Exception: |
|
224 | 253 | log.exception('Error occured during gist deletion') |
|
225 | 254 | raise JSONRPCError('failed to delete gist ID:%s' |
|
226 | 255 | % (gist.gist_access_id,)) No newline at end of file |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file renamed from rhodecode/interfaces.py to rhodecode/events/interfaces.py |
|
1 | NO CONTENT: file renamed from rhodecode/events.py to rhodecode/events/user.py | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file copied from rhodecode/templates/admin/my_account/my_account_emails.html to rhodecode/templates/admin/my_account/my_account_notifications.html | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file renamed from rhodecode/tests/functional/test_changeset_comments.py to rhodecode/tests/functional/test_commit_comments.py | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file renamed from rhodecode/tests/models/test_validation_schema.py to rhodecode/tests/models/schemas/test_schema_types.py | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: modified file | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
|
1 | NO CONTENT: file was removed | |
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now