##// END OF EJS Templates
release: merge back stable branch into default
marcink -
r1253:204c7847 merge default
parent child Browse files
Show More
@@ -0,0 +1,46 b''
1 |RCE| 4.5.2 |RNS|
2 -----------------
3
4 Release Date
5 ^^^^^^^^^^^^
6
7 - 2016-12-19
8
9
10 New Features
11 ^^^^^^^^^^^^
12
13
14
15 General
16 ^^^^^^^
17
18 - Github authentication: no longer require repository permissions when
19 connecting RhodeCode account with Github login.
20 - Api: added new function get_repo_refs. This was accidentally exposed in our
21 documentation as valid function, but wasn't implemented. This function is now
22 backported from next major release due the documentation issues.
23
24
25 Security
26 ^^^^^^^^
27
28
29
30 Performance
31 ^^^^^^^^^^^
32
33
34
35 Fixes
36 ^^^^^
37
38 - Api: Fixed a regression in API validation on create_* functions.
39 Before this fix it always converted given data to lowercase.
40 - System info: fixed reporting of free inodes as taken.
41
42
43 Upgrade notes
44 ^^^^^^^^^^^^^
45
46
@@ -1,14 +1,15 b''
1 1bd3e92b7e2e2d2024152b34bb88dff1db544a71 v4.0.0
1 1bd3e92b7e2e2d2024152b34bb88dff1db544a71 v4.0.0
2 170c5398320ea6cddd50955e88d408794c21d43a v4.0.1
2 170c5398320ea6cddd50955e88d408794c21d43a v4.0.1
3 c3fe200198f5aa34cf2e4066df2881a9cefe3704 v4.1.0
3 c3fe200198f5aa34cf2e4066df2881a9cefe3704 v4.1.0
4 7fd5c850745e2ea821fb4406af5f4bff9b0a7526 v4.1.1
4 7fd5c850745e2ea821fb4406af5f4bff9b0a7526 v4.1.1
5 41c87da28a179953df86061d817bc35533c66dd2 v4.1.2
5 41c87da28a179953df86061d817bc35533c66dd2 v4.1.2
6 baaf9f5bcea3bae0ef12ae20c8b270482e62abb6 v4.2.0
6 baaf9f5bcea3bae0ef12ae20c8b270482e62abb6 v4.2.0
7 32a70c7e56844a825f61df496ee5eaf8c3c4e189 v4.2.1
7 32a70c7e56844a825f61df496ee5eaf8c3c4e189 v4.2.1
8 fa695cdb411d294679ac081d595ac654e5613b03 v4.3.0
8 fa695cdb411d294679ac081d595ac654e5613b03 v4.3.0
9 0e4dc11b58cad833c513fe17bac39e6850edf959 v4.3.1
9 0e4dc11b58cad833c513fe17bac39e6850edf959 v4.3.1
10 8a876f48f5cb1d018b837db28ff928500cb32cfb v4.4.0
10 8a876f48f5cb1d018b837db28ff928500cb32cfb v4.4.0
11 8dd86b410b1aac086ffdfc524ef300f896af5047 v4.4.1
11 8dd86b410b1aac086ffdfc524ef300f896af5047 v4.4.1
12 d2514226abc8d3b4f6fb57765f47d1b6fb360a05 v4.4.2
12 d2514226abc8d3b4f6fb57765f47d1b6fb360a05 v4.4.2
13 27d783325930af6dad2741476c0d0b1b7c8415c2 v4.5.0
13 27d783325930af6dad2741476c0d0b1b7c8415c2 v4.5.0
14 7f2016f352abcbdba4a19d4039c386e9629449da v4.5.1
14 7f2016f352abcbdba4a19d4039c386e9629449da v4.5.1
15 416fec799314c70a5c780fb28b3357b08869333a v4.5.2
@@ -1,976 +1,990 b''
1 .. _repo-methods-ref:
1 .. _repo-methods-ref:
2
2
3 repo methods
3 repo methods
4 ============
4 ============
5
5
6 add_field_to_repo
6 add_field_to_repo
7 -----------------
7 -----------------
8
8
9 .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>)
9 .. py:function:: add_field_to_repo(apiuser, repoid, key, label=<Optional:''>, description=<Optional:''>)
10
10
11 Adds an extra field to a repository.
11 Adds an extra field to a repository.
12
12
13 This command can only be run using an |authtoken| with at least
13 This command can only be run using an |authtoken| with at least
14 write permissions to the |repo|.
14 write permissions to the |repo|.
15
15
16 :param apiuser: This is filled automatically from the |authtoken|.
16 :param apiuser: This is filled automatically from the |authtoken|.
17 :type apiuser: AuthUser
17 :type apiuser: AuthUser
18 :param repoid: Set the repository name or repository id.
18 :param repoid: Set the repository name or repository id.
19 :type repoid: str or int
19 :type repoid: str or int
20 :param key: Create a unique field key for this repository.
20 :param key: Create a unique field key for this repository.
21 :type key: str
21 :type key: str
22 :param label:
22 :param label:
23 :type label: Optional(str)
23 :type label: Optional(str)
24 :param description:
24 :param description:
25 :type description: Optional(str)
25 :type description: Optional(str)
26
26
27
27
28 comment_commit
28 comment_commit
29 --------------
29 --------------
30
30
31 .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
31 .. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
32
32
33 Set a commit comment, and optionally change the status of the commit.
33 Set a commit comment, and optionally change the status of the commit.
34
34
35 :param apiuser: This is filled automatically from the |authtoken|.
35 :param apiuser: This is filled automatically from the |authtoken|.
36 :type apiuser: AuthUser
36 :type apiuser: AuthUser
37 :param repoid: Set the repository name or repository ID.
37 :param repoid: Set the repository name or repository ID.
38 :type repoid: str or int
38 :type repoid: str or int
39 :param commit_id: Specify the commit_id for which to set a comment.
39 :param commit_id: Specify the commit_id for which to set a comment.
40 :type commit_id: str
40 :type commit_id: str
41 :param message: The comment text.
41 :param message: The comment text.
42 :type message: str
42 :type message: str
43 :param userid: Set the user name of the comment creator.
43 :param userid: Set the user name of the comment creator.
44 :type userid: Optional(str or int)
44 :type userid: Optional(str or int)
45 :param status: status, one of 'not_reviewed', 'approved', 'rejected',
45 :param status: status, one of 'not_reviewed', 'approved', 'rejected',
46 'under_review'
46 'under_review'
47 :type status: str
47 :type status: str
48
48
49 Example error output:
49 Example error output:
50
50
51 .. code-block:: json
51 .. code-block:: json
52
52
53 {
53 {
54 "id" : <id_given_in_input>,
54 "id" : <id_given_in_input>,
55 "result" : {
55 "result" : {
56 "msg": "Commented on commit `<commit_id>` for repository `<repoid>`",
56 "msg": "Commented on commit `<commit_id>` for repository `<repoid>`",
57 "status_change": null or <status>,
57 "status_change": null or <status>,
58 "success": true
58 "success": true
59 },
59 },
60 "error" : null
60 "error" : null
61 }
61 }
62
62
63
63
64 create_repo
64 create_repo
65 -----------
65 -----------
66
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>)
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
68
69 Creates a repository.
69 Creates a repository.
70
70
71 * If the repository name contains "/", repository will be created inside
71 * If the repository name contains "/", repository will be created inside
72 a repository group or nested repository groups
72 a repository group or nested repository groups
73
73
74 For example "foo/bar/repo1" will create |repo| called "repo1" inside
74 For example "foo/bar/repo1" will create |repo| called "repo1" inside
75 group "foo/bar". You have to have permissions to access and write to
75 group "foo/bar". You have to have permissions to access and write to
76 the last repository group ("bar" in this example)
76 the last repository group ("bar" in this example)
77
77
78 This command can only be run using an |authtoken| with at least
78 This command can only be run using an |authtoken| with at least
79 permissions to create repositories, or write permissions to
79 permissions to create repositories, or write permissions to
80 parent repository groups.
80 parent repository groups.
81
81
82 :param apiuser: This is filled automatically from the |authtoken|.
82 :param apiuser: This is filled automatically from the |authtoken|.
83 :type apiuser: AuthUser
83 :type apiuser: AuthUser
84 :param repo_name: Set the repository name.
84 :param repo_name: Set the repository name.
85 :type repo_name: str
85 :type repo_name: str
86 :param repo_type: Set the repository type; 'hg','git', or 'svn'.
86 :param repo_type: Set the repository type; 'hg','git', or 'svn'.
87 :type repo_type: str
87 :type repo_type: str
88 :param owner: user_id or username
88 :param owner: user_id or username
89 :type owner: Optional(str)
89 :type owner: Optional(str)
90 :param description: Set the repository description.
90 :param description: Set the repository description.
91 :type description: Optional(str)
91 :type description: Optional(str)
92 :param private: set repository as private
92 :param private: set repository as private
93 :type private: bool
93 :type private: bool
94 :param clone_uri: set clone_uri
94 :param clone_uri: set clone_uri
95 :type clone_uri: str
95 :type clone_uri: str
96 :param landing_rev: <rev_type>:<rev>
96 :param landing_rev: <rev_type>:<rev>
97 :type landing_rev: str
97 :type landing_rev: str
98 :param enable_locking:
98 :param enable_locking:
99 :type enable_locking: bool
99 :type enable_locking: bool
100 :param enable_downloads:
100 :param enable_downloads:
101 :type enable_downloads: bool
101 :type enable_downloads: bool
102 :param enable_statistics:
102 :param enable_statistics:
103 :type enable_statistics: bool
103 :type enable_statistics: bool
104 :param copy_permissions: Copy permission from group in which the
104 :param copy_permissions: Copy permission from group in which the
105 repository is being created.
105 repository is being created.
106 :type copy_permissions: bool
106 :type copy_permissions: bool
107
107
108
108
109 Example output:
109 Example output:
110
110
111 .. code-block:: bash
111 .. code-block:: bash
112
112
113 id : <id_given_in_input>
113 id : <id_given_in_input>
114 result: {
114 result: {
115 "msg": "Created new repository `<reponame>`",
115 "msg": "Created new repository `<reponame>`",
116 "success": true,
116 "success": true,
117 "task": "<celery task id or None if done sync>"
117 "task": "<celery task id or None if done sync>"
118 }
118 }
119 error: null
119 error: null
120
120
121
121
122 Example error output:
122 Example error output:
123
123
124 .. code-block:: bash
124 .. code-block:: bash
125
125
126 id : <id_given_in_input>
126 id : <id_given_in_input>
127 result : null
127 result : null
128 error : {
128 error : {
129 'failed to create repository `<repo_name>`'
129 'failed to create repository `<repo_name>`'
130 }
130 }
131
131
132
132
133 delete_repo
133 delete_repo
134 -----------
134 -----------
135
135
136 .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>)
136 .. py:function:: delete_repo(apiuser, repoid, forks=<Optional:''>)
137
137
138 Deletes a repository.
138 Deletes a repository.
139
139
140 * When the `forks` parameter is set it's possible to detach or delete
140 * When the `forks` parameter is set it's possible to detach or delete
141 forks of deleted repository.
141 forks of deleted repository.
142
142
143 This command can only be run using an |authtoken| with admin
143 This command can only be run using an |authtoken| with admin
144 permissions on the |repo|.
144 permissions on the |repo|.
145
145
146 :param apiuser: This is filled automatically from the |authtoken|.
146 :param apiuser: This is filled automatically from the |authtoken|.
147 :type apiuser: AuthUser
147 :type apiuser: AuthUser
148 :param repoid: Set the repository name or repository ID.
148 :param repoid: Set the repository name or repository ID.
149 :type repoid: str or int
149 :type repoid: str or int
150 :param forks: Set to `detach` or `delete` forks from the |repo|.
150 :param forks: Set to `detach` or `delete` forks from the |repo|.
151 :type forks: Optional(str)
151 :type forks: Optional(str)
152
152
153 Example error output:
153 Example error output:
154
154
155 .. code-block:: bash
155 .. code-block:: bash
156
156
157 id : <id_given_in_input>
157 id : <id_given_in_input>
158 result: {
158 result: {
159 "msg": "Deleted repository `<reponame>`",
159 "msg": "Deleted repository `<reponame>`",
160 "success": true
160 "success": true
161 }
161 }
162 error: null
162 error: null
163
163
164
164
165 fork_repo
165 fork_repo
166 ---------
166 ---------
167
167
168 .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, copy_permissions=<Optional:False>)
168 .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, copy_permissions=<Optional:False>)
169
169
170 Creates a fork of the specified |repo|.
170 Creates a fork of the specified |repo|.
171
171
172 * If the fork_name contains "/", fork will be created inside
172 * If the fork_name contains "/", fork will be created inside
173 a repository group or nested repository groups
173 a repository group or nested repository groups
174
174
175 For example "foo/bar/fork-repo" will create fork called "fork-repo"
175 For example "foo/bar/fork-repo" will create fork called "fork-repo"
176 inside group "foo/bar". You have to have permissions to access and
176 inside group "foo/bar". You have to have permissions to access and
177 write to the last repository group ("bar" in this example)
177 write to the last repository group ("bar" in this example)
178
178
179 This command can only be run using an |authtoken| with minimum
179 This command can only be run using an |authtoken| with minimum
180 read permissions of the forked repo, create fork permissions for an user.
180 read permissions of the forked repo, create fork permissions for an user.
181
181
182 :param apiuser: This is filled automatically from the |authtoken|.
182 :param apiuser: This is filled automatically from the |authtoken|.
183 :type apiuser: AuthUser
183 :type apiuser: AuthUser
184 :param repoid: Set repository name or repository ID.
184 :param repoid: Set repository name or repository ID.
185 :type repoid: str or int
185 :type repoid: str or int
186 :param fork_name: Set the fork name, including it's repository group membership.
186 :param fork_name: Set the fork name, including it's repository group membership.
187 :type fork_name: str
187 :type fork_name: str
188 :param owner: Set the fork owner.
188 :param owner: Set the fork owner.
189 :type owner: str
189 :type owner: str
190 :param description: Set the fork description.
190 :param description: Set the fork description.
191 :type description: str
191 :type description: str
192 :param copy_permissions: Copy permissions from parent |repo|. The
192 :param copy_permissions: Copy permissions from parent |repo|. The
193 default is False.
193 default is False.
194 :type copy_permissions: bool
194 :type copy_permissions: bool
195 :param private: Make the fork private. The default is False.
195 :param private: Make the fork private. The default is False.
196 :type private: bool
196 :type private: bool
197 :param landing_rev: Set the landing revision. The default is tip.
197 :param landing_rev: Set the landing revision. The default is tip.
198
198
199 Example output:
199 Example output:
200
200
201 .. code-block:: bash
201 .. code-block:: bash
202
202
203 id : <id_for_response>
203 id : <id_for_response>
204 api_key : "<api_key>"
204 api_key : "<api_key>"
205 args: {
205 args: {
206 "repoid" : "<reponame or repo_id>",
206 "repoid" : "<reponame or repo_id>",
207 "fork_name": "<forkname>",
207 "fork_name": "<forkname>",
208 "owner": "<username or user_id = Optional(=apiuser)>",
208 "owner": "<username or user_id = Optional(=apiuser)>",
209 "description": "<description>",
209 "description": "<description>",
210 "copy_permissions": "<bool>",
210 "copy_permissions": "<bool>",
211 "private": "<bool>",
211 "private": "<bool>",
212 "landing_rev": "<landing_rev>"
212 "landing_rev": "<landing_rev>"
213 }
213 }
214
214
215 Example error output:
215 Example error output:
216
216
217 .. code-block:: bash
217 .. code-block:: bash
218
218
219 id : <id_given_in_input>
219 id : <id_given_in_input>
220 result: {
220 result: {
221 "msg": "Created fork of `<reponame>` as `<forkname>`",
221 "msg": "Created fork of `<reponame>` as `<forkname>`",
222 "success": true,
222 "success": true,
223 "task": "<celery task id or None if done sync>"
223 "task": "<celery task id or None if done sync>"
224 }
224 }
225 error: null
225 error: null
226
226
227
227
228 get_repo
228 get_repo
229 --------
229 --------
230
230
231 .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>)
231 .. py:function:: get_repo(apiuser, repoid, cache=<Optional:True>)
232
232
233 Gets an existing repository by its name or repository_id.
233 Gets an existing repository by its name or repository_id.
234
234
235 The members section so the output returns users groups or users
235 The members section so the output returns users groups or users
236 associated with that repository.
236 associated with that repository.
237
237
238 This command can only be run using an |authtoken| with admin rights,
238 This command can only be run using an |authtoken| with admin rights,
239 or users with at least read rights to the |repo|.
239 or users with at least read rights to the |repo|.
240
240
241 :param apiuser: This is filled automatically from the |authtoken|.
241 :param apiuser: This is filled automatically from the |authtoken|.
242 :type apiuser: AuthUser
242 :type apiuser: AuthUser
243 :param repoid: The repository name or repository id.
243 :param repoid: The repository name or repository id.
244 :type repoid: str or int
244 :type repoid: str or int
245 :param cache: use the cached value for last changeset
245 :param cache: use the cached value for last changeset
246 :type: cache: Optional(bool)
246 :type: cache: Optional(bool)
247
247
248 Example output:
248 Example output:
249
249
250 .. code-block:: bash
250 .. code-block:: bash
251
251
252 {
252 {
253 "error": null,
253 "error": null,
254 "id": <repo_id>,
254 "id": <repo_id>,
255 "result": {
255 "result": {
256 "clone_uri": null,
256 "clone_uri": null,
257 "created_on": "timestamp",
257 "created_on": "timestamp",
258 "description": "repo description",
258 "description": "repo description",
259 "enable_downloads": false,
259 "enable_downloads": false,
260 "enable_locking": false,
260 "enable_locking": false,
261 "enable_statistics": false,
261 "enable_statistics": false,
262 "followers": [
262 "followers": [
263 {
263 {
264 "active": true,
264 "active": true,
265 "admin": false,
265 "admin": false,
266 "api_key": "****************************************",
266 "api_key": "****************************************",
267 "api_keys": [
267 "api_keys": [
268 "****************************************"
268 "****************************************"
269 ],
269 ],
270 "email": "user@example.com",
270 "email": "user@example.com",
271 "emails": [
271 "emails": [
272 "user@example.com"
272 "user@example.com"
273 ],
273 ],
274 "extern_name": "rhodecode",
274 "extern_name": "rhodecode",
275 "extern_type": "rhodecode",
275 "extern_type": "rhodecode",
276 "firstname": "username",
276 "firstname": "username",
277 "ip_addresses": [],
277 "ip_addresses": [],
278 "language": null,
278 "language": null,
279 "last_login": "2015-09-16T17:16:35.854",
279 "last_login": "2015-09-16T17:16:35.854",
280 "lastname": "surname",
280 "lastname": "surname",
281 "user_id": <user_id>,
281 "user_id": <user_id>,
282 "username": "name"
282 "username": "name"
283 }
283 }
284 ],
284 ],
285 "fork_of": "parent-repo",
285 "fork_of": "parent-repo",
286 "landing_rev": [
286 "landing_rev": [
287 "rev",
287 "rev",
288 "tip"
288 "tip"
289 ],
289 ],
290 "last_changeset": {
290 "last_changeset": {
291 "author": "User <user@example.com>",
291 "author": "User <user@example.com>",
292 "branch": "default",
292 "branch": "default",
293 "date": "timestamp",
293 "date": "timestamp",
294 "message": "last commit message",
294 "message": "last commit message",
295 "parents": [
295 "parents": [
296 {
296 {
297 "raw_id": "commit-id"
297 "raw_id": "commit-id"
298 }
298 }
299 ],
299 ],
300 "raw_id": "commit-id",
300 "raw_id": "commit-id",
301 "revision": <revision number>,
301 "revision": <revision number>,
302 "short_id": "short id"
302 "short_id": "short id"
303 },
303 },
304 "lock_reason": null,
304 "lock_reason": null,
305 "locked_by": null,
305 "locked_by": null,
306 "locked_date": null,
306 "locked_date": null,
307 "members": [
307 "members": [
308 {
308 {
309 "name": "super-admin-name",
309 "name": "super-admin-name",
310 "origin": "super-admin",
310 "origin": "super-admin",
311 "permission": "repository.admin",
311 "permission": "repository.admin",
312 "type": "user"
312 "type": "user"
313 },
313 },
314 {
314 {
315 "name": "owner-name",
315 "name": "owner-name",
316 "origin": "owner",
316 "origin": "owner",
317 "permission": "repository.admin",
317 "permission": "repository.admin",
318 "type": "user"
318 "type": "user"
319 },
319 },
320 {
320 {
321 "name": "user-group-name",
321 "name": "user-group-name",
322 "origin": "permission",
322 "origin": "permission",
323 "permission": "repository.write",
323 "permission": "repository.write",
324 "type": "user_group"
324 "type": "user_group"
325 }
325 }
326 ],
326 ],
327 "owner": "owner-name",
327 "owner": "owner-name",
328 "permissions": [
328 "permissions": [
329 {
329 {
330 "name": "super-admin-name",
330 "name": "super-admin-name",
331 "origin": "super-admin",
331 "origin": "super-admin",
332 "permission": "repository.admin",
332 "permission": "repository.admin",
333 "type": "user"
333 "type": "user"
334 },
334 },
335 {
335 {
336 "name": "owner-name",
336 "name": "owner-name",
337 "origin": "owner",
337 "origin": "owner",
338 "permission": "repository.admin",
338 "permission": "repository.admin",
339 "type": "user"
339 "type": "user"
340 },
340 },
341 {
341 {
342 "name": "user-group-name",
342 "name": "user-group-name",
343 "origin": "permission",
343 "origin": "permission",
344 "permission": "repository.write",
344 "permission": "repository.write",
345 "type": "user_group"
345 "type": "user_group"
346 }
346 }
347 ],
347 ],
348 "private": true,
348 "private": true,
349 "repo_id": 676,
349 "repo_id": 676,
350 "repo_name": "user-group/repo-name",
350 "repo_name": "user-group/repo-name",
351 "repo_type": "hg"
351 "repo_type": "hg"
352 }
352 }
353 }
353 }
354
354
355
355
356 get_repo_changeset
356 get_repo_changeset
357 ------------------
357 ------------------
358
358
359 .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>)
359 .. py:function:: get_repo_changeset(apiuser, repoid, revision, details=<Optional:'basic'>)
360
360
361 Returns information about a changeset.
361 Returns information about a changeset.
362
362
363 Additionally parameters define the amount of details returned by
363 Additionally parameters define the amount of details returned by
364 this function.
364 this function.
365
365
366 This command can only be run using an |authtoken| with admin rights,
366 This command can only be run using an |authtoken| with admin rights,
367 or users with at least read rights to the |repo|.
367 or users with at least read rights to the |repo|.
368
368
369 :param apiuser: This is filled automatically from the |authtoken|.
369 :param apiuser: This is filled automatically from the |authtoken|.
370 :type apiuser: AuthUser
370 :type apiuser: AuthUser
371 :param repoid: The repository name or repository id
371 :param repoid: The repository name or repository id
372 :type repoid: str or int
372 :type repoid: str or int
373 :param revision: revision for which listing should be done
373 :param revision: revision for which listing should be done
374 :type revision: str
374 :type revision: str
375 :param details: details can be 'basic|extended|full' full gives diff
375 :param details: details can be 'basic|extended|full' full gives diff
376 info details like the diff itself, and number of changed files etc.
376 info details like the diff itself, and number of changed files etc.
377 :type details: Optional(str)
377 :type details: Optional(str)
378
378
379
379
380 get_repo_changesets
380 get_repo_changesets
381 -------------------
381 -------------------
382
382
383 .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>)
383 .. py:function:: get_repo_changesets(apiuser, repoid, start_rev, limit, details=<Optional:'basic'>)
384
384
385 Returns a set of commits limited by the number starting
385 Returns a set of commits limited by the number starting
386 from the `start_rev` option.
386 from the `start_rev` option.
387
387
388 Additional parameters define the amount of details returned by this
388 Additional parameters define the amount of details returned by this
389 function.
389 function.
390
390
391 This command can only be run using an |authtoken| with admin rights,
391 This command can only be run using an |authtoken| with admin rights,
392 or users with at least read rights to |repos|.
392 or users with at least read rights to |repos|.
393
393
394 :param apiuser: This is filled automatically from the |authtoken|.
394 :param apiuser: This is filled automatically from the |authtoken|.
395 :type apiuser: AuthUser
395 :type apiuser: AuthUser
396 :param repoid: The repository name or repository ID.
396 :param repoid: The repository name or repository ID.
397 :type repoid: str or int
397 :type repoid: str or int
398 :param start_rev: The starting revision from where to get changesets.
398 :param start_rev: The starting revision from where to get changesets.
399 :type start_rev: str
399 :type start_rev: str
400 :param limit: Limit the number of commits to this amount
400 :param limit: Limit the number of commits to this amount
401 :type limit: str or int
401 :type limit: str or int
402 :param details: Set the level of detail returned. Valid option are:
402 :param details: Set the level of detail returned. Valid option are:
403 ``basic``, ``extended`` and ``full``.
403 ``basic``, ``extended`` and ``full``.
404 :type details: Optional(str)
404 :type details: Optional(str)
405
405
406 .. note::
406 .. note::
407
407
408 Setting the parameter `details` to the value ``full`` is extensive
408 Setting the parameter `details` to the value ``full`` is extensive
409 and returns details like the diff itself, and the number
409 and returns details like the diff itself, and the number
410 of changed files.
410 of changed files.
411
411
412
412
413 get_repo_nodes
413 get_repo_nodes
414 --------------
414 --------------
415
415
416 .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>, max_file_bytes=<Optional:None>)
416 .. py:function:: get_repo_nodes(apiuser, repoid, revision, root_path, ret_type=<Optional:'all'>, details=<Optional:'basic'>, max_file_bytes=<Optional:None>)
417
417
418 Returns a list of nodes and children in a flat list for a given
418 Returns a list of nodes and children in a flat list for a given
419 path at given revision.
419 path at given revision.
420
420
421 It's possible to specify ret_type to show only `files` or `dirs`.
421 It's possible to specify ret_type to show only `files` or `dirs`.
422
422
423 This command can only be run using an |authtoken| with admin rights,
423 This command can only be run using an |authtoken| with admin rights,
424 or users with at least read rights to |repos|.
424 or users with at least read rights to |repos|.
425
425
426 :param apiuser: This is filled automatically from the |authtoken|.
426 :param apiuser: This is filled automatically from the |authtoken|.
427 :type apiuser: AuthUser
427 :type apiuser: AuthUser
428 :param repoid: The repository name or repository ID.
428 :param repoid: The repository name or repository ID.
429 :type repoid: str or int
429 :type repoid: str or int
430 :param revision: The revision for which listing should be done.
430 :param revision: The revision for which listing should be done.
431 :type revision: str
431 :type revision: str
432 :param root_path: The path from which to start displaying.
432 :param root_path: The path from which to start displaying.
433 :type root_path: str
433 :type root_path: str
434 :param ret_type: Set the return type. Valid options are
434 :param ret_type: Set the return type. Valid options are
435 ``all`` (default), ``files`` and ``dirs``.
435 ``all`` (default), ``files`` and ``dirs``.
436 :type ret_type: Optional(str)
436 :type ret_type: Optional(str)
437 :param details: Returns extended information about nodes, such as
437 :param details: Returns extended information about nodes, such as
438 md5, binary, and or content. The valid options are ``basic`` and
438 md5, binary, and or content. The valid options are ``basic`` and
439 ``full``.
439 ``full``.
440 :type details: Optional(str)
440 :type details: Optional(str)
441 :param max_file_bytes: Only return file content under this file size bytes
441 :param max_file_bytes: Only return file content under this file size bytes
442 :type details: Optional(int)
442 :type details: Optional(int)
443
443
444 Example output:
444 Example output:
445
445
446 .. code-block:: bash
446 .. code-block:: bash
447
447
448 id : <id_given_in_input>
448 id : <id_given_in_input>
449 result: [
449 result: [
450 {
450 {
451 "name" : "<name>"
451 "name" : "<name>"
452 "type" : "<type>",
452 "type" : "<type>",
453 "binary": "<true|false>" (only in extended mode)
453 "binary": "<true|false>" (only in extended mode)
454 "md5" : "<md5 of file content>" (only in extended mode)
454 "md5" : "<md5 of file content>" (only in extended mode)
455 },
455 },
456 ...
456 ...
457 ]
457 ]
458 error: null
458 error: null
459
459
460
460
461 get_repo_refs
461 get_repo_refs
462 -------------
462 -------------
463
463
464 .. py:function:: get_repo_refs(apiuser, repoid)
464 .. py:function:: get_repo_refs(apiuser, repoid)
465
465
466 Returns a dictionary of current references. It returns
466 Returns a dictionary of current references. It returns
467 bookmarks, branches, closed_branches, and tags for given repository
467 bookmarks, branches, closed_branches, and tags for given repository
468
468
469 It's possible to specify ret_type to show only `files` or `dirs`.
469 It's possible to specify ret_type to show only `files` or `dirs`.
470
470
471 This command can only be run using an |authtoken| with admin rights,
471 This command can only be run using an |authtoken| with admin rights,
472 or users with at least read rights to |repos|.
472 or users with at least read rights to |repos|.
473
473
474 :param apiuser: This is filled automatically from the |authtoken|.
474 :param apiuser: This is filled automatically from the |authtoken|.
475 :type apiuser: AuthUser
475 :type apiuser: AuthUser
476 :param repoid: The repository name or repository ID.
476 :param repoid: The repository name or repository ID.
477 :type repoid: str or int
477 :type repoid: str or int
478
478
479 Example output:
479 Example output:
480
480
481 .. code-block:: bash
481 .. code-block:: bash
482
482
483 id : <id_given_in_input>
483 id : <id_given_in_input>
484 result: [
484 "result": {
485 TODO...
485 "bookmarks": {
486 ]
486 "dev": "5611d30200f4040ba2ab4f3d64e5b06408a02188",
487 "master": "367f590445081d8ec8c2ea0456e73ae1f1c3d6cf"
488 },
489 "branches": {
490 "default": "5611d30200f4040ba2ab4f3d64e5b06408a02188",
491 "stable": "367f590445081d8ec8c2ea0456e73ae1f1c3d6cf"
492 },
493 "branches_closed": {},
494 "tags": {
495 "tip": "5611d30200f4040ba2ab4f3d64e5b06408a02188",
496 "v4.4.0": "1232313f9e6adac5ce5399c2a891dc1e72b79022",
497 "v4.4.1": "cbb9f1d329ae5768379cdec55a62ebdd546c4e27",
498 "v4.4.2": "24ffe44a27fcd1c5b6936144e176b9f6dd2f3a17",
499 }
500 }
487 error: null
501 error: null
488
502
489
503
490 get_repo_settings
504 get_repo_settings
491 -----------------
505 -----------------
492
506
493 .. py:function:: get_repo_settings(apiuser, repoid, key=<Optional:None>)
507 .. py:function:: get_repo_settings(apiuser, repoid, key=<Optional:None>)
494
508
495 Returns all settings for a repository. If key is given it only returns the
509 Returns all settings for a repository. If key is given it only returns the
496 setting identified by the key or null.
510 setting identified by the key or null.
497
511
498 :param apiuser: This is filled automatically from the |authtoken|.
512 :param apiuser: This is filled automatically from the |authtoken|.
499 :type apiuser: AuthUser
513 :type apiuser: AuthUser
500 :param repoid: The repository name or repository id.
514 :param repoid: The repository name or repository id.
501 :type repoid: str or int
515 :type repoid: str or int
502 :param key: Key of the setting to return.
516 :param key: Key of the setting to return.
503 :type: key: Optional(str)
517 :type: key: Optional(str)
504
518
505 Example output:
519 Example output:
506
520
507 .. code-block:: bash
521 .. code-block:: bash
508
522
509 {
523 {
510 "error": null,
524 "error": null,
511 "id": 237,
525 "id": 237,
512 "result": {
526 "result": {
513 "extensions_largefiles": true,
527 "extensions_largefiles": true,
514 "hooks_changegroup_push_logger": true,
528 "hooks_changegroup_push_logger": true,
515 "hooks_changegroup_repo_size": false,
529 "hooks_changegroup_repo_size": false,
516 "hooks_outgoing_pull_logger": true,
530 "hooks_outgoing_pull_logger": true,
517 "phases_publish": "True",
531 "phases_publish": "True",
518 "rhodecode_hg_use_rebase_for_merging": true,
532 "rhodecode_hg_use_rebase_for_merging": true,
519 "rhodecode_pr_merge_enabled": true,
533 "rhodecode_pr_merge_enabled": true,
520 "rhodecode_use_outdated_comments": true
534 "rhodecode_use_outdated_comments": true
521 }
535 }
522 }
536 }
523
537
524
538
525 get_repos
539 get_repos
526 ---------
540 ---------
527
541
528 .. py:function:: get_repos(apiuser)
542 .. py:function:: get_repos(apiuser)
529
543
530 Lists all existing repositories.
544 Lists all existing repositories.
531
545
532 This command can only be run using an |authtoken| with admin rights,
546 This command can only be run using an |authtoken| with admin rights,
533 or users with at least read rights to |repos|.
547 or users with at least read rights to |repos|.
534
548
535 :param apiuser: This is filled automatically from the |authtoken|.
549 :param apiuser: This is filled automatically from the |authtoken|.
536 :type apiuser: AuthUser
550 :type apiuser: AuthUser
537
551
538 Example output:
552 Example output:
539
553
540 .. code-block:: bash
554 .. code-block:: bash
541
555
542 id : <id_given_in_input>
556 id : <id_given_in_input>
543 result: [
557 result: [
544 {
558 {
545 "repo_id" : "<repo_id>",
559 "repo_id" : "<repo_id>",
546 "repo_name" : "<reponame>"
560 "repo_name" : "<reponame>"
547 "repo_type" : "<repo_type>",
561 "repo_type" : "<repo_type>",
548 "clone_uri" : "<clone_uri>",
562 "clone_uri" : "<clone_uri>",
549 "private": : "<bool>",
563 "private": : "<bool>",
550 "created_on" : "<datetimecreated>",
564 "created_on" : "<datetimecreated>",
551 "description" : "<description>",
565 "description" : "<description>",
552 "landing_rev": "<landing_rev>",
566 "landing_rev": "<landing_rev>",
553 "owner": "<repo_owner>",
567 "owner": "<repo_owner>",
554 "fork_of": "<name_of_fork_parent>",
568 "fork_of": "<name_of_fork_parent>",
555 "enable_downloads": "<bool>",
569 "enable_downloads": "<bool>",
556 "enable_locking": "<bool>",
570 "enable_locking": "<bool>",
557 "enable_statistics": "<bool>",
571 "enable_statistics": "<bool>",
558 },
572 },
559 ...
573 ...
560 ]
574 ]
561 error: null
575 error: null
562
576
563
577
564 grant_user_group_permission
578 grant_user_group_permission
565 ---------------------------
579 ---------------------------
566
580
567 .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm)
581 .. py:function:: grant_user_group_permission(apiuser, repoid, usergroupid, perm)
568
582
569 Grant permission for a user group on the specified repository,
583 Grant permission for a user group on the specified repository,
570 or update existing permissions.
584 or update existing permissions.
571
585
572 This command can only be run using an |authtoken| with admin
586 This command can only be run using an |authtoken| with admin
573 permissions on the |repo|.
587 permissions on the |repo|.
574
588
575 :param apiuser: This is filled automatically from the |authtoken|.
589 :param apiuser: This is filled automatically from the |authtoken|.
576 :type apiuser: AuthUser
590 :type apiuser: AuthUser
577 :param repoid: Set the repository name or repository ID.
591 :param repoid: Set the repository name or repository ID.
578 :type repoid: str or int
592 :type repoid: str or int
579 :param usergroupid: Specify the ID of the user group.
593 :param usergroupid: Specify the ID of the user group.
580 :type usergroupid: str or int
594 :type usergroupid: str or int
581 :param perm: Set the user group permissions using the following
595 :param perm: Set the user group permissions using the following
582 format: (repository.(none|read|write|admin))
596 format: (repository.(none|read|write|admin))
583 :type perm: str
597 :type perm: str
584
598
585 Example output:
599 Example output:
586
600
587 .. code-block:: bash
601 .. code-block:: bash
588
602
589 id : <id_given_in_input>
603 id : <id_given_in_input>
590 result : {
604 result : {
591 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
605 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
592 "success": true
606 "success": true
593
607
594 }
608 }
595 error : null
609 error : null
596
610
597 Example error output:
611 Example error output:
598
612
599 .. code-block:: bash
613 .. code-block:: bash
600
614
601 id : <id_given_in_input>
615 id : <id_given_in_input>
602 result : null
616 result : null
603 error : {
617 error : {
604 "failed to edit permission for user group: `<usergroup>` in repo `<repo>`'
618 "failed to edit permission for user group: `<usergroup>` in repo `<repo>`'
605 }
619 }
606
620
607
621
608 grant_user_permission
622 grant_user_permission
609 ---------------------
623 ---------------------
610
624
611 .. py:function:: grant_user_permission(apiuser, repoid, userid, perm)
625 .. py:function:: grant_user_permission(apiuser, repoid, userid, perm)
612
626
613 Grant permissions for the specified user on the given repository,
627 Grant permissions for the specified user on the given repository,
614 or update existing permissions if found.
628 or update existing permissions if found.
615
629
616 This command can only be run using an |authtoken| with admin
630 This command can only be run using an |authtoken| with admin
617 permissions on the |repo|.
631 permissions on the |repo|.
618
632
619 :param apiuser: This is filled automatically from the |authtoken|.
633 :param apiuser: This is filled automatically from the |authtoken|.
620 :type apiuser: AuthUser
634 :type apiuser: AuthUser
621 :param repoid: Set the repository name or repository ID.
635 :param repoid: Set the repository name or repository ID.
622 :type repoid: str or int
636 :type repoid: str or int
623 :param userid: Set the user name.
637 :param userid: Set the user name.
624 :type userid: str
638 :type userid: str
625 :param perm: Set the user permissions, using the following format
639 :param perm: Set the user permissions, using the following format
626 ``(repository.(none|read|write|admin))``
640 ``(repository.(none|read|write|admin))``
627 :type perm: str
641 :type perm: str
628
642
629 Example output:
643 Example output:
630
644
631 .. code-block:: bash
645 .. code-block:: bash
632
646
633 id : <id_given_in_input>
647 id : <id_given_in_input>
634 result: {
648 result: {
635 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
649 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
636 "success": true
650 "success": true
637 }
651 }
638 error: null
652 error: null
639
653
640
654
641 invalidate_cache
655 invalidate_cache
642 ----------------
656 ----------------
643
657
644 .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>)
658 .. py:function:: invalidate_cache(apiuser, repoid, delete_keys=<Optional:False>)
645
659
646 Invalidates the cache for the specified repository.
660 Invalidates the cache for the specified repository.
647
661
648 This command can only be run using an |authtoken| with admin rights to
662 This command can only be run using an |authtoken| with admin rights to
649 the specified repository.
663 the specified repository.
650
664
651 This command takes the following options:
665 This command takes the following options:
652
666
653 :param apiuser: This is filled automatically from |authtoken|.
667 :param apiuser: This is filled automatically from |authtoken|.
654 :type apiuser: AuthUser
668 :type apiuser: AuthUser
655 :param repoid: Sets the repository name or repository ID.
669 :param repoid: Sets the repository name or repository ID.
656 :type repoid: str or int
670 :type repoid: str or int
657 :param delete_keys: This deletes the invalidated keys instead of
671 :param delete_keys: This deletes the invalidated keys instead of
658 just flagging them.
672 just flagging them.
659 :type delete_keys: Optional(``True`` | ``False``)
673 :type delete_keys: Optional(``True`` | ``False``)
660
674
661 Example output:
675 Example output:
662
676
663 .. code-block:: bash
677 .. code-block:: bash
664
678
665 id : <id_given_in_input>
679 id : <id_given_in_input>
666 result : {
680 result : {
667 'msg': Cache for repository `<repository name>` was invalidated,
681 'msg': Cache for repository `<repository name>` was invalidated,
668 'repository': <repository name>
682 'repository': <repository name>
669 }
683 }
670 error : null
684 error : null
671
685
672 Example error output:
686 Example error output:
673
687
674 .. code-block:: bash
688 .. code-block:: bash
675
689
676 id : <id_given_in_input>
690 id : <id_given_in_input>
677 result : null
691 result : null
678 error : {
692 error : {
679 'Error occurred during cache invalidation action'
693 'Error occurred during cache invalidation action'
680 }
694 }
681
695
682
696
683 lock
697 lock
684 ----
698 ----
685
699
686 .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
700 .. py:function:: lock(apiuser, repoid, locked=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
687
701
688 Sets the lock state of the specified |repo| by the given user.
702 Sets the lock state of the specified |repo| by the given user.
689 From more information, see :ref:`repo-locking`.
703 From more information, see :ref:`repo-locking`.
690
704
691 * If the ``userid`` option is not set, the repository is locked to the
705 * If the ``userid`` option is not set, the repository is locked to the
692 user who called the method.
706 user who called the method.
693 * If the ``locked`` parameter is not set, the current lock state of the
707 * If the ``locked`` parameter is not set, the current lock state of the
694 repository is displayed.
708 repository is displayed.
695
709
696 This command can only be run using an |authtoken| with admin rights to
710 This command can only be run using an |authtoken| with admin rights to
697 the specified repository.
711 the specified repository.
698
712
699 This command takes the following options:
713 This command takes the following options:
700
714
701 :param apiuser: This is filled automatically from the |authtoken|.
715 :param apiuser: This is filled automatically from the |authtoken|.
702 :type apiuser: AuthUser
716 :type apiuser: AuthUser
703 :param repoid: Sets the repository name or repository ID.
717 :param repoid: Sets the repository name or repository ID.
704 :type repoid: str or int
718 :type repoid: str or int
705 :param locked: Sets the lock state.
719 :param locked: Sets the lock state.
706 :type locked: Optional(``True`` | ``False``)
720 :type locked: Optional(``True`` | ``False``)
707 :param userid: Set the repository lock to this user.
721 :param userid: Set the repository lock to this user.
708 :type userid: Optional(str or int)
722 :type userid: Optional(str or int)
709
723
710 Example error output:
724 Example error output:
711
725
712 .. code-block:: bash
726 .. code-block:: bash
713
727
714 id : <id_given_in_input>
728 id : <id_given_in_input>
715 result : {
729 result : {
716 'repo': '<reponame>',
730 'repo': '<reponame>',
717 'locked': <bool: lock state>,
731 'locked': <bool: lock state>,
718 'locked_since': <int: lock timestamp>,
732 'locked_since': <int: lock timestamp>,
719 'locked_by': <username of person who made the lock>,
733 'locked_by': <username of person who made the lock>,
720 'lock_reason': <str: reason for locking>,
734 'lock_reason': <str: reason for locking>,
721 'lock_state_changed': <bool: True if lock state has been changed in this request>,
735 'lock_state_changed': <bool: True if lock state has been changed in this request>,
722 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.'
736 'msg': 'Repo `<reponame>` locked by `<username>` on <timestamp>.'
723 or
737 or
724 'msg': 'Repo `<repository name>` not locked.'
738 'msg': 'Repo `<repository name>` not locked.'
725 or
739 or
726 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`'
740 'msg': 'User `<user name>` set lock state for repo `<repository name>` to `<new lock state>`'
727 }
741 }
728 error : null
742 error : null
729
743
730 Example error output:
744 Example error output:
731
745
732 .. code-block:: bash
746 .. code-block:: bash
733
747
734 id : <id_given_in_input>
748 id : <id_given_in_input>
735 result : null
749 result : null
736 error : {
750 error : {
737 'Error occurred locking repository `<reponame>`'
751 'Error occurred locking repository `<reponame>`'
738 }
752 }
739
753
740
754
741 pull
755 pull
742 ----
756 ----
743
757
744 .. py:function:: pull(apiuser, repoid)
758 .. py:function:: pull(apiuser, repoid)
745
759
746 Triggers a pull on the given repository from a remote location. You
760 Triggers a pull on the given repository from a remote location. You
747 can use this to keep remote repositories up-to-date.
761 can use this to keep remote repositories up-to-date.
748
762
749 This command can only be run using an |authtoken| with admin
763 This command can only be run using an |authtoken| with admin
750 rights to the specified repository. For more information,
764 rights to the specified repository. For more information,
751 see :ref:`config-token-ref`.
765 see :ref:`config-token-ref`.
752
766
753 This command takes the following options:
767 This command takes the following options:
754
768
755 :param apiuser: This is filled automatically from the |authtoken|.
769 :param apiuser: This is filled automatically from the |authtoken|.
756 :type apiuser: AuthUser
770 :type apiuser: AuthUser
757 :param repoid: The repository name or repository ID.
771 :param repoid: The repository name or repository ID.
758 :type repoid: str or int
772 :type repoid: str or int
759
773
760 Example output:
774 Example output:
761
775
762 .. code-block:: bash
776 .. code-block:: bash
763
777
764 id : <id_given_in_input>
778 id : <id_given_in_input>
765 result : {
779 result : {
766 "msg": "Pulled from `<repository name>`"
780 "msg": "Pulled from `<repository name>`"
767 "repository": "<repository name>"
781 "repository": "<repository name>"
768 }
782 }
769 error : null
783 error : null
770
784
771 Example error output:
785 Example error output:
772
786
773 .. code-block:: bash
787 .. code-block:: bash
774
788
775 id : <id_given_in_input>
789 id : <id_given_in_input>
776 result : null
790 result : null
777 error : {
791 error : {
778 "Unable to pull changes from `<reponame>`"
792 "Unable to pull changes from `<reponame>`"
779 }
793 }
780
794
781
795
782 remove_field_from_repo
796 remove_field_from_repo
783 ----------------------
797 ----------------------
784
798
785 .. py:function:: remove_field_from_repo(apiuser, repoid, key)
799 .. py:function:: remove_field_from_repo(apiuser, repoid, key)
786
800
787 Removes an extra field from a repository.
801 Removes an extra field from a repository.
788
802
789 This command can only be run using an |authtoken| with at least
803 This command can only be run using an |authtoken| with at least
790 write permissions to the |repo|.
804 write permissions to the |repo|.
791
805
792 :param apiuser: This is filled automatically from the |authtoken|.
806 :param apiuser: This is filled automatically from the |authtoken|.
793 :type apiuser: AuthUser
807 :type apiuser: AuthUser
794 :param repoid: Set the repository name or repository ID.
808 :param repoid: Set the repository name or repository ID.
795 :type repoid: str or int
809 :type repoid: str or int
796 :param key: Set the unique field key for this repository.
810 :param key: Set the unique field key for this repository.
797 :type key: str
811 :type key: str
798
812
799
813
800 revoke_user_group_permission
814 revoke_user_group_permission
801 ----------------------------
815 ----------------------------
802
816
803 .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid)
817 .. py:function:: revoke_user_group_permission(apiuser, repoid, usergroupid)
804
818
805 Revoke the permissions of a user group on a given repository.
819 Revoke the permissions of a user group on a given repository.
806
820
807 This command can only be run using an |authtoken| with admin
821 This command can only be run using an |authtoken| with admin
808 permissions on the |repo|.
822 permissions on the |repo|.
809
823
810 :param apiuser: This is filled automatically from the |authtoken|.
824 :param apiuser: This is filled automatically from the |authtoken|.
811 :type apiuser: AuthUser
825 :type apiuser: AuthUser
812 :param repoid: Set the repository name or repository ID.
826 :param repoid: Set the repository name or repository ID.
813 :type repoid: str or int
827 :type repoid: str or int
814 :param usergroupid: Specify the user group ID.
828 :param usergroupid: Specify the user group ID.
815 :type usergroupid: str or int
829 :type usergroupid: str or int
816
830
817 Example output:
831 Example output:
818
832
819 .. code-block:: bash
833 .. code-block:: bash
820
834
821 id : <id_given_in_input>
835 id : <id_given_in_input>
822 result: {
836 result: {
823 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
837 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
824 "success": true
838 "success": true
825 }
839 }
826 error: null
840 error: null
827
841
828
842
829 revoke_user_permission
843 revoke_user_permission
830 ----------------------
844 ----------------------
831
845
832 .. py:function:: revoke_user_permission(apiuser, repoid, userid)
846 .. py:function:: revoke_user_permission(apiuser, repoid, userid)
833
847
834 Revoke permission for a user on the specified repository.
848 Revoke permission for a user on the specified repository.
835
849
836 This command can only be run using an |authtoken| with admin
850 This command can only be run using an |authtoken| with admin
837 permissions on the |repo|.
851 permissions on the |repo|.
838
852
839 :param apiuser: This is filled automatically from the |authtoken|.
853 :param apiuser: This is filled automatically from the |authtoken|.
840 :type apiuser: AuthUser
854 :type apiuser: AuthUser
841 :param repoid: Set the repository name or repository ID.
855 :param repoid: Set the repository name or repository ID.
842 :type repoid: str or int
856 :type repoid: str or int
843 :param userid: Set the user name of revoked user.
857 :param userid: Set the user name of revoked user.
844 :type userid: str or int
858 :type userid: str or int
845
859
846 Example error output:
860 Example error output:
847
861
848 .. code-block:: bash
862 .. code-block:: bash
849
863
850 id : <id_given_in_input>
864 id : <id_given_in_input>
851 result: {
865 result: {
852 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
866 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
853 "success": true
867 "success": true
854 }
868 }
855 error: null
869 error: null
856
870
857
871
858 set_repo_settings
872 set_repo_settings
859 -----------------
873 -----------------
860
874
861 .. py:function:: set_repo_settings(apiuser, repoid, settings)
875 .. py:function:: set_repo_settings(apiuser, repoid, settings)
862
876
863 Update repository settings. Returns true on success.
877 Update repository settings. Returns true on success.
864
878
865 :param apiuser: This is filled automatically from the |authtoken|.
879 :param apiuser: This is filled automatically from the |authtoken|.
866 :type apiuser: AuthUser
880 :type apiuser: AuthUser
867 :param repoid: The repository name or repository id.
881 :param repoid: The repository name or repository id.
868 :type repoid: str or int
882 :type repoid: str or int
869 :param settings: The new settings for the repository.
883 :param settings: The new settings for the repository.
870 :type: settings: dict
884 :type: settings: dict
871
885
872 Example output:
886 Example output:
873
887
874 .. code-block:: bash
888 .. code-block:: bash
875
889
876 {
890 {
877 "error": null,
891 "error": null,
878 "id": 237,
892 "id": 237,
879 "result": true
893 "result": true
880 }
894 }
881
895
882
896
883 strip
897 strip
884 -----
898 -----
885
899
886 .. py:function:: strip(apiuser, repoid, revision, branch)
900 .. py:function:: strip(apiuser, repoid, revision, branch)
887
901
888 Strips the given revision from the specified repository.
902 Strips the given revision from the specified repository.
889
903
890 * This will remove the revision and all of its decendants.
904 * This will remove the revision and all of its decendants.
891
905
892 This command can only be run using an |authtoken| with admin rights to
906 This command can only be run using an |authtoken| with admin rights to
893 the specified repository.
907 the specified repository.
894
908
895 This command takes the following options:
909 This command takes the following options:
896
910
897 :param apiuser: This is filled automatically from the |authtoken|.
911 :param apiuser: This is filled automatically from the |authtoken|.
898 :type apiuser: AuthUser
912 :type apiuser: AuthUser
899 :param repoid: The repository name or repository ID.
913 :param repoid: The repository name or repository ID.
900 :type repoid: str or int
914 :type repoid: str or int
901 :param revision: The revision you wish to strip.
915 :param revision: The revision you wish to strip.
902 :type revision: str
916 :type revision: str
903 :param branch: The branch from which to strip the revision.
917 :param branch: The branch from which to strip the revision.
904 :type branch: str
918 :type branch: str
905
919
906 Example output:
920 Example output:
907
921
908 .. code-block:: bash
922 .. code-block:: bash
909
923
910 id : <id_given_in_input>
924 id : <id_given_in_input>
911 result : {
925 result : {
912 "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'"
926 "msg": "'Stripped commit <commit_hash> from repo `<repository name>`'"
913 "repository": "<repository name>"
927 "repository": "<repository name>"
914 }
928 }
915 error : null
929 error : null
916
930
917 Example error output:
931 Example error output:
918
932
919 .. code-block:: bash
933 .. code-block:: bash
920
934
921 id : <id_given_in_input>
935 id : <id_given_in_input>
922 result : null
936 result : null
923 error : {
937 error : {
924 "Unable to strip commit <commit_hash> from repo `<repository name>`"
938 "Unable to strip commit <commit_hash> from repo `<repository name>`"
925 }
939 }
926
940
927
941
928 update_repo
942 update_repo
929 -----------
943 -----------
930
944
931 .. py:function:: update_repo(apiuser, repoid, repo_name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, fork_of=<Optional:None>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>)
945 .. py:function:: update_repo(apiuser, repoid, repo_name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, fork_of=<Optional:None>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>)
932
946
933 Updates a repository with the given information.
947 Updates a repository with the given information.
934
948
935 This command can only be run using an |authtoken| with at least
949 This command can only be run using an |authtoken| with at least
936 admin permissions to the |repo|.
950 admin permissions to the |repo|.
937
951
938 * If the repository name contains "/", repository will be updated
952 * If the repository name contains "/", repository will be updated
939 accordingly with a repository group or nested repository groups
953 accordingly with a repository group or nested repository groups
940
954
941 For example repoid=repo-test name="foo/bar/repo-test" will update |repo|
955 For example repoid=repo-test name="foo/bar/repo-test" will update |repo|
942 called "repo-test" and place it inside group "foo/bar".
956 called "repo-test" and place it inside group "foo/bar".
943 You have to have permissions to access and write to the last repository
957 You have to have permissions to access and write to the last repository
944 group ("bar" in this example)
958 group ("bar" in this example)
945
959
946 :param apiuser: This is filled automatically from the |authtoken|.
960 :param apiuser: This is filled automatically from the |authtoken|.
947 :type apiuser: AuthUser
961 :type apiuser: AuthUser
948 :param repoid: repository name or repository ID.
962 :param repoid: repository name or repository ID.
949 :type repoid: str or int
963 :type repoid: str or int
950 :param repo_name: Update the |repo| name, including the
964 :param repo_name: Update the |repo| name, including the
951 repository group it's in.
965 repository group it's in.
952 :type repo_name: str
966 :type repo_name: str
953 :param owner: Set the |repo| owner.
967 :param owner: Set the |repo| owner.
954 :type owner: str
968 :type owner: str
955 :param fork_of: Set the |repo| as fork of another |repo|.
969 :param fork_of: Set the |repo| as fork of another |repo|.
956 :type fork_of: str
970 :type fork_of: str
957 :param description: Update the |repo| description.
971 :param description: Update the |repo| description.
958 :type description: str
972 :type description: str
959 :param private: Set the |repo| as private. (True | False)
973 :param private: Set the |repo| as private. (True | False)
960 :type private: bool
974 :type private: bool
961 :param clone_uri: Update the |repo| clone URI.
975 :param clone_uri: Update the |repo| clone URI.
962 :type clone_uri: str
976 :type clone_uri: str
963 :param landing_rev: Set the |repo| landing revision. Default is ``rev:tip``.
977 :param landing_rev: Set the |repo| landing revision. Default is ``rev:tip``.
964 :type landing_rev: str
978 :type landing_rev: str
965 :param enable_statistics: Enable statistics on the |repo|, (True | False).
979 :param enable_statistics: Enable statistics on the |repo|, (True | False).
966 :type enable_statistics: bool
980 :type enable_statistics: bool
967 :param enable_locking: Enable |repo| locking.
981 :param enable_locking: Enable |repo| locking.
968 :type enable_locking: bool
982 :type enable_locking: bool
969 :param enable_downloads: Enable downloads from the |repo|, (True | False).
983 :param enable_downloads: Enable downloads from the |repo|, (True | False).
970 :type enable_downloads: bool
984 :type enable_downloads: bool
971 :param fields: Add extra fields to the |repo|. Use the following
985 :param fields: Add extra fields to the |repo|. Use the following
972 example format: ``field_key=field_val,field_key2=fieldval2``.
986 example format: ``field_key=field_val,field_key2=fieldval2``.
973 Escape ', ' with \,
987 Escape ', ' with \,
974 :type fields: str
988 :type fields: str
975
989
976
990
@@ -1,91 +1,92 b''
1 .. _rhodecode-release-notes-ref:
1 .. _rhodecode-release-notes-ref:
2
2
3 Release Notes
3 Release Notes
4 =============
4 =============
5
5
6 |RCE| 4.x Versions
6 |RCE| 4.x Versions
7 ------------------
7 ------------------
8
8
9 .. toctree::
9 .. toctree::
10 :maxdepth: 1
10 :maxdepth: 1
11
11
12 release-notes-4.5.2.rst
12 release-notes-4.5.1.rst
13 release-notes-4.5.1.rst
13 release-notes-4.5.0.rst
14 release-notes-4.5.0.rst
14 release-notes-4.4.2.rst
15 release-notes-4.4.2.rst
15 release-notes-4.4.1.rst
16 release-notes-4.4.1.rst
16 release-notes-4.4.0.rst
17 release-notes-4.4.0.rst
17 release-notes-4.3.1.rst
18 release-notes-4.3.1.rst
18 release-notes-4.3.0.rst
19 release-notes-4.3.0.rst
19 release-notes-4.2.1.rst
20 release-notes-4.2.1.rst
20 release-notes-4.2.0.rst
21 release-notes-4.2.0.rst
21 release-notes-4.1.2.rst
22 release-notes-4.1.2.rst
22 release-notes-4.1.1.rst
23 release-notes-4.1.1.rst
23 release-notes-4.1.0.rst
24 release-notes-4.1.0.rst
24 release-notes-4.0.1.rst
25 release-notes-4.0.1.rst
25 release-notes-4.0.0.rst
26 release-notes-4.0.0.rst
26
27
27 |RCE| 3.x Versions
28 |RCE| 3.x Versions
28 ------------------
29 ------------------
29
30
30 .. toctree::
31 .. toctree::
31 :maxdepth: 1
32 :maxdepth: 1
32
33
33 release-notes-3.8.4.rst
34 release-notes-3.8.4.rst
34 release-notes-3.8.3.rst
35 release-notes-3.8.3.rst
35 release-notes-3.8.2.rst
36 release-notes-3.8.2.rst
36 release-notes-3.8.1.rst
37 release-notes-3.8.1.rst
37 release-notes-3.8.0.rst
38 release-notes-3.8.0.rst
38 release-notes-3.7.1.rst
39 release-notes-3.7.1.rst
39 release-notes-3.7.0.rst
40 release-notes-3.7.0.rst
40 release-notes-3.6.1.rst
41 release-notes-3.6.1.rst
41 release-notes-3.6.0.rst
42 release-notes-3.6.0.rst
42 release-notes-3.5.2.rst
43 release-notes-3.5.2.rst
43 release-notes-3.5.1.rst
44 release-notes-3.5.1.rst
44 release-notes-3.5.0.rst
45 release-notes-3.5.0.rst
45 release-notes-3.4.1.rst
46 release-notes-3.4.1.rst
46 release-notes-3.4.0.rst
47 release-notes-3.4.0.rst
47 release-notes-3.3.4.rst
48 release-notes-3.3.4.rst
48 release-notes-3.3.3.rst
49 release-notes-3.3.3.rst
49 release-notes-3.3.2.rst
50 release-notes-3.3.2.rst
50 release-notes-3.3.1.rst
51 release-notes-3.3.1.rst
51 release-notes-3.3.0.rst
52 release-notes-3.3.0.rst
52 release-notes-3.2.3.rst
53 release-notes-3.2.3.rst
53 release-notes-3.2.2.rst
54 release-notes-3.2.2.rst
54 release-notes-3.2.1.rst
55 release-notes-3.2.1.rst
55 release-notes-3.2.0.rst
56 release-notes-3.2.0.rst
56 release-notes-3.1.1.rst
57 release-notes-3.1.1.rst
57 release-notes-3.1.0.rst
58 release-notes-3.1.0.rst
58 release-notes-3.0.2.rst
59 release-notes-3.0.2.rst
59 release-notes-3.0.1.rst
60 release-notes-3.0.1.rst
60 release-notes-3.0.0.rst
61 release-notes-3.0.0.rst
61
62
62 |RCE| 2.x Versions
63 |RCE| 2.x Versions
63 ------------------
64 ------------------
64
65
65 .. toctree::
66 .. toctree::
66 :maxdepth: 1
67 :maxdepth: 1
67
68
68 release-notes-2.2.8.rst
69 release-notes-2.2.8.rst
69 release-notes-2.2.7.rst
70 release-notes-2.2.7.rst
70 release-notes-2.2.6.rst
71 release-notes-2.2.6.rst
71 release-notes-2.2.5.rst
72 release-notes-2.2.5.rst
72 release-notes-2.2.4.rst
73 release-notes-2.2.4.rst
73 release-notes-2.2.3.rst
74 release-notes-2.2.3.rst
74 release-notes-2.2.2.rst
75 release-notes-2.2.2.rst
75 release-notes-2.2.1.rst
76 release-notes-2.2.1.rst
76 release-notes-2.2.0.rst
77 release-notes-2.2.0.rst
77 release-notes-2.1.0.rst
78 release-notes-2.1.0.rst
78 release-notes-2.0.2.rst
79 release-notes-2.0.2.rst
79 release-notes-2.0.1.rst
80 release-notes-2.0.1.rst
80 release-notes-2.0.0.rst
81 release-notes-2.0.0.rst
81
82
82 |RCE| 1.x Versions
83 |RCE| 1.x Versions
83 ------------------
84 ------------------
84
85
85 .. toctree::
86 .. toctree::
86 :maxdepth: 1
87 :maxdepth: 1
87
88
88 release-notes-1.7.2.rst
89 release-notes-1.7.2.rst
89 release-notes-1.7.1.rst
90 release-notes-1.7.1.rst
90 release-notes-1.7.0.rst
91 release-notes-1.7.0.rst
91 release-notes-1.6.0.rst
92 release-notes-1.6.0.rst
General Comments 0
You need to be logged in to leave comments. Login now