##// END OF EJS Templates
whitespace cleanup
marcink -
r3224:8b8edfc2 beta
parent child Browse files
Show More
@@ -1,179 +1,179 b''
1 1 =========
2 2 RhodeCode
3 3 =========
4 4
5 5 About
6 6 -----
7 7
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
9 9 with a built in push/pull server and full text search and code-review.
10 It works on http/https and has a built in permission/authentication system with
10 It works on http/https and has a built in permission/authentication system with
11 11 the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
12 12 simple API so it's easy integrable with existing external systems.
13 13
14 RhodeCode is similar in some respects to github_ or bitbucket_,
14 RhodeCode is similar in some respects to github_ or bitbucket_,
15 15 however RhodeCode can be run as standalone hosted application on your own server.
16 It is open source and donation ware and focuses more on providing a customized,
17 self administered interface for Mercurial_ and GIT_ repositories.
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
16 It is open source and donation ware and focuses more on providing a customized,
17 self administered interface for Mercurial_ and GIT_ repositories.
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
20 20 different version control systems.
21 21
22 22 RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
23 23
24 24 Installation
25 25 ------------
26 26 Stable releases of RhodeCode are best installed via::
27 27
28 28 easy_install rhodecode
29 29
30 30 Or::
31 31
32 pip install rhodecode
32 pip install rhodecode
33 33
34 34 Detailed instructions and links may be found on the Installation page.
35 35
36 36 Please visit http://packages.python.org/RhodeCode/installation.html for
37 37 more details
38 38
39 39 RhodeCode demo
40 40 --------------
41 41
42 42 http://demo.rhodecode.org
43 43
44 44 The default access is anonymous but you can login to an administrative account
45 45 using the following credentials:
46 46
47 47 - username: demo
48 48 - password: demo12
49 49
50 50 Source code
51 51 -----------
52 52
53 53 The latest sources can be obtained from official RhodeCode instance
54 https://secure.rhodecode.org
54 https://secure.rhodecode.org
55 55
56 56
57 57 MIRRORS:
58 58
59 59 Issue tracker and sources at bitbucket_
60 60
61 61 http://bitbucket.org/marcinkuzminski/rhodecode
62 62
63 63 Sources at github_
64 64
65 65 https://github.com/marcinkuzminski/rhodecode
66 66
67 67
68 68 RhodeCode Features
69 69 ------------------
70 70
71 - Has its own middleware to handle mercurial_ and git_ protocol requests.
71 - Has its own middleware to handle mercurial_ and git_ protocol requests.
72 72 Each request is authenticated and logged together with IP address.
73 73 - Build for speed and performance. You can make multiple pulls/pushes simultaneous.
74 74 Proven to work with 1000s of repositories and users
75 75 - Supports http/https, LDAP, AD, proxy-pass authentication.
76 76 - Full permissions (private/read/write/admin) together with IP restrictions for each repository,
77 77 additional explicit forking and repository creation permissions.
78 78 - Users groups for easier permission management
79 79 - Repository groups let you group repos and manage them easier.
80 80 - Users can fork other users repos, and compare them at any time.
81 81 - Integrates easily with other systems, with custom created mappers you can connect it to almost
82 82 any issue tracker, and with an JSON-RPC API you can make much more
83 83 - Build in commit-api let's you add, edit and commit files right from RhodeCode
84 84 web interface using simple editor or upload binary files using simple form.
85 85 - Powerfull pull-request driven review system with inline commenting,
86 86 changeset statuses, and notification system.
87 87 - Importing and syncing repositories from remote locations for GIT_, Mercurial_ and SVN.
88 88 - Mako templates let's you customize the look and feel of the application.
89 - Beautiful diffs, annotations and source code browsing all colored by pygments.
89 - Beautiful diffs, annotations and source code browsing all colored by pygments.
90 90 Raw diffs are made in git-diff format for both VCS systems, including GIT_ binary-patches
91 91 - Mercurial_ and Git_ DAG graphs and yui-flot powered graphs with zooming and statistics
92 92 to track activity for repositories
93 93 - Admin interface with user/permission management. Admin activity journal, logs
94 94 pulls, pushes, forks, registrations and other actions made by all users.
95 - Server side forks. It is possible to fork a project and modify it freely
95 - Server side forks. It is possible to fork a project and modify it freely
96 96 without breaking the main repository.
97 - rst and markdown README support for repositories.
97 - rst and markdown README support for repositories.
98 98 - Full text search powered by Whoosh on the source files, commit messages, and file names.
99 99 Build in indexing daemons, with optional incremental index build
100 100 (no external search servers required all in one application)
101 - Setup project descriptions/tags and info inside built in db for easy, non
101 - Setup project descriptions/tags and info inside built in db for easy, non
102 102 file-system operations.
103 - Intelligent cache with invalidation after push or project change, provides
103 - Intelligent cache with invalidation after push or project change, provides
104 104 high performance and always up to date data.
105 105 - RSS / Atom feeds, gravatar support, downloadable sources as zip/tar/gz
106 - Optional async tasks for speed and performance using celery_
107 - Backup scripts can do backup of whole app and send it over scp to desired
108 location
106 - Optional async tasks for speed and performance using celery_
107 - Backup scripts can do backup of whole app and send it over scp to desired
108 location
109 109 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
110 110
111
111
112 112 Incoming / Plans
113 113 ----------------
114 114
115 115 - Finer granular permissions per branch, or subrepo
116 116 - Web based merges for pull requests
117 117 - Tracking history for each lines in files
118 - Simple issue tracker
118 - Simple issue tracker
119 119 - SSH based authentication with server side key management
120 120 - Commit based built in wiki system
121 121 - Gist server
122 122 - More statistics and graph (global annotation + some more statistics)
123 - Other advancements as development continues (or you can of course make
123 - Other advancements as development continues (or you can of course make
124 124 additions and or requests)
125 125
126 126 License
127 127 -------
128 128
129 129 ``RhodeCode`` is released under the GPLv3 license.
130 130
131 131
132 132 Getting help
133 133 ------------
134 134
135 135 Listed bellow are various support resources that should help.
136 136
137 137 .. note::
138
138
139 139 Please try to read the documentation before posting any issues, especially
140 140 the **troubleshooting section**
141
141
142 142 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
143 143 any questions.
144 144
145 145 - Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
146 146
147 147 - Join #rhodecode on FreeNode (irc.freenode.net)
148 148 or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
149 149
150 150 - You can also follow me on twitter **@marcinkuzminski** where i often post some
151 151 news about RhodeCode
152 152
153 153
154 154 Online documentation
155 155 --------------------
156 156
157 157 Online documentation for the current version of RhodeCode is available at
158 158 - http://packages.python.org/RhodeCode/
159 159 - http://rhodecode.readthedocs.org/en/latest/index.html
160 160
161 161 You may also build the documentation for yourself - go into ``docs/`` and run::
162 162
163 163 make html
164 164
165 165 (You need to have sphinx_ installed to build the documentation. If you don't
166 have sphinx_ installed you can install it via the command:
166 have sphinx_ installed you can install it via the command:
167 167 ``easy_install sphinx``)
168
168
169 169 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
170 170 .. _python: http://www.python.org/
171 171 .. _sphinx: http://sphinx.pocoo.org/
172 172 .. _mercurial: http://mercurial.selenic.com/
173 173 .. _bitbucket: http://bitbucket.org/
174 174 .. _github: http://github.com/
175 175 .. _subversion: http://subversion.tigris.org/
176 176 .. _git: http://git-scm.com/
177 177 .. _celery: http://celeryproject.org/
178 178 .. _Sphinx: http://sphinx.pocoo.org/
179 .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file
179 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -1,959 +1,959 b''
1 1 .. _api:
2 2
3 3 ===
4 4 API
5 5 ===
6 6
7 7
8 8 Starting from RhodeCode version 1.2 a simple API was implemented.
9 9 There's a single schema for calling all api methods. API is implemented
10 10 with JSON protocol both ways. An url to send API request to RhodeCode is
11 11 <your_server>/_admin/api
12 12
13 13 API ACCESS FOR WEB VIEWS
14 14 ++++++++++++++++++++++++
15 15
16 API access can also be turned on for each web view in RhodeCode that is
17 decorated with `@LoginRequired` decorator. To enable API access simple change
18 the standard login decorator to `@LoginRequired(api_access=True)`.
19 After this change, a rhodecode view can be accessed without login by adding a
16 API access can also be turned on for each web view in RhodeCode that is
17 decorated with `@LoginRequired` decorator. To enable API access simple change
18 the standard login decorator to `@LoginRequired(api_access=True)`.
19 After this change, a rhodecode view can be accessed without login by adding a
20 20 GET parameter `?api_key=<api_key>` to url. By default this is only
21 21 enabled on RSS/ATOM feed views.
22 22
23 23
24 24 API ACCESS
25 25 ++++++++++
26 26
27 27 All clients are required to send JSON-RPC spec JSON data::
28 28
29 {
29 {
30 30 "id:"<id>",
31 31 "api_key":"<api_key>",
32 32 "method":"<method_name>",
33 33 "args":{"<arg_key>":"<arg_val>"}
34 34 }
35 35
36 36 Example call for autopulling remotes repos using curl::
37 37 curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}'
38 38
39 39 Simply provide
40 40 - *id* A value of any type, which is used to match the response with the request that it is replying to.
41 41 - *api_key* for access and permission validation.
42 42 - *method* is name of method to call
43 43 - *args* is an key:value list of arguments to pass to method
44 44
45 45 .. note::
46 46
47 47 api_key can be found in your user account page
48 48
49 49
50 50 RhodeCode API will return always a JSON-RPC response::
51 51
52 {
52 {
53 53 "id":<id>, # matching id sent by request
54 54 "result": "<result>"|null, # JSON formatted result, null if any errors
55 55 "error": "null"|<error_message> # JSON formatted error (if any)
56 56 }
57 57
58 58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
59 59 calling api *error* key from response will contain failure description
60 60 and result will be null.
61 61
62 62
63 63 API CLIENT
64 64 ++++++++++
65 65
66 66 From version 1.4 RhodeCode adds a script that allows to easily
67 67 communicate with API. After installing RhodeCode a `rhodecode-api` script
68 68 will be available.
69 69
70 70 To get started quickly simply run::
71 71
72 72 rhodecode-api _create_config --apikey=<youapikey> --apihost=<rhodecode host>
73
73
74 74 This will create a file named .config in the directory you executed it storing
75 75 json config file with credentials. You can skip this step and always provide
76 76 both of the arguments to be able to communicate with server
77 77
78 78
79 79 after that simply run any api command for example get_repo::
80
80
81 81 rhodecode-api get_repo
82 82
83 83 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
84 84 rhodecode said:
85 85 {'error': 'Missing non optional `repoid` arg in JSON DATA',
86 86 'id': 75,
87 87 'result': None}
88 88
89 89 Ups looks like we forgot to add an argument
90 90
91 91 Let's try again now giving the repoid as parameters::
92 92
93 rhodecode-api get_repo repoid:rhodecode
94
93 rhodecode-api get_repo repoid:rhodecode
94
95 95 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
96 96 rhodecode said:
97 97 {'error': None,
98 98 'id': 39,
99 99 'result': <json data...>}
100 100
101 101
102 102
103 103 API METHODS
104 104 +++++++++++
105 105
106 106
107 107 pull
108 108 ----
109 109
110 110 Pulls given repo from remote location. Can be used to automatically keep
111 111 remote repos up to date. This command can be executed only using api_key
112 112 belonging to user with admin rights
113 113
114 114 INPUT::
115 115
116 116 id : <id_for_response>
117 117 api_key : "<api_key>"
118 118 method : "pull"
119 119 args : {
120 120 "repoid" : "<reponame or repo_id>"
121 121 }
122 122
123 123 OUTPUT::
124 124
125 125 id : <id_given_in_input>
126 126 result : "Pulled from `<reponame>`"
127 127 error : null
128 128
129 129
130 130 rescan_repos
131 131 ------------
132 132
133 133 Dispatch rescan repositories action. If remove_obsolete is set
134 134 RhodeCode will delete repos that are in database but not in the filesystem.
135 This command can be executed only using api_key belonging to user with admin
135 This command can be executed only using api_key belonging to user with admin
136 136 rights.
137 137
138 138 INPUT::
139 139
140 140 id : <id_for_response>
141 141 api_key : "<api_key>"
142 142 method : "rescan_repos"
143 143 args : {
144 144 "remove_obsolete" : "<boolean = Optional(False)>"
145 145 }
146 146
147 147 OUTPUT::
148 148
149 149 id : <id_given_in_input>
150 result : "{'added': [<list of names of added repos>],
150 result : "{'added': [<list of names of added repos>],
151 151 'removed': [<list of names of removed repos>]}"
152 152 error : null
153 153
154 154
155 155 lock
156 156 ----
157 157
158 158 Set locking state on given repository by given user. If userid param is skipped
159 159 , then it is set to id of user whos calling this method.
160 This command can be executed only using api_key belonging to user with admin
160 This command can be executed only using api_key belonging to user with admin
161 161 rights or regular user that have admin or write access to repository.
162 162
163 163 INPUT::
164 164
165 165 id : <id_for_response>
166 166 api_key : "<api_key>"
167 167 method : "lock"
168 168 args : {
169 169 "repoid" : "<reponame or repo_id>"
170 170 "userid" : "<user_id or username = Optional(=apiuser)>",
171 171 "locked" : "<bool true|false>"
172 172 }
173 173
174 174 OUTPUT::
175 175
176 176 id : <id_given_in_input>
177 177 result : "User `<username>` set lock state for repo `<reponame>` to `true|false`"
178 178 error : null
179 179
180 180
181 181 show_ip
182 182 -------
183 183
184 184 Shows IP address as seen from RhodeCode server, together with all
185 185 defined IP addresses for given user.
186 This command can be executed only using api_key belonging to user with admin
186 This command can be executed only using api_key belonging to user with admin
187 187 rights.
188 188
189 189 INPUT::
190 190
191 191 id : <id_for_response>
192 192 api_key : "<api_key>"
193 193 method : "show_ip"
194 194 args : {
195 195 "userid" : "<user_id or username>",
196 196 }
197 197
198 198 OUTPUT::
199 199
200 200 id : <id_given_in_input>
201 201 result : {
202 202 "ip_addr_server": <ip_from_clien>",
203 203 "user_ips": [
204 204 {
205 205 "ip_addr": "<ip_with_mask>",
206 206 "ip_range": ["<start_ip>", "<end_ip>"],
207 207 },
208 208 ...
209 209 ]
210 210 }
211
211
212 212 error : null
213 213
214 214
215 215 get_user
216 216 --------
217 217
218 218 Get's an user by username or user_id, Returns empty result if user is not found.
219 219 If userid param is skipped it is set to id of user who is calling this method.
220 This command can be executed only using api_key belonging to user with admin
220 This command can be executed only using api_key belonging to user with admin
221 221 rights, or regular users that cannot specify different userid than theirs
222 222
223 223
224 224 INPUT::
225 225
226 226 id : <id_for_response>
227 227 api_key : "<api_key>"
228 228 method : "get_user"
229 args : {
229 args : {
230 230 "userid" : "<username or user_id Optional(=apiuser)>"
231 231 }
232 232
233 233 OUTPUT::
234 234
235 235 id : <id_given_in_input>
236 result: None if user does not exist or
236 result: None if user does not exist or
237 237 {
238 238 "user_id" : "<user_id>",
239 239 "api_key" : "<api_key>",
240 240 "username" : "<username>",
241 241 "firstname": "<firstname>",
242 242 "lastname" : "<lastname>",
243 243 "email" : "<email>",
244 244 "emails": "<list_of_all_additional_emails>",
245 245 "ip_addresses": "<list_of_ip_addresses_for_user>",
246 246 "active" : "<bool>",
247 247 "admin" :Β  "<bool>",
248 248 "ldap_dn" : "<ldap_dn>",
249 249 "last_login": "<last_login>",
250 250 "permissions": {
251 251 "global": ["hg.create.repository",
252 252 "repository.read",
253 253 "hg.register.manual_activate"],
254 254 "repositories": {"repo1": "repository.none"},
255 255 "repositories_groups": {"Group1": "group.read"}
256 256 },
257 257 }
258 258
259 259 error: null
260 260
261 261
262 262 get_users
263 263 ---------
264 264
265 265 Lists all existing users. This command can be executed only using api_key
266 266 belonging to user with admin rights.
267 267
268 268
269 269 INPUT::
270 270
271 271 id : <id_for_response>
272 272 api_key : "<api_key>"
273 273 method : "get_users"
274 274 args : { }
275 275
276 276 OUTPUT::
277 277
278 278 id : <id_given_in_input>
279 279 result: [
280 280 {
281 281 "user_id" : "<user_id>",
282 282 "username" : "<username>",
283 283 "firstname": "<firstname>",
284 284 "lastname" : "<lastname>",
285 285 "email" : "<email>",
286 286 "emails": "<list_of_all_additional_emails>",
287 287 "ip_addresses": "<list_of_ip_addresses_for_user>",
288 288 "active" : "<bool>",
289 289 "admin" :Β  "<bool>",
290 290 "ldap_dn" : "<ldap_dn>",
291 291 "last_login": "<last_login>",
292 292 },
293 293 …
294 294 ]
295 295 error: null
296 296
297 297
298 298 create_user
299 299 -----------
300 300
301 Creates new user. This command can
301 Creates new user. This command can
302 302 be executed only using api_key belonging to user with admin rights.
303 303
304 304
305 305 INPUT::
306 306
307 307 id : <id_for_response>
308 308 api_key : "<api_key>"
309 309 method : "create_user"
310 310 args : {
311 311 "username" : "<username>",
312 312 "email" : "<useremail>",
313 313 "password" : "<password>",
314 314 "firstname" : "<firstname> = Optional(None)",
315 315 "lastname" : "<lastname> = Optional(None)",
316 316 "active" : "<bool> = Optional(True)",
317 317 "admin" : "<bool> = Optional(False)",
318 318 "ldap_dn" : "<ldap_dn> = Optional(None)"
319 319 }
320 320
321 321 OUTPUT::
322 322
323 323 id : <id_given_in_input>
324 324 result: {
325 325 "msg" : "created new user `<username>`",
326 326 "user": {
327 327 "user_id" : "<user_id>",
328 328 "username" : "<username>",
329 329 "firstname": "<firstname>",
330 330 "lastname" : "<lastname>",
331 331 "email" : "<email>",
332 332 "emails": "<list_of_all_additional_emails>",
333 333 "active" : "<bool>",
334 334 "admin" :Β  "<bool>",
335 335 "ldap_dn" : "<ldap_dn>",
336 336 "last_login": "<last_login>",
337 337 },
338 338 }
339 339 error: null
340 340
341 341
342 342 update_user
343 343 -----------
344 344
345 updates given user if such user exists. This command can
345 updates given user if such user exists. This command can
346 346 be executed only using api_key belonging to user with admin rights.
347 347
348 348
349 349 INPUT::
350 350
351 351 id : <id_for_response>
352 352 api_key : "<api_key>"
353 353 method : "update_user"
354 354 args : {
355 355 "userid" : "<user_id or username>",
356 356 "username" : "<username> = Optional(None)",
357 357 "email" : "<useremail> = Optional(None)",
358 358 "password" : "<password> = Optional(None)",
359 359 "firstname" : "<firstname> = Optional(None)",
360 360 "lastname" : "<lastname> = Optional(None)",
361 361 "active" : "<bool> = Optional(None)",
362 362 "admin" : "<bool> = Optional(None)",
363 363 "ldap_dn" : "<ldap_dn> = Optional(None)"
364 364 }
365 365
366 366 OUTPUT::
367 367
368 368 id : <id_given_in_input>
369 369 result: {
370 370 "msg" : "updated user ID:<userid> <username>",
371 371 "user": {
372 372 "user_id" : "<user_id>",
373 373 "username" : "<username>",
374 374 "firstname": "<firstname>",
375 375 "lastname" : "<lastname>",
376 376 "email" : "<email>",
377 377 "emails": "<list_of_all_additional_emails>",
378 378 "active" : "<bool>",
379 379 "admin" :Β  "<bool>",
380 380 "ldap_dn" : "<ldap_dn>",
381 381 "last_login": "<last_login>",
382 },
382 },
383 383 }
384 384 error: null
385 385
386 386
387 387 delete_user
388 388 -----------
389 389
390 390
391 deletes givenuser if such user exists. This command can
391 deletes givenuser if such user exists. This command can
392 392 be executed only using api_key belonging to user with admin rights.
393 393
394 394
395 395 INPUT::
396 396
397 397 id : <id_for_response>
398 398 api_key : "<api_key>"
399 399 method : "delete_user"
400 400 args : {
401 401 "userid" : "<user_id or username>",
402 402 }
403 403
404 404 OUTPUT::
405 405
406 406 id : <id_given_in_input>
407 407 result: {
408 408 "msg" : "deleted user ID:<userid> <username>",
409 409 "user": null
410 410 }
411 411 error: null
412 412
413 413
414 414 get_users_group
415 415 ---------------
416 416
417 417 Gets an existing users group. This command can be executed only using api_key
418 418 belonging to user with admin rights.
419 419
420 420
421 421 INPUT::
422 422
423 423 id : <id_for_response>
424 424 api_key : "<api_key>"
425 425 method : "get_users_group"
426 426 args : {
427 427 "usersgroupid" : "<users group id or name>"
428 428 }
429 429
430 430 OUTPUT::
431 431
432 432 id : <id_given_in_input>
433 433 result : None if group not exist
434 434 {
435 435 "users_group_id" : "<id>",
436 436 "group_name" : "<groupname>",
437 437 "active": "<bool>",
438 438 "members" : [
439 {
439 {
440 440 "user_id" : "<user_id>",
441 441 "username" : "<username>",
442 442 "firstname": "<firstname>",
443 443 "lastname" : "<lastname>",
444 444 "email" : "<email>",
445 445 "emails": "<list_of_all_additional_emails>",
446 446 "active" : "<bool>",
447 447 "admin" :Β  "<bool>",
448 448 "ldap_dn" : "<ldap_dn>",
449 449 "last_login": "<last_login>",
450 450 },
451 451 …
452 452 ]
453 453 }
454 454 error : null
455 455
456 456
457 457 get_users_groups
458 458 ----------------
459 459
460 Lists all existing users groups. This command can be executed only using
460 Lists all existing users groups. This command can be executed only using
461 461 api_key belonging to user with admin rights.
462 462
463 463
464 464 INPUT::
465 465
466 466 id : <id_for_response>
467 467 api_key : "<api_key>"
468 468 method : "get_users_groups"
469 469 args : { }
470 470
471 471 OUTPUT::
472 472
473 473 id : <id_given_in_input>
474 474 result : [
475 475 {
476 476 "users_group_id" : "<id>",
477 477 "group_name" : "<groupname>",
478 478 "active": "<bool>",
479 479 },
480 480 …
481 481 ]
482 482 error : null
483 483
484 484
485 485 create_users_group
486 486 ------------------
487 487
488 488 Creates new users group. This command can be executed only using api_key
489 489 belonging to user with admin rights
490 490
491 491
492 492 INPUT::
493 493
494 494 id : <id_for_response>
495 495 api_key : "<api_key>"
496 496 method : "create_users_group"
497 497 args: {
498 498 "group_name": "<groupname>",
499 499 "active":"<bool> = Optional(True)"
500 500 }
501 501
502 502 OUTPUT::
503 503
504 504 id : <id_given_in_input>
505 505 result: {
506 506 "msg": "created new users group `<groupname>`",
507 507 "users_group": {
508 508 "users_group_id" : "<id>",
509 509 "group_name" : "<groupname>",
510 510 "active": "<bool>",
511 511 },
512 512 }
513 513 error: null
514 514
515 515
516 516 add_user_to_users_group
517 517 -----------------------
518 518
519 Adds a user to a users group. If user exists in that group success will be
519 Adds a user to a users group. If user exists in that group success will be
520 520 `false`. This command can be executed only using api_key
521 521 belonging to user with admin rights
522 522
523 523
524 524 INPUT::
525 525
526 526 id : <id_for_response>
527 527 api_key : "<api_key>"
528 528 method : "add_user_users_group"
529 529 args: {
530 530 "usersgroupid" : "<users group id or name>",
531 531 "userid" : "<user_id or username>",
532 532 }
533 533
534 534 OUTPUT::
535 535
536 536 id : <id_given_in_input>
537 537 result: {
538 538 "success": True|False # depends on if member is in group
539 "msg": "added member `<username>` to users group `<groupname>` |
539 "msg": "added member `<username>` to users group `<groupname>` |
540 540 User is already in that group"
541 541 }
542 542 error: null
543 543
544 544
545 545 remove_user_from_users_group
546 546 ----------------------------
547 547
548 548 Removes a user from a users group. If user is not in given group success will
549 be `false`. This command can be executed only
549 be `false`. This command can be executed only
550 550 using api_key belonging to user with admin rights
551 551
552 552
553 553 INPUT::
554 554
555 555 id : <id_for_response>
556 556 api_key : "<api_key>"
557 557 method : "remove_user_from_users_group"
558 558 args: {
559 559 "usersgroupid" : "<users group id or name>",
560 560 "userid" : "<user_id or username>",
561 561 }
562 562
563 563 OUTPUT::
564 564
565 565 id : <id_given_in_input>
566 566 result: {
567 567 "success": True|False, # depends on if member is in group
568 "msg": "removed member <username> from users group <groupname> |
568 "msg": "removed member <username> from users group <groupname> |
569 569 User wasn't in group"
570 570 }
571 571 error: null
572 572
573 573
574 574 get_repo
575 575 --------
576 576
577 577 Gets an existing repository by it's name or repository_id. Members will return
578 either users_group or user associated to that repository. This command can be
579 executed only using api_key belonging to user with admin
578 either users_group or user associated to that repository. This command can be
579 executed only using api_key belonging to user with admin
580 580 rights or regular user that have at least read access to repository.
581 581
582 582
583 583 INPUT::
584 584
585 585 id : <id_for_response>
586 586 api_key : "<api_key>"
587 587 method : "get_repo"
588 588 args: {
589 589 "repoid" : "<reponame or repo_id>"
590 590 }
591 591
592 592 OUTPUT::
593 593
594 594 id : <id_given_in_input>
595 595 result: None if repository does not exist or
596 596 {
597 597 "repo_id" : "<repo_id>",
598 598 "repo_name" : "<reponame>"
599 599 "repo_type" : "<repo_type>",
600 600 "clone_uri" : "<clone_uri>",
601 601 "enable_downloads": "<bool>",
602 602 "enable_locking": "<bool>",
603 "enable_statistics": "<bool>",
603 "enable_statistics": "<bool>",
604 604 "private": "<bool>",
605 "created_on" : "<date_time_created>",
605 "created_on" : "<date_time_created>",
606 606 "description" : "<description>",
607 607 "landing_rev": "<landing_rev>",
608 608 "last_changeset": {
609 609 "author": "<full_author>",
610 610 "date": "<date_time_of_commit>",
611 611 "message": "<commit_message>",
612 612 "raw_id": "<raw_id>",
613 613 "revision": "<numeric_revision>",
614 614 "short_id": "<short_id>"
615 615 }
616 616 "owner": "<repo_owner>",
617 617 "fork_of": "<name_of_fork_parent>",
618 618 "members" : [
619 {
619 {
620 620 "type": "user",
621 621 "user_id" : "<user_id>",
622 622 "username" : "<username>",
623 623 "firstname": "<firstname>",
624 624 "lastname" : "<lastname>",
625 625 "email" : "<email>",
626 626 "emails": "<list_of_all_additional_emails>",
627 627 "active" : "<bool>",
628 628 "admin" :Β  "<bool>",
629 629 "ldap_dn" : "<ldap_dn>",
630 630 "last_login": "<last_login>",
631 631 "permission" : "repository.(read|write|admin)"
632 632 },
633 633 …
634 {
634 {
635 635 "type": "users_group",
636 636 "id" : "<usersgroupid>",
637 637 "name" : "<usersgroupname>",
638 638 "active": "<bool>",
639 639 "permission" : "repository.(read|write|admin)"
640 640 },
641 641 …
642 642 ]
643 643 "followers": [
644 644 {
645 645 "user_id" : "<user_id>",
646 646 "username" : "<username>",
647 647 "firstname": "<firstname>",
648 648 "lastname" : "<lastname>",
649 649 "email" : "<email>",
650 650 "emails": "<list_of_all_additional_emails>",
651 651 "ip_addresses": "<list_of_ip_addresses_for_user>",
652 652 "active" : "<bool>",
653 653 "admin" :Β  "<bool>",
654 654 "ldap_dn" : "<ldap_dn>",
655 "last_login": "<last_login>",
655 "last_login": "<last_login>",
656 656 },
657 …
657 …
658 658 ]
659 659 }
660 660 error: null
661 661
662 662
663 663 get_repos
664 664 ---------
665 665
666 Lists all existing repositories. This command can be executed only using
667 api_key belonging to user with admin rights or regular user that have
666 Lists all existing repositories. This command can be executed only using
667 api_key belonging to user with admin rights or regular user that have
668 668 admin, write or read access to repository.
669 669
670 670
671 671 INPUT::
672 672
673 673 id : <id_for_response>
674 674 api_key : "<api_key>"
675 675 method : "get_repos"
676 676 args: { }
677 677
678 678 OUTPUT::
679 679
680 680 id : <id_given_in_input>
681 681 result: [
682 682 {
683 683 "repo_id" : "<repo_id>",
684 684 "repo_name" : "<reponame>"
685 685 "repo_type" : "<repo_type>",
686 686 "clone_uri" : "<clone_uri>",
687 687 "private": : "<bool>",
688 "created_on" : "<datetimecreated>",
688 "created_on" : "<datetimecreated>",
689 689 "description" : "<description>",
690 690 "landing_rev": "<landing_rev>",
691 691 "owner": "<repo_owner>",
692 692 "fork_of": "<name_of_fork_parent>",
693 693 "enable_downloads": "<bool>",
694 694 "enable_locking": "<bool>",
695 "enable_statistics": "<bool>",
695 "enable_statistics": "<bool>",
696 696 },
697 697 …
698 698 ]
699 699 error: null
700 700
701 701
702 702 get_repo_nodes
703 703 --------------
704 704
705 returns a list of nodes and it's children in a flat list for a given path
706 at given revision. It's possible to specify ret_type to show only `files` or
707 `dirs`. This command can be executed only using api_key belonging to user
705 returns a list of nodes and it's children in a flat list for a given path
706 at given revision. It's possible to specify ret_type to show only `files` or
707 `dirs`. This command can be executed only using api_key belonging to user
708 708 with admin rights
709 709
710 710
711 711 INPUT::
712 712
713 713 id : <id_for_response>
714 714 api_key : "<api_key>"
715 715 method : "get_repo_nodes"
716 716 args: {
717 717 "repoid" : "<reponame or repo_id>"
718 718 "revision" : "<revision>",
719 719 "root_path" : "<root_path>",
720 720 "ret_type" : "<ret_type> = Optional('all')"
721 721 }
722 722
723 723 OUTPUT::
724 724
725 725 id : <id_given_in_input>
726 726 result: [
727 727 {
728 728 "name" : "<name>"
729 729 "type" : "<type>",
730 730 },
731 731 …
732 732 ]
733 733 error: null
734 734
735 735
736 736 create_repo
737 737 -----------
738 738
739 739 Creates a repository. If repository name contains "/", all needed repository
740 groups will be created. For example "foo/bar/baz" will create groups
741 "foo", "bar" (with "foo" as parent), and create "baz" repository with
742 "bar" as group. This command can be executed only using api_key belonging to user with admin
740 groups will be created. For example "foo/bar/baz" will create groups
741 "foo", "bar" (with "foo" as parent), and create "baz" repository with
742 "bar" as group. This command can be executed only using api_key belonging to user with admin
743 743 rights or regular user that have create repository permission. Regular users
744 744 cannot specify owner parameter
745 745
746 746
747 747 INPUT::
748 748
749 749 id : <id_for_response>
750 750 api_key : "<api_key>"
751 751 method : "create_repo"
752 752 args: {
753 753 "repo_name" : "<reponame>",
754 754 "owner" : "<onwer_name_or_id = Optional(=apiuser)>",
755 755 "repo_type" : "<repo_type> = Optional('hg')",
756 756 "description" : "<description> = Optional('')",
757 757 "private" : "<bool> = Optional(False)",
758 758 "clone_uri" : "<clone_uri> = Optional(None)",
759 759 "landing_rev" : "<landing_rev> = Optional('tip')",
760 760 "enable_downloads": "<bool> = Optional(False)",
761 761 "enable_locking": "<bool> = Optional(False)",
762 762 "enable_statistics": "<bool> = Optional(False)",
763 763 }
764 764
765 765 OUTPUT::
766 766
767 767 id : <id_given_in_input>
768 768 result: {
769 769 "msg": "Created new repository `<reponame>`",
770 770 "repo": {
771 771 "repo_id" : "<repo_id>",
772 772 "repo_name" : "<reponame>"
773 773 "repo_type" : "<repo_type>",
774 774 "clone_uri" : "<clone_uri>",
775 775 "private": : "<bool>",
776 "created_on" : "<datetimecreated>",
776 "created_on" : "<datetimecreated>",
777 777 "description" : "<description>",
778 778 "landing_rev": "<landing_rev>",
779 779 "owner": "<username or user_id>",
780 780 "fork_of": "<name_of_fork_parent>",
781 781 "enable_downloads": "<bool>",
782 782 "enable_locking": "<bool>",
783 "enable_statistics": "<bool>",
783 "enable_statistics": "<bool>",
784 784 },
785 785 }
786 786 error: null
787 787
788 788
789 789 fork_repo
790 790 ---------
791 791
792 792 Creates a fork of given repo. In case of using celery this will
793 793 immidiatelly return success message, while fork is going to be created
794 794 asynchronous. This command can be executed only using api_key belonging to
795 795 user with admin rights or regular user that have fork permission, and at least
796 796 read access to forking repository. Regular users cannot specify owner parameter.
797 797
798 798
799 799 INPUT::
800 800
801 801 id : <id_for_response>
802 802 api_key : "<api_key>"
803 803 method : "fork_repo"
804 804 args: {
805 805 "repoid" : "<reponame or repo_id>",
806 806 "fork_name": "<forkname>",
807 807 "owner": "<username or user_id = Optional(=apiuser)>",
808 808 "description": "<description>",
809 809 "copy_permissions": "<bool>",
810 810 "private": "<bool>",
811 811 "landing_rev": "<landing_rev>"
812
812
813 813 }
814 814
815 815 OUTPUT::
816 816
817 817 id : <id_given_in_input>
818 818 result: {
819 819 "msg": "Created fork of `<reponame>` as `<forkname>`",
820 820 "success": true
821 821 }
822 822 error: null
823 823
824 824
825 825 delete_repo
826 826 -----------
827 827
828 Deletes a repository. This command can be executed only using api_key belonging to user with admin
828 Deletes a repository. This command can be executed only using api_key belonging to user with admin
829 829 rights or regular user that have admin access to repository.
830 830
831 831
832 832 INPUT::
833 833
834 834 id : <id_for_response>
835 835 api_key : "<api_key>"
836 836 method : "delete_repo"
837 837 args: {
838 838 "repoid" : "<reponame or repo_id>"
839 839 }
840 840
841 841 OUTPUT::
842 842
843 843 id : <id_given_in_input>
844 844 result: {
845 845 "msg": "Deleted repository `<reponame>`",
846 846 "success": true
847 847 }
848 848 error: null
849 849
850 850
851 851 grant_user_permission
852 852 ---------------------
853 853
854 854 Grant permission for user on given repository, or update existing one
855 if found. This command can be executed only using api_key belonging to user
855 if found. This command can be executed only using api_key belonging to user
856 856 with admin rights.
857 857
858 858
859 859 INPUT::
860 860
861 861 id : <id_for_response>
862 862 api_key : "<api_key>"
863 863 method : "grant_user_permission"
864 864 args: {
865 865 "repoid" : "<reponame or repo_id>"
866 866 "userid" : "<username or user_id>"
867 867 "perm" : "(repository.(none|read|write|admin))",
868 868 }
869 869
870 870 OUTPUT::
871 871
872 872 id : <id_given_in_input>
873 873 result: {
874 874 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
875 875 "success": true
876 876 }
877 877 error: null
878 878
879 879
880 880 revoke_user_permission
881 881 ----------------------
882 882
883 Revoke permission for user on given repository. This command can be executed
883 Revoke permission for user on given repository. This command can be executed
884 884 only using api_key belonging to user with admin rights.
885 885
886 886
887 887 INPUT::
888 888
889 889 id : <id_for_response>
890 890 api_key : "<api_key>"
891 891 method : "revoke_user_permission"
892 892 args: {
893 893 "repoid" : "<reponame or repo_id>"
894 894 "userid" : "<username or user_id>"
895 895 }
896 896
897 897 OUTPUT::
898 898
899 899 id : <id_given_in_input>
900 900 result: {
901 901 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
902 902 "success": true
903 903 }
904 904 error: null
905 905
906 906
907 907 grant_users_group_permission
908 908 ----------------------------
909 909
910 910 Grant permission for users group on given repository, or update
911 existing one if found. This command can be executed only using
911 existing one if found. This command can be executed only using
912 912 api_key belonging to user with admin rights.
913 913
914 914
915 915 INPUT::
916 916
917 917 id : <id_for_response>
918 918 api_key : "<api_key>"
919 919 method : "grant_users_group_permission"
920 920 args: {
921 921 "repoid" : "<reponame or repo_id>"
922 922 "usersgroupid" : "<users group id or name>"
923 923 "perm" : "(repository.(none|read|write|admin))",
924 924 }
925 925
926 926 OUTPUT::
927 927
928 928 id : <id_given_in_input>
929 929 result: {
930 930 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
931 931 "success": true
932 932 }
933 933 error: null
934
935
934
935
936 936 revoke_users_group_permission
937 937 -----------------------------
938 938
939 Revoke permission for users group on given repository.This command can be
939 Revoke permission for users group on given repository.This command can be
940 940 executed only using api_key belonging to user with admin rights.
941 941
942 942 INPUT::
943 943
944 944 id : <id_for_response>
945 945 api_key : "<api_key>"
946 946 method : "revoke_users_group_permission"
947 947 args: {
948 948 "repoid" : "<reponame or repo_id>"
949 949 "usersgroupid" : "<users group id or name>"
950 950 }
951 951
952 952 OUTPUT::
953 953
954 954 id : <id_given_in_input>
955 955 result: {
956 956 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
957 957 "success": true
958 958 }
959 error: null No newline at end of file
959 error: null
@@ -1,35 +1,35 b''
1 1 .. _models:
2 2
3 3 ========================
4 4 The :mod:`models` Module
5 5 ========================
6 6
7 7 .. automodule:: rhodecode.model
8 8 :members:
9
9
10 10 .. automodule:: rhodecode.model.comment
11 11 :members:
12
12
13 13 .. automodule:: rhodecode.model.notification
14 :members:
14 :members:
15 15
16 16 .. automodule:: rhodecode.model.permission
17 17 :members:
18 18
19 19 .. automodule:: rhodecode.model.repo_permission
20 :members:
20 :members:
21 21
22 22 .. automodule:: rhodecode.model.repo
23 :members:
23 :members:
24 24
25 25 .. automodule:: rhodecode.model.repos_group
26 26 :members:
27
27
28 28 .. automodule:: rhodecode.model.scm
29 29 :members:
30
30
31 31 .. automodule:: rhodecode.model.user
32 :members:
33
32 :members:
33
34 34 .. automodule:: rhodecode.model.users_group
35 :members: No newline at end of file
35 :members:
@@ -1,949 +1,949 b''
1 1 .. _changelog:
2 2
3 3 =========
4 4 Changelog
5 5 =========
6 6
7 7 1.5.3 (**2013-XX-XX**)
8 8 ----------------------
9 9
10 10 :status: in-progress
11 11 :branch: beta
12 12
13 13 news
14 14 ++++
15 15
16 16 fixes
17 17 +++++
18 18
19 19
20 20 1.5.2 (**2013-01-14**)
21 21 ----------------------
22 22
23 23 news
24 24 ++++
25 25
26 26 - IP restrictions for users. Each user can get a set of whitelist IP+mask for
27 27 extra protection. Useful for buildbots etc.
28 28 - added full last changeset info to lightweight dashboard. lightweight dashboard
29 29 is now fully functional replacement of original dashboard.
30 30 - implemented certain API calls for non-admin users.
31 31 - enabled all Markdown Extra plugins
32 32 - implemented #725 Pull Request View - Show origin repo URL
33 33 - show comments from pull requests into associated changesets
34 34
35 35 fixes
36 36 +++++
37 37
38 38 - update repoinfo script is more failsafe
39 39 - fixed #687 Lazy loaded tooltip bug with simultaneous ajax requests
40 40 - fixed #691: Notifications for pull requests: move link to top for better
41 41 readability
42 42 - fixed #699: fix missing fork docs for API
43 43 - fixed #693 Opening changeset from pull request fails
44 44 - fixed #710 File view stripping empty lines from beginning and end of file
45 45 - fixed issues with getting repos by path on windows, caused GIT hooks to fail
46 46 - fixed issues with groups paginator on main dashboard
47 47 - improved fetch/pull command for git repos, now pulling all refs
48 48 - fixed issue #719 Journal revision ID tooltip AJAX query path is incorrect
49 49 when running in a subdir
50 50 - fixed issue #702 API methods without arguments fail when "args":null
51 51 - set the status of changesets initially on pull request. Fixes issues #690 and #587
52 52
53 53 1.5.1 (**2012-12-13**)
54 54 ----------------------
55 55
56 56 news
57 57 ++++
58 58
59 - implements #677: Don't allow to close pull requests when they are
59 - implements #677: Don't allow to close pull requests when they are
60 60 under-review status
61 61 - implemented #670 Implementation of Roles in Pull Request
62 62
63 63 fixes
64 64 +++++
65 65
66 66 - default permissions can get duplicated after migration
67 67 - fixed changeset status labels, they now select radio buttons
68 68 - #682 translation difficult for multi-line text
69 69 - #683 fixed difference between messages about not mapped repositories
70 70 - email: fail nicely when no SMTP server has been configured
71 71
72 72 1.5.0 (**2012-12-12**)
73 73 ----------------------
74 74
75 75 news
76 76 ++++
77 77
78 78 - new rewritten from scratch diff engine. 10x faster in edge cases. Handling
79 79 of file renames, copies, change flags and binary files
80 80 - added lightweight dashboard option. ref #500. New version of dashboard
81 81 page that doesn't use any VCS data and is super fast to render. Recommended
82 82 for large amount of repositories.
83 83 - implements #648 write Script for updating last modification time for
84 84 lightweight dashboard
85 85 - implemented compare engine for git repositories.
86 86 - LDAP failover, option to specify multiple servers
87 87 - added Errormator and Sentry support for monitoring RhodeCode
88 88 - implemented #628: Pass server URL to rc-extensions hooks
89 89 - new tooltip implementation - added lazy loading of changesets from journal
90 90 pages. This can significantly improve speed of rendering the page
91 91 - implements #632,added branch/tag/bookmarks info into feeds
92 92 added changeset link to body of message
93 93 - implemented #638 permissions overview to groups
94 94 - implements #636, lazy loading of history and authors to speed up source
95 95 pages rendering
96 - implemented #647, option to pass list of default encoding used to
96 - implemented #647, option to pass list of default encoding used to
97 97 encode to/decode from unicode
98 98 - added caching layer into RSS/ATOM feeds.
99 99 - basic implementation of cherry picking changesets for pull request, ref #575
100 100 - implemented #661 Add option to include diff in RSS feed
101 101 - implemented file history page for showing detailed changelog for a given file
102 102 - implemented #663 Admin/permission: specify default repogroup perms
103 103 - implemented #379 defaults settings page for creation of repositories, locking
104 104 statistics, downloads, repository type
105 105 - implemented #210 filtering of admin journal based on Whoosh Query language
106 106 - added parents/children links in changeset viewref #650
107 107
108 108 fixes
109 109 +++++
110 110
111 111 - fixed git version checker
112 112 - #586 patched basic auth handler to fix issues with git behind proxy
113 113 - #589 search urlgenerator didn't properly escape special characters
114 114 - fixed issue #614 Include repo name in delete confirmation dialog
115 115 - fixed #623: Lang meta-tag doesn't work with C#/C++
116 116 - fixes #612 Double quotes to Single quotes result in bad html in diff
117 117 - fixes #630 git statistics do too much work making them slow.
118 118 - fixes #625 Git-Tags are not displayed in Shortlog
119 - fix for issue #602, enforce str when setting mercurial UI object.
119 - fix for issue #602, enforce str when setting mercurial UI object.
120 120 When this is used together with mercurial internal translation system
121 121 it can lead to UnicodeDecodeErrors
122 122 - fixes #645 Fix git handler when doing delete remote branch
123 123 - implements #649 added two seperate method for author and commiter to VCS
124 124 changeset class switch author for git backed to be the real author not commiter
125 125 - fix issue #504 RhodeCode is showing different versions of README on
126 126 different summary page loads
127 127 - implemented #658 Changing username in LDAP-Mode should not be allowed.
128 128 - fixes #652 switch to generator approach when doing file annotation to prevent
129 huge memory consumption
129 huge memory consumption
130 130 - fixes #666 move lockkey path location to cache_dir to ensure this path is
131 131 always writable for rhodecode server
132 132 - many more small fixes and improvements
133 133 - fixed issues with recursive scans on removed repositories that could take
134 134 long time on instance start
135 135
136 136 1.4.4 (**2012-10-08**)
137 137 ----------------------
138 138
139 139 news
140 140 ++++
141 141
142 142 - obfuscate db password in logs for engine connection string
143 143 - #574 Show pull request status also in shortlog (if any)
144 144 - remember selected tab in my account page
145 145 - Bumped mercurial version to 2.3.2
146 146 - #595 rcextension hook for repository delete
147 147
148 148 fixes
149 149 +++++
150 150
151 151 - Add git version detection to warn users that Git used in system is to
152 152 old. Ref #588 - also show git version in system details in settings page
153 153 - fixed files quick filter links
154 154 - #590 Add GET flag that controls the way the diff are generated, for pull
155 155 requests we want to use non-bundle based diffs, That are far better for
156 156 doing code reviews. The /compare url still uses bundle compare for full
157 157 comparison including the incoming changesets
158 158 - Fixed #585, checks for status of revision where to strict, and made
159 159 opening pull request with those revision impossible due to previously set
160 160 status. Checks now are made also for the repository.
161 161 - fixes #591 git backend was causing encoding errors when handling binary
162 162 files - added a test case for VCS lib tests
163 163 - fixed #597 commits in future get negative age.
164 164 - fixed #598 API docs methods had wrong members parameter as returned data
165 165
166 166 1.4.3 (**2012-09-28**)
167 167 ----------------------
168 168
169 169 news
170 170 ++++
171 171
172 172 - #558 Added config file to hooks extra data
173 173 - bumped mercurial version to 2.3.1
174 174 - #518 added possibility of specifying multiple patterns for issues
175 175 - update codemirror to latest version
176 176
177 177 fixes
178 178 +++++
179 179
180 180 - fixed #570 explicit users group permissions can overwrite owner permissions
181 181 - fixed #578 set proper PATH with current Python for Git
182 hooks to execute within same Python as RhodeCode
182 hooks to execute within same Python as RhodeCode
183 183 - fixed issue with Git bare repos that ends with .git in name
184 184
185 185 1.4.2 (**2012-09-12**)
186 186 ----------------------
187 187
188 188 news
189 189 ++++
190 190
191 191 - added option to menu to quick lock/unlock repository for users that have
192 192 write access to
193 193 - Implemented permissions for writing to repo
194 194 groups. Now only write access to group allows to create a repostiory
195 195 within that group
196 196 - #565 Add support for {netloc} and {scheme} to alternative_gravatar_url
197 - updated translation for zh_CN
197 - updated translation for zh_CN
198 198
199 199 fixes
200 200 +++++
201 201
202 202 - fixed visual permissions check on repos groups inside groups
203 203 - fixed issues with non-ascii search terms in search, and indexers
204 204 - fixed parsing of page number in GET parameters
205 205 - fixed issues with generating pull-request overview for repos with
206 206 bookmarks and tags, also preview doesn't loose chosen revision from
207 207 select dropdown
208 208
209 209 1.4.1 (**2012-09-07**)
210 210 ----------------------
211 211
212 212 news
213 213 ++++
214 214
215 215 - always put a comment about code-review status change even if user send
216 empty data
216 empty data
217 217 - modified_on column saves repository update and it's going to be used
218 218 later for light version of main page ref #500
219 219 - pull request notifications send much nicer emails with details about pull
220 220 request
221 221 - #551 show breadcrumbs in summary view for repositories inside a group
222 222
223 223 fixes
224 224 +++++
225 225
226 226 - fixed migrations of permissions that can lead to inconsistency.
227 Some users sent feedback that after upgrading from older versions issues
227 Some users sent feedback that after upgrading from older versions issues
228 228 with updating default permissions occurred. RhodeCode detects that now and
229 229 resets default user permission to initial state if there is a need for that.
230 Also forces users to set the default value for new forking permission.
230 Also forces users to set the default value for new forking permission.
231 231 - #535 improved apache wsgi example configuration in docs
232 232 - fixes #550 mercurial repositories comparision failed when origin repo had
233 233 additional not-common changesets
234 234 - fixed status of code-review in preview windows of pull request
235 235 - git forks were not initialized at bare repos
236 236 - fixes #555 fixes issues with comparing non-related repositories
237 237 - fixes #557 follower counter always counts up
238 238 - fixed issue #560 require push ssl checkbox wasn't shown when option was
239 239 enabled
240 240 - fixed #559
241 241 - fixed issue #559 fixed bug in routing that mapped repo names with <name>_<num> in name as
242 242 if it was a request to url by repository ID
243 243
244 244 1.4.0 (**2012-09-03**)
245 245 ----------------------
246 246
247 247 news
248 248 ++++
249
249
250 250 - new codereview system
251 251 - email map, allowing users to have multiple email addresses mapped into
252 252 their accounts
253 253 - improved git-hook system. Now all actions for git are logged into journal
254 254 including pushed revisions, user and IP address
255 255 - changed setup-app into setup-rhodecode and added default options to it.
256 256 - new git repos are created as bare now by default
257 257 - #464 added links to groups in permission box
258 258 - #465 mentions autocomplete inside comments boxes
259 259 - #469 added --update-only option to whoosh to re-index only given list
260 of repos in index
260 of repos in index
261 261 - rhodecode-api CLI client
262 262 - new git http protocol replaced buggy dulwich implementation.
263 263 Now based on pygrack & gitweb
264 - Improved RSS/ATOM feeds. Discoverable by browsers using proper headers, and
264 - Improved RSS/ATOM feeds. Discoverable by browsers using proper headers, and
265 265 reformated based on user suggestions. Additional rss/atom feeds for user
266 266 journal
267 267 - various i18n improvements
268 268 - #478 permissions overview for admin in user edit view
269 269 - File view now displays small gravatars off all authors of given file
270 270 - Implemented landing revisions. Each repository will get landing_rev attribute
271 271 that defines 'default' revision/branch for generating readme files
272 - Implemented #509, RhodeCode enforces SSL for push/pulling if requested at
272 - Implemented #509, RhodeCode enforces SSL for push/pulling if requested at
273 273 earliest possible call.
274 274 - Import remote svn repositories to mercurial using hgsubversion.
275 275 - Fixed #508 RhodeCode now has a option to explicitly set forking permissions
276 276 - RhodeCode can use alternative server for generating avatar icons
277 277 - implemented repositories locking. Pull locks, push unlocks. Also can be done
278 278 via API calls
279 - #538 form for permissions can handle multiple users at once
279 - #538 form for permissions can handle multiple users at once
280 280
281 281 fixes
282 282 +++++
283 283
284 284 - improved translations
285 285 - fixes issue #455 Creating an archive generates an exception on Windows
286 - fixes #448 Download ZIP archive keeps file in /tmp open and results
286 - fixes #448 Download ZIP archive keeps file in /tmp open and results
287 287 in out of disk space
288 288 - fixes issue #454 Search results under Windows include proceeding
289 289 backslash
290 290 - fixed issue #450. Rhodecode no longer will crash when bad revision is
291 291 present in journal data.
292 292 - fix for issue #417, git execution was broken on windows for certain
293 293 commands.
294 294 - fixed #413. Don't disable .git directory for bare repos on deleting
295 295 - fixed issue #459. Changed the way of obtaining logger in reindex task.
296 296 - fixed #453 added ID field in whoosh SCHEMA that solves the issue of
297 297 reindexing modified files
298 - fixed #481 rhodecode emails are sent without Date header
298 - fixed #481 rhodecode emails are sent without Date header
299 299 - fixed #458 wrong count when no repos are present
300 - fixed issue #492 missing `\ No newline at end of file` test at the end of
300 - fixed issue #492 missing `\ No newline at end of file` test at the end of
301 301 new chunk in html diff
302 302 - full text search now works also for commit messages
303 303
304 304 1.3.6 (**2012-05-17**)
305 305 ----------------------
306 306
307 307 news
308 308 ++++
309 309
310 310 - chinese traditional translation
311 - changed setup-app into setup-rhodecode and added arguments for auto-setup
312 mode that doesn't need user interaction
311 - changed setup-app into setup-rhodecode and added arguments for auto-setup
312 mode that doesn't need user interaction
313 313
314 314 fixes
315 315 +++++
316 316
317 317 - fixed no scm found warning
318 318 - fixed __future__ import error on rcextensions
319 319 - made simplejson required lib for speedup on JSON encoding
320 320 - fixes #449 bad regex could get more than revisions from parsing history
321 321 - don't clear DB session when CELERY_EAGER is turned ON
322 322
323 323 1.3.5 (**2012-05-10**)
324 324 ----------------------
325 325
326 326 news
327 327 ++++
328 328
329 329 - use ext_json for json module
330 330 - unified annotation view with file source view
331 331 - notification improvements, better inbox + css
332 - #419 don't strip passwords for login forms, make rhodecode
332 - #419 don't strip passwords for login forms, make rhodecode
333 333 more compatible with LDAP servers
334 - Added HTTP_X_FORWARDED_FOR as another method of extracting
335 IP for pull/push logs. - moved all to base controller
336 - #415: Adding comment to changeset causes reload.
334 - Added HTTP_X_FORWARDED_FOR as another method of extracting
335 IP for pull/push logs. - moved all to base controller
336 - #415: Adding comment to changeset causes reload.
337 337 Comments are now added via ajax and doesn't reload the page
338 338 - #374 LDAP config is discarded when LDAP can't be activated
339 339 - limited push/pull operations are now logged for git in the journal
340 340 - bumped mercurial to 2.2.X series
341 341 - added support for displaying submodules in file-browser
342 342 - #421 added bookmarks in changelog view
343 343
344 344 fixes
345 345 +++++
346 346
347 347 - fixed dev-version marker for stable when served from source codes
348 348 - fixed missing permission checks on show forks page
349 349 - #418 cast to unicode fixes in notification objects
350 350 - #426 fixed mention extracting regex
351 351 - fixed remote-pulling for git remotes remopositories
352 - fixed #434: Error when accessing files or changesets of a git repository
352 - fixed #434: Error when accessing files or changesets of a git repository
353 353 with submodules
354 354 - fixed issue with empty APIKEYS for users after registration ref. #438
355 355 - fixed issue with getting README files from git repositories
356 356
357 357 1.3.4 (**2012-03-28**)
358 358 ----------------------
359 359
360 360 news
361 361 ++++
362 362
363 363 - Whoosh logging is now controlled by the .ini files logging setup
364 364 - added clone-url into edit form on /settings page
365 365 - added help text into repo add/edit forms
366 366 - created rcextensions module with additional mappings (ref #322) and
367 367 post push/pull/create repo hooks callbacks
368 368 - implemented #377 Users view for his own permissions on account page
369 369 - #399 added inheritance of permissions for users group on repos groups
370 - #401 repository group is automatically pre-selected when adding repos
370 - #401 repository group is automatically pre-selected when adding repos
371 371 inside a repository group
372 - added alternative HTTP 403 response when client failed to authenticate. Helps
372 - added alternative HTTP 403 response when client failed to authenticate. Helps
373 373 solving issues with Mercurial and LDAP
374 - #402 removed group prefix from repository name when listing repositories
374 - #402 removed group prefix from repository name when listing repositories
375 375 inside a group
376 376 - added gravatars into permission view and permissions autocomplete
377 - #347 when running multiple RhodeCode instances, properly invalidates cache
377 - #347 when running multiple RhodeCode instances, properly invalidates cache
378 378 for all registered servers
379 379
380 380 fixes
381 381 +++++
382 382
383 383 - fixed #390 cache invalidation problems on repos inside group
384 384 - fixed #385 clone by ID url was loosing proxy prefix in URL
385 385 - fixed some unicode problems with waitress
386 386 - fixed issue with escaping < and > in changeset commits
387 - fixed error occurring during recursive group creation in API
387 - fixed error occurring during recursive group creation in API
388 388 create_repo function
389 389 - fixed #393 py2.5 fixes for routes url generator
390 390 - fixed #397 Private repository groups shows up before login
391 391 - fixed #396 fixed problems with revoking users in nested groups
392 - fixed mysql unicode issues + specified InnoDB as default engine with
392 - fixed mysql unicode issues + specified InnoDB as default engine with
393 393 utf8 charset
394 394 - #406 trim long branch/tag names in changelog to not break UI
395
395
396 396 1.3.3 (**2012-03-02**)
397 397 ----------------------
398 398
399 399 news
400 400 ++++
401 401
402 402
403 403 fixes
404 404 +++++
405 405
406 - fixed some python2.5 compatibility issues
406 - fixed some python2.5 compatibility issues
407 407 - fixed issues with removed repos was accidentally added as groups, after
408 408 full rescan of paths
409 409 - fixes #376 Cannot edit user (using container auth)
410 - fixes #378 Invalid image urls on changeset screen with proxy-prefix
410 - fixes #378 Invalid image urls on changeset screen with proxy-prefix
411 411 configuration
412 412 - fixed initial sorting of repos inside repo group
413 413 - fixes issue when user tried to resubmit same permission into user/user_groups
414 414 - bumped beaker version that fixes #375 leap error bug
415 415 - fixed raw_changeset for git. It was generated with hg patch headers
416 416 - fixed vcs issue with last_changeset for filenodes
417 417 - fixed missing commit after hook delete
418 - fixed #372 issues with git operation detection that caused a security issue
418 - fixed #372 issues with git operation detection that caused a security issue
419 419 for git repos
420 420
421 421 1.3.2 (**2012-02-28**)
422 422 ----------------------
423 423
424 424 news
425 425 ++++
426 426
427 427
428 428 fixes
429 429 +++++
430 430
431 431 - fixed git protocol issues with repos-groups
432 432 - fixed git remote repos validator that prevented from cloning remote git repos
433 433 - fixes #370 ending slashes fixes for repo and groups
434 434 - fixes #368 improved git-protocol detection to handle other clients
435 - fixes #366 When Setting Repository Group To Blank Repo Group Wont Be
435 - fixes #366 When Setting Repository Group To Blank Repo Group Wont Be
436 436 Moved To Root
437 - fixes #371 fixed issues with beaker/sqlalchemy and non-ascii cache keys
437 - fixes #371 fixed issues with beaker/sqlalchemy and non-ascii cache keys
438 438 - fixed #373 missing cascade drop on user_group_to_perm table
439 439
440 440 1.3.1 (**2012-02-27**)
441 441 ----------------------
442 442
443 443 news
444 444 ++++
445 445
446 446
447 447 fixes
448 448 +++++
449 449
450 450 - redirection loop occurs when remember-me wasn't checked during login
451 - fixes issues with git blob history generation
451 - fixes issues with git blob history generation
452 452 - don't fetch branch for git in file history dropdown. Causes unneeded slowness
453 453
454 454 1.3.0 (**2012-02-26**)
455 455 ----------------------
456 456
457 457 news
458 458 ++++
459 459
460 - code review, inspired by github code-comments
460 - code review, inspired by github code-comments
461 461 - #215 rst and markdown README files support
462 462 - #252 Container-based and proxy pass-through authentication support
463 463 - #44 branch browser. Filtering of changelog by branches
464 464 - mercurial bookmarks support
465 465 - new hover top menu, optimized to add maximum size for important views
466 - configurable clone url template with possibility to specify protocol like
466 - configurable clone url template with possibility to specify protocol like
467 467 ssh:// or http:// and also manually alter other parts of clone_url.
468 468 - enabled largefiles extension by default
469 469 - optimized summary file pages and saved a lot of unused space in them
470 470 - #239 option to manually mark repository as fork
471 471 - #320 mapping of commit authors to RhodeCode users
472 - #304 hashes are displayed using monospace font
472 - #304 hashes are displayed using monospace font
473 473 - diff configuration, toggle white lines and context lines
474 474 - #307 configurable diffs, whitespace toggle, increasing context lines
475 475 - sorting on branches, tags and bookmarks using YUI datatable
476 476 - improved file filter on files page
477 477 - implements #330 api method for listing nodes ar particular revision
478 478 - #73 added linking issues in commit messages to chosen issue tracker url
479 479 based on user defined regular expression
480 - added linking of changesets in commit messages
480 - added linking of changesets in commit messages
481 481 - new compact changelog with expandable commit messages
482 482 - firstname and lastname are optional in user creation
483 483 - #348 added post-create repository hook
484 - #212 global encoding settings is now configurable from .ini files
484 - #212 global encoding settings is now configurable from .ini files
485 485 - #227 added repository groups permissions
486 486 - markdown gets codehilite extensions
487 - new API methods, delete_repositories, grante/revoke permissions for groups
487 - new API methods, delete_repositories, grante/revoke permissions for groups
488 488 and repos
489
490
489
490
491 491 fixes
492 492 +++++
493 493
494 494 - rewrote dbsession management for atomic operations, and better error handling
495 495 - fixed sorting of repo tables
496 496 - #326 escape of special html entities in diffs
497 497 - normalized user_name => username in api attributes
498 - fixes #298 ldap created users with mixed case emails created conflicts
498 - fixes #298 ldap created users with mixed case emails created conflicts
499 499 on saving a form
500 - fixes issue when owner of a repo couldn't revoke permissions for users
500 - fixes issue when owner of a repo couldn't revoke permissions for users
501 501 and groups
502 502 - fixes #271 rare JSON serialization problem with statistics
503 503 - fixes #337 missing validation check for conflicting names of a group with a
504 504 repositories group
505 505 - #340 fixed session problem for mysql and celery tasks
506 - fixed #331 RhodeCode mangles repository names if the a repository group
506 - fixed #331 RhodeCode mangles repository names if the a repository group
507 507 contains the "full path" to the repositories
508 508 - #355 RhodeCode doesn't store encrypted LDAP passwords
509 509
510 510 1.2.5 (**2012-01-28**)
511 511 ----------------------
512 512
513 513 news
514 514 ++++
515 515
516 516 fixes
517 517 +++++
518 518
519 519 - #340 Celery complains about MySQL server gone away, added session cleanup
520 520 for celery tasks
521 521 - #341 "scanning for repositories in None" log message during Rescan was missing
522 522 a parameter
523 523 - fixed creating archives with subrepos. Some hooks were triggered during that
524 524 operation leading to crash.
525 525 - fixed missing email in account page.
526 526 - Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
527 forking on windows impossible
527 forking on windows impossible
528 528
529 529 1.2.4 (**2012-01-19**)
530 530 ----------------------
531 531
532 532 news
533 533 ++++
534 534
535 535 - RhodeCode is bundled with mercurial series 2.0.X by default, with
536 536 full support to largefiles extension. Enabled by default in new installations
537 537 - #329 Ability to Add/Remove Groups to/from a Repository via AP
538 538 - added requires.txt file with requirements
539
539
540 540 fixes
541 541 +++++
542 542
543 543 - fixes db session issues with celery when emailing admins
544 - #331 RhodeCode mangles repository names if the a repository group
544 - #331 RhodeCode mangles repository names if the a repository group
545 545 contains the "full path" to the repositories
546 546 - #298 Conflicting e-mail addresses for LDAP and RhodeCode users
547 547 - DB session cleanup after hg protocol operations, fixes issues with
548 548 `mysql has gone away` errors
549 549 - #333 doc fixes for get_repo api function
550 550 - #271 rare JSON serialization problem with statistics enabled
551 - #337 Fixes issues with validation of repository name conflicting with
551 - #337 Fixes issues with validation of repository name conflicting with
552 552 a group name. A proper message is now displayed.
553 553 - #292 made ldap_dn in user edit readonly, to get rid of confusion that field
554 doesn't work
555 - #316 fixes issues with web description in hgrc files
554 doesn't work
555 - #316 fixes issues with web description in hgrc files
556 556
557 557 1.2.3 (**2011-11-02**)
558 558 ----------------------
559 559
560 560 news
561 561 ++++
562 562
563 563 - added option to manage repos group for non admin users
564 - added following API methods for get_users, create_user, get_users_groups,
565 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
564 - added following API methods for get_users, create_user, get_users_groups,
565 get_users_group, create_users_group, add_user_to_users_groups, get_repos,
566 566 get_repo, create_repo, add_user_to_repo
567 - implements #237 added password confirmation for my account
567 - implements #237 added password confirmation for my account
568 568 and admin edit user.
569 569 - implements #291 email notification for global events are now sent to all
570 570 administrator users, and global config email.
571
571
572 572 fixes
573 573 +++++
574 574
575 575 - added option for passing auth method for smtp mailer
576 576 - #276 issue with adding a single user with id>10 to usergroups
577 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
577 - #277 fixes windows LDAP settings in which missing values breaks the ldap auth
578 578 - #288 fixes managing of repos in a group for non admin user
579 579
580 580 1.2.2 (**2011-10-17**)
581 581 ----------------------
582 582
583 583 news
584 584 ++++
585 585
586 586 - #226 repo groups are available by path instead of numerical id
587
587
588 588 fixes
589 589 +++++
590 590
591 591 - #259 Groups with the same name but with different parent group
592 592 - #260 Put repo in group, then move group to another group -> repo becomes unavailable
593 593 - #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
594 - #265 ldap save fails sometimes on converting attributes to booleans,
594 - #265 ldap save fails sometimes on converting attributes to booleans,
595 595 added getter and setter into model that will prevent from this on db model level
596 596 - fixed problems with timestamps issues #251 and #213
597 - fixes #266 RhodeCode allows to create repo with the same name and in
597 - fixes #266 RhodeCode allows to create repo with the same name and in
598 598 the same parent as group
599 599 - fixes #245 Rescan of the repositories on Windows
600 600 - fixes #248 cannot edit repos inside a group on windows
601 601 - fixes #219 forking problems on windows
602 602
603 603 1.2.1 (**2011-10-08**)
604 604 ----------------------
605 605
606 606 news
607 607 ++++
608 608
609 609
610 610 fixes
611 611 +++++
612 612
613 - fixed problems with basic auth and push problems
613 - fixed problems with basic auth and push problems
614 614 - gui fixes
615 615 - fixed logger
616 616
617 617 1.2.0 (**2011-10-07**)
618 618 ----------------------
619 619
620 620 news
621 621 ++++
622 622
623 623 - implemented #47 repository groups
624 624 - implemented #89 Can setup google analytics code from settings menu
625 625 - implemented #91 added nicer looking archive urls with more download options
626 626 like tags, branches
627 627 - implemented #44 into file browsing, and added follow branch option
628 628 - implemented #84 downloads can be enabled/disabled for each repository
629 629 - anonymous repository can be cloned without having to pass default:default
630 630 into clone url
631 - fixed #90 whoosh indexer can index chooses repositories passed in command
631 - fixed #90 whoosh indexer can index chooses repositories passed in command
632 632 line
633 633 - extended journal with day aggregates and paging
634 634 - implemented #107 source code lines highlight ranges
635 - implemented #93 customizable changelog on combined revision ranges -
636 equivalent of githubs compare view
635 - implemented #93 customizable changelog on combined revision ranges -
636 equivalent of githubs compare view
637 637 - implemented #108 extended and more powerful LDAP configuration
638 638 - implemented #56 users groups
639 639 - major code rewrites optimized codes for speed and memory usage
640 640 - raw and diff downloads are now in git format
641 641 - setup command checks for write access to given path
642 642 - fixed many issues with international characters and unicode. It uses utf8
643 643 decode with replace to provide less errors even with non utf8 encoded strings
644 644 - #125 added API KEY access to feeds
645 - #109 Repository can be created from external Mercurial link (aka. remote
645 - #109 Repository can be created from external Mercurial link (aka. remote
646 646 repository, and manually updated (via pull) from admin panel
647 647 - beta git support - push/pull server + basic view for git repos
648 648 - added followers page and forks page
649 - server side file creation (with binary file upload interface)
650 and edition with commits powered by codemirror
651 - #111 file browser file finder, quick lookup files on whole file tree
649 - server side file creation (with binary file upload interface)
650 and edition with commits powered by codemirror
651 - #111 file browser file finder, quick lookup files on whole file tree
652 652 - added quick login sliding menu into main page
653 - changelog uses lazy loading of affected files details, in some scenarios
654 this can improve speed of changelog page dramatically especially for
653 - changelog uses lazy loading of affected files details, in some scenarios
654 this can improve speed of changelog page dramatically especially for
655 655 larger repositories.
656 656 - implements #214 added support for downloading subrepos in download menu.
657 657 - Added basic API for direct operations on rhodecode via JSON
658 658 - Implemented advanced hook management
659 659
660 660 fixes
661 661 +++++
662 662
663 - fixed file browser bug, when switching into given form revision the url was
663 - fixed file browser bug, when switching into given form revision the url was
664 664 not changing
665 665 - fixed propagation to error controller on simplehg and simplegit middlewares
666 666 - fixed error when trying to make a download on empty repository
667 667 - fixed problem with '[' chars in commit messages in journal
668 668 - fixed #99 Unicode errors, on file node paths with non utf-8 characters
669 669 - journal fork fixes
670 670 - removed issue with space inside renamed repository after deletion
671 671 - fixed strange issue on formencode imports
672 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
673 - #150 fixes for errors on repositories mapped in db but corrupted in
672 - fixed #126 Deleting repository on Windows, rename used incompatible chars.
673 - #150 fixes for errors on repositories mapped in db but corrupted in
674 674 filesystem
675 675 - fixed problem with ascendant characters in realm #181
676 676 - fixed problem with sqlite file based database connection pool
677 677 - whoosh indexer and code stats share the same dynamic extensions map
678 678 - fixes #188 - relationship delete of repo_to_perm entry on user removal
679 679 - fixes issue #189 Trending source files shows "show more" when no more exist
680 680 - fixes issue #197 Relative paths for pidlocks
681 681 - fixes issue #198 password will require only 3 chars now for login form
682 682 - fixes issue #199 wrong redirection for non admin users after creating a repository
683 - fixes issues #202, bad db constraint made impossible to attach same group
683 - fixes issues #202, bad db constraint made impossible to attach same group
684 684 more than one time. Affects only mysql/postgres
685 685 - fixes #218 os.kill patch for windows was missing sig param
686 - improved rendering of dag (they are not trimmed anymore when number of
686 - improved rendering of dag (they are not trimmed anymore when number of
687 687 heads exceeds 5)
688
688
689 689 1.1.8 (**2011-04-12**)
690 690 ----------------------
691 691
692 692 news
693 693 ++++
694 694
695 695 - improved windows support
696 696
697 697 fixes
698 698 +++++
699 699
700 700 - fixed #140 freeze of python dateutil library, since new version is python2.x
701 701 incompatible
702 702 - setup-app will check for write permission in given path
703 703 - cleaned up license info issue #149
704 704 - fixes for issues #137,#116 and problems with unicode and accented characters.
705 705 - fixes crashes on gravatar, when passed in email as unicode
706 706 - fixed tooltip flickering problems
707 707 - fixed came_from redirection on windows
708 708 - fixed logging modules, and sql formatters
709 709 - windows fixes for os.kill issue #133
710 710 - fixes path splitting for windows issues #148
711 711 - fixed issue #143 wrong import on migration to 1.1.X
712 712 - fixed problems with displaying binary files, thanks to Thomas Waldmann
713 713 - removed name from archive files since it's breaking ui for long repo names
714 714 - fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
715 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
715 - fixed compatibility for 1024px displays, and larger dpi settings, thanks to
716 716 Thomas Waldmann
717 717 - fixed issue #166 summary pager was skipping 10 revisions on second page
718 718
719 719
720 720 1.1.7 (**2011-03-23**)
721 721 ----------------------
722 722
723 723 news
724 724 ++++
725 725
726 726 fixes
727 727 +++++
728 728
729 729 - fixed (again) #136 installation support for FreeBSD
730 730
731 731
732 732 1.1.6 (**2011-03-21**)
733 733 ----------------------
734 734
735 735 news
736 736 ++++
737 737
738 738 fixes
739 739 +++++
740 740
741 741 - fixed #136 installation support for FreeBSD
742 742 - RhodeCode will check for python version during installation
743 743
744 744 1.1.5 (**2011-03-17**)
745 745 ----------------------
746 746
747 747 news
748 748 ++++
749 749
750 750 - basic windows support, by exchanging pybcrypt into sha256 for windows only
751 751 highly inspired by idea of mantis406
752 752
753 753 fixes
754 754 +++++
755 755
756 756 - fixed sorting by author in main page
757 757 - fixed crashes with diffs on binary files
758 758 - fixed #131 problem with boolean values for LDAP
759 - fixed #122 mysql problems thanks to striker69
760 - fixed problem with errors on calling raw/raw_files/annotate functions
759 - fixed #122 mysql problems thanks to striker69
760 - fixed problem with errors on calling raw/raw_files/annotate functions
761 761 with unknown revisions
762 762 - fixed returned rawfiles attachment names with international character
763 763 - cleaned out docs, big thanks to Jason Harris
764 764
765 765 1.1.4 (**2011-02-19**)
766 766 ----------------------
767 767
768 768 news
769 769 ++++
770 770
771 771 fixes
772 772 +++++
773 773
774 774 - fixed formencode import problem on settings page, that caused server crash
775 775 when that page was accessed as first after server start
776 776 - journal fixes
777 - fixed option to access repository just by entering http://server/<repo_name>
777 - fixed option to access repository just by entering http://server/<repo_name>
778 778
779 779 1.1.3 (**2011-02-16**)
780 780 ----------------------
781 781
782 782 news
783 783 ++++
784 784
785 785 - implemented #102 allowing the '.' character in username
786 786 - added option to access repository just by entering http://server/<repo_name>
787 787 - celery task ignores result for better performance
788 788
789 789 fixes
790 790 +++++
791 791
792 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
792 - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
793 793 apollo13 and Johan Walles
794 794 - small fixes in journal
795 795 - fixed problems with getting setting for celery from .ini files
796 - registration, password reset and login boxes share the same title as main
796 - registration, password reset and login boxes share the same title as main
797 797 application now
798 798 - fixed #113: to high permissions to fork repository
799 799 - fixed problem with '[' chars in commit messages in journal
800 800 - removed issue with space inside renamed repository after deletion
801 801 - db transaction fixes when filesystem repository creation failed
802 802 - fixed #106 relation issues on databases different than sqlite
803 803 - fixed static files paths links to use of url() method
804 804
805 805 1.1.2 (**2011-01-12**)
806 806 ----------------------
807 807
808 808 news
809 809 ++++
810 810
811 811
812 812 fixes
813 813 +++++
814 814
815 815 - fixes #98 protection against float division of percentage stats
816 816 - fixed graph bug
817 - forced webhelpers version since it was making troubles during installation
817 - forced webhelpers version since it was making troubles during installation
818 818
819 819 1.1.1 (**2011-01-06**)
820 820 ----------------------
821
821
822 822 news
823 823 ++++
824 824
825 825 - added force https option into ini files for easier https usage (no need to
826 826 set server headers with this options)
827 827 - small css updates
828 828
829 829 fixes
830 830 +++++
831 831
832 832 - fixed #96 redirect loop on files view on repositories without changesets
833 833 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
834 834 and server crashed with errors
835 835 - fixed large tooltips problems on main page
836 836 - fixed #92 whoosh indexer is more error proof
837 837
838 838 1.1.0 (**2010-12-18**)
839 839 ----------------------
840 840
841 841 news
842 842 ++++
843 843
844 844 - rewrite of internals for vcs >=0.1.10
845 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
845 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility
846 846 with older clients
847 847 - anonymous access, authentication via ldap
848 - performance upgrade for cached repos list - each repository has its own
848 - performance upgrade for cached repos list - each repository has its own
849 849 cache that's invalidated when needed.
850 850 - performance upgrades on repositories with large amount of commits (20K+)
851 851 - main page quick filter for filtering repositories
852 852 - user dashboards with ability to follow chosen repositories actions
853 853 - sends email to admin on new user registration
854 854 - added cache/statistics reset options into repository settings
855 855 - more detailed action logger (based on hooks) with pushed changesets lists
856 856 and options to disable those hooks from admin panel
857 857 - introduced new enhanced changelog for merges that shows more accurate results
858 - new improved and faster code stats (based on pygments lexers mapping tables,
858 - new improved and faster code stats (based on pygments lexers mapping tables,
859 859 showing up to 10 trending sources for each repository. Additionally stats
860 860 can be disabled in repository settings.
861 861 - gui optimizations, fixed application width to 1024px
862 862 - added cut off (for large files/changesets) limit into config files
863 863 - whoosh, celeryd, upgrade moved to paster command
864 864 - other than sqlite database backends can be used
865 865
866 866 fixes
867 867 +++++
868 868
869 869 - fixes #61 forked repo was showing only after cache expired
870 870 - fixes #76 no confirmation on user deletes
871 871 - fixes #66 Name field misspelled
872 872 - fixes #72 block user removal when he owns repositories
873 873 - fixes #69 added password confirmation fields
874 874 - fixes #87 RhodeCode crashes occasionally on updating repository owner
875 875 - fixes #82 broken annotations on files with more than 1 blank line at the end
876 876 - a lot of fixes and tweaks for file browser
877 877 - fixed detached session issues
878 878 - fixed when user had no repos he would see all repos listed in my account
879 - fixed ui() instance bug when global hgrc settings was loaded for server
879 - fixed ui() instance bug when global hgrc settings was loaded for server
880 880 instance and all hgrc options were merged with our db ui() object
881 881 - numerous small bugfixes
882
882
883 883 (special thanks for TkSoh for detailed feedback)
884 884
885 885
886 886 1.0.2 (**2010-11-12**)
887 887 ----------------------
888 888
889 889 news
890 890 ++++
891 891
892 892 - tested under python2.7
893 893 - bumped sqlalchemy and celery versions
894 894
895 895 fixes
896 896 +++++
897 897
898 898 - fixed #59 missing graph.js
899 899 - fixed repo_size crash when repository had broken symlinks
900 900 - fixed python2.5 crashes.
901 901
902 902
903 903 1.0.1 (**2010-11-10**)
904 904 ----------------------
905 905
906 906 news
907 907 ++++
908 908
909 909 - small css updated
910 910
911 911 fixes
912 912 +++++
913 913
914 914 - fixed #53 python2.5 incompatible enumerate calls
915 915 - fixed #52 disable mercurial extension for web
916 916 - fixed #51 deleting repositories don't delete it's dependent objects
917 917
918 918
919 919 1.0.0 (**2010-11-02**)
920 920 ----------------------
921 921
922 922 - security bugfix simplehg wasn't checking for permissions on commands
923 923 other than pull or push.
924 924 - fixed doubled messages after push or pull in admin journal
925 925 - templating and css corrections, fixed repo switcher on chrome, updated titles
926 926 - admin menu accessible from options menu on repository view
927 927 - permissions cached queries
928 928
929 929 1.0.0rc4 (**2010-10-12**)
930 930 --------------------------
931 931
932 932 - fixed python2.5 missing simplejson imports (thanks to Jens BΓ€ckman)
933 933 - removed cache_manager settings from sqlalchemy meta
934 934 - added sqlalchemy cache settings to ini files
935 935 - validated password length and added second try of failure on paster setup-app
936 936 - fixed setup database destroy prompt even when there was no db
937 937
938 938
939 939 1.0.0rc3 (**2010-10-11**)
940 940 -------------------------
941 941
942 942 - fixed i18n during installation.
943 943
944 944 1.0.0rc2 (**2010-10-11**)
945 945 -------------------------
946 946
947 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
947 - Disabled dirsize in file browser, it's causing nasty bug when dir renames
948 948 occure. After vcs is fixed it'll be put back again.
949 949 - templating/css rewrites, optimized css.
@@ -1,38 +1,38 b''
1 1 .. _contributing:
2 2
3 3 =========================
4 4 Contributing to RhodeCode
5 5 =========================
6 6
7 7 If you would like to contribute to RhodeCode, please contact me, any help is
8 8 greatly appreciated!
9 9
10 10 Could I request that you make your source contributions by first forking the
11 11 RhodeCode repository on bitbucket_
12 12 https://bitbucket.org/marcinkuzminski/rhodecode and then make your changes to
13 your forked repository. Please post all fixes into **BETA** branch since your
13 your forked repository. Please post all fixes into **BETA** branch since your
14 14 fix might be already fixed there and i try to merge all fixes from beta into
15 stable, and not the other way. Finally, when you are finished making a change,
15 stable, and not the other way. Finally, when you are finished making a change,
16 16 please send me a pull request.
17 17
18 18 To run RhodeCode in a development version you always need to install the latest
19 19 required libs from `requires.txt` file.
20 20
21 21 after downloading/pulling RhodeCode make sure you run::
22 22
23 23 python setup.py develop
24 24
25 command to install/verify all required packages, and prepare development
25 command to install/verify all required packages, and prepare development
26 26 enviroment.
27 27
28 28
29 29 After finishing your changes make sure all tests passes ok. You can run
30 30 the testsuite running ``nosetest`` from the project root, or if you use tox
31 31 run tox for python2.5-2.7 with multiple database test.
32 32
33 33 | Thank you for any contributions!
34 34 | Marcin
35 35
36 36
37 37
38 38 .. _bitbucket: http://bitbucket.org/
@@ -1,64 +1,64 b''
1 1 .. _index:
2 2
3 3 .. include:: ./../README.rst
4 4
5 5 Users Guide
6 6 -----------
7 7
8 8 **Installation:**
9 9
10 10 .. toctree::
11 11 :maxdepth: 1
12 12
13 13 installation
14 14 setup
15 15 upgrade
16
16
17 17 **Usage**
18 18
19 19 .. toctree::
20 20 :maxdepth: 1
21 21
22 22 usage/general
23 23 usage/git_support
24 24 usage/performance
25 25 usage/locking
26 26 usage/statistics
27 27 usage/backup
28 28 usage/subrepos
29 29 usage/debugging
30 30 usage/troubleshooting
31 31
32 32 **Develop**
33 33
34 34 .. toctree::
35 35 :maxdepth: 1
36
36
37 37 contributing
38 38 changelog
39 39
40 40 **API**
41 41
42 42 .. toctree::
43 43 :maxdepth: 1
44 44
45 45 api/api
46 46 api/models
47
47
48 48
49 49 Other topics
50 50 ------------
51 51
52 52 * :ref:`genindex`
53 53 * :ref:`search`
54 54
55 55 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
56 56 .. _python: http://www.python.org/
57 57 .. _django: http://www.djangoproject.com/
58 58 .. _mercurial: http://mercurial.selenic.com/
59 59 .. _bitbucket: http://bitbucket.org/
60 60 .. _subversion: http://subversion.tigris.org/
61 61 .. _git: http://git-scm.com/
62 62 .. _celery: http://celeryproject.org/
63 63 .. _Sphinx: http://sphinx.pocoo.org/
64 .. _vcs: http://pypi.python.org/pypi/vcs No newline at end of file
64 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -1,133 +1,133 b''
1 1 .. _installation:
2 2
3 3 ============
4 4 Installation
5 5 ============
6 6
7 ``RhodeCode`` is written entirely in Python. Before posting any issues make
8 sure, your not missing any system libraries and using right version of
7 ``RhodeCode`` is written entirely in Python. Before posting any issues make
8 sure, your not missing any system libraries and using right version of
9 9 libraries required by RhodeCode. There's also restriction in terms of mercurial
10 10 clients. Minimal version of hg client known working fine with RhodeCode is
11 11 **1.6**. If you're using older client, please upgrade.
12 12
13 13
14 14 Installing RhodeCode from PyPI (aka "Cheeseshop")
15 15 -------------------------------------------------
16 16
17 17 Rhodecode requires python version 2.5 or higher.
18 18
19 19 The easiest way to install ``rhodecode`` is to run::
20 20
21 21 easy_install rhodecode
22 22
23 23 Or::
24 24
25 25 pip install rhodecode
26 26
27 27 If you prefer to install RhodeCode manually simply grab latest release from
28 28 http://pypi.python.org/pypi/RhodeCode, decompress the archive and run::
29 29
30 30 python setup.py install
31 31
32 32 Step by step installation example for Windows
33 33 ---------------------------------------------
34 34
35 35 :ref:`installation_win`
36 36
37 37
38 38 Step by step installation example for Linux
39 39 -------------------------------------------
40 40
41 41
42 42 For installing RhodeCode i highly recommend using separate virtualenv_. This
43 43 way many required by RhodeCode libraries will remain sandboxed from your main
44 python and making things less problematic when doing system python updates.
44 python and making things less problematic when doing system python updates.
45 45
46 46 Alternative very detailed installation instructions for Ubuntu Server with
47 47 celery, indexer and daemon scripts: https://gist.github.com/4546398
48 48
49 49
50 - Assuming you have installed virtualenv_ create a new virtual environment
51 using virtualenv command::
50 - Assuming you have installed virtualenv_ create a new virtual environment
51 using virtualenv command::
52 52
53 53 virtualenv --no-site-packages /opt/rhodecode-venv
54 54
55 55
56 56 .. note:: Using ``--no-site-packages`` when generating your
57 57 virtualenv is **very important**. This flag provides the necessary
58 58 isolation for running the set of packages required by
59 59 RhodeCode. If you do not specify ``--no-site-packages``,
60 60 it's possible that RhodeCode will not install properly into
61 61 the virtualenv, or, even if it does, may not run properly,
62 62 depending on the packages you've already got installed into your
63 63 Python's "main" site-packages dir.
64 64
65 65
66 - this will install new virtualenv_ into `/opt/rhodecode-venv`.
66 - this will install new virtualenv_ into `/opt/rhodecode-venv`.
67 67 - Activate the virtualenv_ by running::
68 68
69 69 source /opt/rhodecode-venv/bin/activate
70 70
71 71 .. note:: If you're using UNIX, *do not* use ``sudo`` to run the
72 72 ``virtualenv`` script. It's perfectly acceptable (and desirable)
73 73 to create a virtualenv as a normal user.
74
75 - Make a folder for rhodecode data files, and configuration somewhere on the
74
75 - Make a folder for rhodecode data files, and configuration somewhere on the
76 76 filesystem. For example::
77 77
78 78 mkdir /opt/rhodecode
79
80
79
80
81 81 - Go into the created directory run this command to install rhodecode::
82 82
83 83 easy_install rhodecode
84
84
85 85 or::
86
87 pip install rhodecode
88 86
89 - This will install rhodecode together with pylons and all other required
87 pip install rhodecode
88
89 - This will install rhodecode together with pylons and all other required
90 90 python libraries into activated virtualenv
91 91
92 92 Requirements for Celery (optional)
93 93 ----------------------------------
94 94
95 95 In order to gain maximum performance
96 there are some third-party you must install. When RhodeCode is used
96 there are some third-party you must install. When RhodeCode is used
97 97 together with celery you have to install some kind of message broker,
98 98 recommended one is rabbitmq_ to make the async tasks work.
99 99
100 100 Of course RhodeCode works in sync mode also and then you do not have to install
101 any third party applications. However, using Celery_ will give you a large
102 speed improvement when using many big repositories. If you plan to use
103 RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well
101 any third party applications. However, using Celery_ will give you a large
102 speed improvement when using many big repositories. If you plan to use
103 RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well
104 104 without celery running.
105
106 If you make the decision to run RhodeCode with celery make sure you run
107 celeryd using paster and message broker together with the application.
105
106 If you make the decision to run RhodeCode with celery make sure you run
107 celeryd using paster and message broker together with the application.
108 108
109 109 .. note::
110 110 Installing message broker and using celery is optional, RhodeCode will
111 111 work perfectly fine without them.
112 112
113 113
114 **Message Broker**
114 **Message Broker**
115 115
116 116 - preferred is `RabbitMq <http://www.rabbitmq.com/>`_
117 117 - A possible alternative is `Redis <http://code.google.com/p/redis/>`_
118 118
119 For installation instructions you can visit:
119 For installation instructions you can visit:
120 120 http://ask.github.com/celery/getting-started/index.html.
121 121 This is a very nice tutorial on how to start using celery_ with rabbitmq_
122 122
123 123
124 124 You can now proceed to :ref:`setup`
125 125 -----------------------------------
126 126
127 127
128 128
129 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
129 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
130 130 .. _python: http://www.python.org/
131 131 .. _mercurial: http://mercurial.selenic.com/
132 132 .. _celery: http://celeryproject.org/
133 133 .. _rabbitmq: http://www.rabbitmq.com/
@@ -1,250 +1,250 b''
1 1 .. _installation_win:
2 2
3 3
4 4 Step by step Installation for Windows
5 5 =====================================
6 6
7 7
8 RhodeCode step-by-step install Guide for Windows
8 RhodeCode step-by-step install Guide for Windows
9 9
10 Target OS: Windows XP SP3 32bit English (Clean installation)
11 + All Windows Updates until 24-may-2012
10 Target OS: Windows XP SP3 32bit English (Clean installation)
11 + All Windows Updates until 24-may-2012
12 12
13 13 .. note::
14
14
15 15 This installation is for 32bit systems, for 64bit windows you might need
16 16 to download proper 64bit version of "Windows Installer" and Win32py
17 17 extensions
18 18
19 19 Step1 - Install Visual Studio 2008 Express
20 20 ------------------------------------------
21 21
22
23 Optional: You can also install MingW, but VS2008 installation is easier
22
23 Optional: You can also install MingW, but VS2008 installation is easier
24 24
25 Download "Visual C++ 2008 Express Edition with SP1" from:
26 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
27 (if not found or relocated, google for "visual studio 2008 express" for
28 updated link)
25 Download "Visual C++ 2008 Express Edition with SP1" from:
26 http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
27 (if not found or relocated, google for "visual studio 2008 express" for
28 updated link)
29 29
30 You can also download full ISO file for offline installation, just
31 choose "All - Offline Install ISO image file" in the previous page and
32 choose "Visual C++ 2008 Express" when installing.
30 You can also download full ISO file for offline installation, just
31 choose "All - Offline Install ISO image file" in the previous page and
32 choose "Visual C++ 2008 Express" when installing.
33 33
34 34
35 35 .. note::
36 36
37 Silverlight Runtime and SQL Server 2008 Express Edition are not
38 required, you can uncheck them
37 Silverlight Runtime and SQL Server 2008 Express Edition are not
38 required, you can uncheck them
39 39
40 40
41 41 Step2 - Install Python
42 42 ----------------------
43 43
44 44 Install Python 2.x.y (x >= 5) x86 version (32bit). DO NOT USE A 3.x version.
45 Download Python 2.x.y from:
46 http://www.python.org/download/
45 Download Python 2.x.y from:
46 http://www.python.org/download/
47 47
48 Choose "Windows Installer" (32bit version) not "Windows X86-64
49 Installer". While writing this guide, the latest version was v2.7.3.
50 Remember the specific major and minor version installed, because it will
51 be needed in the next step. In this case, it is "2.7".
48 Choose "Windows Installer" (32bit version) not "Windows X86-64
49 Installer". While writing this guide, the latest version was v2.7.3.
50 Remember the specific major and minor version installed, because it will
51 be needed in the next step. In this case, it is "2.7".
52 52
53 53
54 54 Step3 - Install Win32py extensions
55 55 ----------------------------------
56
57 Download pywin32 from:
58 http://sourceforge.net/projects/pywin32/files/
56
57 Download pywin32 from:
58 http://sourceforge.net/projects/pywin32/files/
59 59
60 - Click on "pywin32" folder
61 - Click on the first folder (in this case, Build 217, maybe newer when you try)
62 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
63 version of Python you installed (in this case, 7)
64 When writing this guide, the file was:
65 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
60 - Click on "pywin32" folder
61 - Click on the first folder (in this case, Build 217, maybe newer when you try)
62 - Choose the file ending with ".win32-py2.x.exe" -> x being the minor
63 version of Python you installed (in this case, 7)
64 When writing this guide, the file was:
65 http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download
66 66
67 67
68 68 Step4 - Python BIN
69 69 ------------------
70 70
71 Add Python BIN folder to the path
71 Add Python BIN folder to the path
72 72
73 You have to add the Python folder to the path, you can do it manually
74 (editing "PATH" environment variable) or using Windows Support Tools
75 that came preinstalled in Vista/7 and can be installed in Windows XP.
73 You have to add the Python folder to the path, you can do it manually
74 (editing "PATH" environment variable) or using Windows Support Tools
75 that came preinstalled in Vista/7 and can be installed in Windows XP.
76 76
77 - Using support tools on WINDOWS XP:
78 If you use Windows XP you can install them using Windows XP CD and
79 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
77 - Using support tools on WINDOWS XP:
78 If you use Windows XP you can install them using Windows XP CD and
79 navigating to \SUPPORT\TOOLS. There, execute Setup.EXE (not MSI).
80 80 Afterwards, open a CMD and type::
81
82 SETX PATH "%PATH%;[your-python-path]" -M
81
82 SETX PATH "%PATH%;[your-python-path]" -M
83 83
84 Close CMD (the path variable will be updated then)
84 Close CMD (the path variable will be updated then)
85 85
86 - Using support tools on WINDOWS Vista/7:
86 - Using support tools on WINDOWS Vista/7:
87 87
88 88 Open a CMD and type::
89 89
90 SETX PATH "%PATH%;[your-python-path]" /M
90 SETX PATH "%PATH%;[your-python-path]" /M
91 91
92 Please substitute [your-python-path] with your Python installation path.
93 Typically: C:\\Python27
92 Please substitute [your-python-path] with your Python installation path.
93 Typically: C:\\Python27
94 94
95 95
96 96 Step5 - RhodeCode folder structure
97 97 ----------------------------------
98 98
99 Create a RhodeCode folder structure
99 Create a RhodeCode folder structure
100 100
101 This is only a example to install RhodeCode, you can of course change
102 it. However, this guide will follow the proposed structure, so please
103 later adapt the paths if you change them. My recommendation is to use
104 folders with NO SPACES. But you can try if you are brave...
101 This is only a example to install RhodeCode, you can of course change
102 it. However, this guide will follow the proposed structure, so please
103 later adapt the paths if you change them. My recommendation is to use
104 folders with NO SPACES. But you can try if you are brave...
105 105
106 106 Create the following folder structure::
107 107
108 C:\RhodeCode
109 C:\RhodeCode\Bin
110 C:\RhodeCode\Env
111 C:\RhodeCode\Repos
108 C:\RhodeCode
109 C:\RhodeCode\Bin
110 C:\RhodeCode\Env
111 C:\RhodeCode\Repos
112 112
113 113
114 114 Step6 - Install virtualenv
115 115 ---------------------------
116 116
117 Install Virtual Env for Python
117 Install Virtual Env for Python
118 118
119 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
120 Right click on "virtualenv.py" file and choose "Save link as...".
121 Download to C:\\RhodeCode (or whatever you want)
122 (the file is located at
123 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
119 Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
120 Right click on "virtualenv.py" file and choose "Save link as...".
121 Download to C:\\RhodeCode (or whatever you want)
122 (the file is located at
123 https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
124 124
125 Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To
126 do so, open a CMD (Python Path should be included in Step3), navigate
127 where you downloaded "virtualenv.py", and write::
125 Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To
126 do so, open a CMD (Python Path should be included in Step3), navigate
127 where you downloaded "virtualenv.py", and write::
128 128
129 python virtualenv.py C:\RhodeCode\Env
129 python virtualenv.py C:\RhodeCode\Env
130 130
131 (--no-site-packages is now the default behaviour of virtualenv, no need
132 to include it)
131 (--no-site-packages is now the default behaviour of virtualenv, no need
132 to include it)
133 133
134 134
135 135 Step7 - Install RhodeCode
136 136 -------------------------
137 137
138 Finally, install RhodeCode
138 Finally, install RhodeCode
139 139
140 Close previously opened command prompt/s, and open a Visual Studio 2008
141 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
142 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
143 "Visual Studio 2008 Command Prompt"
140 Close previously opened command prompt/s, and open a Visual Studio 2008
141 Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
142 "Microsoft Visual C++ 2008 Express Edition" -> "Visual Studio Tools" ->
143 "Visual Studio 2008 Command Prompt"
144 144
145 145 In that CMD (loaded with VS2008 PATHs) type::
146
147 cd C:\RhodeCode\Env\Scripts (or similar)
148 activate
146
147 cd C:\RhodeCode\Env\Scripts (or similar)
148 activate
149 149
150 The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar
151 (depending of your folder structure). Then type::
150 The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar
151 (depending of your folder structure). Then type::
152 152
153 pip install rhodecode
153 pip install rhodecode
154 154
155 (long step, please wait until fully complete)
155 (long step, please wait until fully complete)
156 156
157 157 Some warnings will appear, don't worry as they are normal.
158 158
159 159
160 160 Step8 - Configuring RhodeCode
161 161 -----------------------------
162 162
163 163
164 steps taken from http://packages.python.org/RhodeCode/setup.html
164 steps taken from http://packages.python.org/RhodeCode/setup.html
165 165
166 You have to use the same Visual Studio 2008 command prompt as Step7, so
167 if you closed it reopen it following the same commands (including the
166 You have to use the same Visual Studio 2008 command prompt as Step7, so
167 if you closed it reopen it following the same commands (including the
168 168 "activate" one). When ready, just type::
169
170 cd C:\RhodeCode\Bin
171 paster make-config RhodeCode production.ini
169
170 cd C:\RhodeCode\Bin
171 paster make-config RhodeCode production.ini
172 172
173 Then, you must edit production.ini to fit your needs (ip address, ip
174 port, mail settings, database, whatever). I recommend using NotePad++
175 (free) or similar text editor, as it handles well the EndOfLine
176 character differences between Unix and Windows
177 (http://notepad-plus-plus.org/)
173 Then, you must edit production.ini to fit your needs (ip address, ip
174 port, mail settings, database, whatever). I recommend using NotePad++
175 (free) or similar text editor, as it handles well the EndOfLine
176 character differences between Unix and Windows
177 (http://notepad-plus-plus.org/)
178 178
179 For the sake of simplicity lets run it with the default settings. After
180 your edits (if any), in the previous Command Prompt, type::
181
182 paster setup-rhodecode production.ini
179 For the sake of simplicity lets run it with the default settings. After
180 your edits (if any), in the previous Command Prompt, type::
183 181
184 (this time a NEW database will be installed, you must follow a different
185 step to later UPGRADE to a newer RhodeCode version)
182 paster setup-rhodecode production.ini
183
184 (this time a NEW database will be installed, you must follow a different
185 step to later UPGRADE to a newer RhodeCode version)
186 186
187 The script will ask you for confirmation about creating a NEW database,
188 answer yes (y)
189 The script will ask you for repository path, answer C:\\RhodeCode\\Repos
190 (or similar)
191 The script will ask you for admin username and password, answer "admin"
192 + "123456" (or whatever you want)
193 The script will ask you for admin mail, answer "admin@xxxx.com" (or
194 whatever you want)
187 The script will ask you for confirmation about creating a NEW database,
188 answer yes (y)
189 The script will ask you for repository path, answer C:\\RhodeCode\\Repos
190 (or similar)
191 The script will ask you for admin username and password, answer "admin"
192 + "123456" (or whatever you want)
193 The script will ask you for admin mail, answer "admin@xxxx.com" (or
194 whatever you want)
195 195
196 If you make some mistake and the script does not end, don't worry, start
197 it again.
196 If you make some mistake and the script does not end, don't worry, start
197 it again.
198 198
199 199
200 200 Step9 - Running RhodeCode
201 201 -------------------------
202 202
203 203
204 In the previous command prompt, being in the C:\\RhodeCode\\Bin folder,
204 In the previous command prompt, being in the C:\\RhodeCode\\Bin folder,
205 205 just type::
206
207 paster serve production.ini
206
207 paster serve production.ini
208 208
209 Open yout web server, and go to http://127.0.0.1:5000
209 Open yout web server, and go to http://127.0.0.1:5000
210 210
211 It works!! :-)
211 It works!! :-)
212 212
213 Remark:
214 If it does not work first time, just Ctrl-C the CMD process and start it
215 again. Don't forget the "http://" in Internet Explorer
213 Remark:
214 If it does not work first time, just Ctrl-C the CMD process and start it
215 again. Don't forget the "http://" in Internet Explorer
216 216
217 217
218 218
219 219 What this Guide does not cover:
220 220
221 - Installing Celery
221 - Installing Celery
222 222 - Running RhodeCode as Windows Service. You can investigate here:
223
224 - http://pypi.python.org/pypi/wsgisvc
225 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
226 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
223
224 - http://pypi.python.org/pypi/wsgisvc
225 - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
226 - http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service
227 227
228 228 - Using Apache. You can investigate here:
229 229
230 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
230 - https://groups.google.com/group/rhodecode/msg/c433074e813ffdc4
231 231
232 232
233 233 Upgrading
234 234 =========
235
236 Stop running RhodeCode
235
236 Stop running RhodeCode
237 237 Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
238
239 easy_install -U rhodecode
240 cd \RhodeCode\Bin
238
239 easy_install -U rhodecode
240 cd \RhodeCode\Bin
241 241
242 { backup your production.ini file now} ::
242 { backup your production.ini file now} ::
243 243
244 paster make-config RhodeCode production.ini
244 paster make-config RhodeCode production.ini
245 245
246 246 (check changes and update your production.ini accordingly) ::
247
247
248 248 paster upgrade-db production.ini (update database)
249 249
250 Full steps in http://packages.python.org/RhodeCode/upgrade.html No newline at end of file
250 Full steps in http://packages.python.org/RhodeCode/upgrade.html
@@ -1,725 +1,725 b''
1 1 .. _setup:
2 2
3 3 =====
4 4 Setup
5 5 =====
6 6
7 7
8 8 Setting up RhodeCode
9 9 --------------------
10 10
11 First, you will need to create a RhodeCode configuration file. Run the
11 First, you will need to create a RhodeCode configuration file. Run the
12 12 following command to do this::
13
13
14 14 paster make-config RhodeCode production.ini
15 15
16 16 - This will create the file `production.ini` in the current directory. This
17 configuration file contains the various settings for RhodeCode, e.g proxy
18 port, email settings, usage of static files, cache, celery settings and
17 configuration file contains the various settings for RhodeCode, e.g proxy
18 port, email settings, usage of static files, cache, celery settings and
19 19 logging.
20 20
21 21
22 22 Next, you need to create the databases used by RhodeCode. I recommend that you
23 23 use postgresql or sqlite (default). If you choose a database other than the
24 24 default ensure you properly adjust the db url in your production.ini
25 25 configuration file to use this other database. RhodeCode currently supports
26 26 postgresql, sqlite and mysql databases. Create the database by running
27 27 the following command::
28 28
29 29 paster setup-rhodecode production.ini
30 30
31 31 This will prompt you for a "root" path. This "root" path is the location where
32 32 RhodeCode will store all of its repositories on the current machine. After
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
34 and password for the initial admin account which ``setup-rhodecode`` sets
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
34 and password for the initial admin account which ``setup-rhodecode`` sets
35 35 up for you.
36 36
37 37 setup process can be fully automated, example for lazy::
38 38
39 39 paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
40
40
41 41
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
43 admin account. When choosing a root path you can either use a new empty
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
43 admin account. When choosing a root path you can either use a new empty
44 44 location, or a location which already contains existing repositories. If you
45 choose a location which contains existing repositories RhodeCode will simply
46 add all of the repositories at the chosen location to it's database.
45 choose a location which contains existing repositories RhodeCode will simply
46 add all of the repositories at the chosen location to it's database.
47 47 (Note: make sure you specify the correct path to the root).
48 48 - Note: the given path for mercurial_ repositories **must** be write accessible
49 for the application. It's very important since the RhodeCode web interface
50 will work without write access, but when trying to do a push it will
49 for the application. It's very important since the RhodeCode web interface
50 will work without write access, but when trying to do a push it will
51 51 eventually fail with permission denied errors unless it has write access.
52 52
53 53 You are now ready to use RhodeCode, to run it simply execute::
54
54
55 55 paster serve production.ini
56
57 - This command runs the RhodeCode server. The web app should be available at the
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
56
57 - This command runs the RhodeCode server. The web app should be available at the
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
59 59 file created in previous step
60 - Use the admin account you created above when running ``setup-rhodecode``
60 - Use the admin account you created above when running ``setup-rhodecode``
61 61 to login to the web app.
62 - The default permissions on each repository is read, and the owner is admin.
62 - The default permissions on each repository is read, and the owner is admin.
63 63 Remember to update these if needed.
64 64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
65 65 well as edit more advanced options on users and repositories
66 66
67 67 Optionally users can create `rcextensions` package that extends RhodeCode
68 68 functionality. To do this simply execute::
69 69
70 70 paster make-rcext production.ini
71 71
72 72 This will create `rcextensions` package in the same place that your `ini` file
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
74 74 stats and add additional code into the push/pull/create/delete repo hooks.
75 75 For example for sending signals to build-bots such as jenkins.
76 Please see the `__init__.py` file inside `rcextensions` package
76 Please see the `__init__.py` file inside `rcextensions` package
77 77 for more details.
78 78
79 79
80 80 Using RhodeCode with SSH
81 81 ------------------------
82 82
83 83 RhodeCode currently only hosts repositories using http and https. (The addition
84 84 of ssh hosting is a planned future feature.) However you can easily use ssh in
85 85 parallel with RhodeCode. (Repository access via ssh is a standard "out of
86 86 the box" feature of mercurial_ and you can use this to access any of the
87 87 repositories that RhodeCode is hosting. See PublishingRepositories_)
88 88
89 RhodeCode repository structures are kept in directories with the same name
89 RhodeCode repository structures are kept in directories with the same name
90 90 as the project. When using repository groups, each group is a subdirectory.
91 91 This allows you to easily use ssh for accessing repositories.
92 92
93 In order to use ssh you need to make sure that your web-server and the users
93 In order to use ssh you need to make sure that your web-server and the users
94 94 login accounts have the correct permissions set on the appropriate directories.
95 95 (Note that these permissions are independent of any permissions you have set up
96 96 using the RhodeCode web interface.)
97 97
98 98 If your main directory (the same as set in RhodeCode settings) is for example
99 99 set to **/home/hg** and the repository you are using is named `rhodecode`, then
100 100 to clone via ssh you should run::
101 101
102 102 hg clone ssh://user@server.com/home/hg/rhodecode
103 103
104 104 Using other external tools such as mercurial-server_ or using ssh key based
105 105 authentication is fully supported.
106 106
107 107 Note: In an advanced setup, in order for your ssh access to use the same
108 108 permissions as set up via the RhodeCode web interface, you can create an
109 109 authentication hook to connect to the rhodecode db and runs check functions for
110 110 permissions against that.
111
111
112 112 Setting up Whoosh full text search
113 113 ----------------------------------
114 114
115 115 Starting from version 1.1 the whoosh index can be build by using the paster
116 116 command ``make-index``. To use ``make-index`` you must specify the configuration
117 file that stores the location of the index. You may specify the location of the
118 repositories (`--repo-location`). If not specified, this value is retrieved
119 from the RhodeCode database. This was required prior to 1.2. Starting from
120 version 1.2 it is also possible to specify a comma separated list of
121 repositories (`--index-only`) to build index only on chooses repositories
117 file that stores the location of the index. You may specify the location of the
118 repositories (`--repo-location`). If not specified, this value is retrieved
119 from the RhodeCode database. This was required prior to 1.2. Starting from
120 version 1.2 it is also possible to specify a comma separated list of
121 repositories (`--index-only`) to build index only on chooses repositories
122 122 skipping any other found in repos location
123 123
124 124 You may optionally pass the option `-f` to enable a full index rebuild. Without
125 125 the `-f` option, indexing will run always in "incremental" mode.
126 126
127 127 For an incremental index build use::
128 128
129 paster make-index production.ini
129 paster make-index production.ini
130 130
131 131 For a full index rebuild use::
132 132
133 paster make-index production.ini -f
133 paster make-index production.ini -f
134 134
135 135
136 136 building index just for chosen repositories is possible with such command::
137
137
138 138 paster make-index production.ini --index-only=vcs,rhodecode
139 139
140 140
141 141 In order to do periodical index builds and keep your index always up to date.
142 It's recommended to do a crontab entry for incremental indexing.
142 It's recommended to do a crontab entry for incremental indexing.
143 143 An example entry might look like this::
144
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
146
144
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
146
147 147 When using incremental mode (the default) whoosh will check the last
148 148 modification date of each file and add it to be reindexed if a newer file is
149 149 available. The indexing daemon checks for any removed files and removes them
150 150 from index.
151 151
152 152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
153 153 or in the admin panel you can check `build from scratch` flag.
154 154
155 155
156 156 Setting up LDAP support
157 157 -----------------------
158 158
159 159 RhodeCode starting from version 1.1 supports ldap authentication. In order
160 to use LDAP, you have to install the python-ldap_ package. This package is
160 to use LDAP, you have to install the python-ldap_ package. This package is
161 161 available via pypi, so you can install it by running
162 162
163 163 using easy_install::
164 164
165 165 easy_install python-ldap
166
166
167 167 using pip::
168 168
169 169 pip install python-ldap
170 170
171 171 .. note::
172 python-ldap requires some certain libs on your system, so before installing
172 python-ldap requires some certain libs on your system, so before installing
173 173 it check that you have at least `openldap`, and `sasl` libraries.
174 174
175 175 LDAP settings are located in admin->ldap section,
176 176
177 177 Here's a typical ldap setup::
178 178
179 179 Connection settings
180 180 Enable LDAP = checked
181 181 Host = host.example.org
182 182 Port = 389
183 183 Account = <account>
184 184 Password = <password>
185 185 Connection Security = LDAPS connection
186 186 Certificate Checks = DEMAND
187 187
188 188 Search settings
189 189 Base DN = CN=users,DC=host,DC=example,DC=org
190 190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
191 191 LDAP Search Scope = SUBTREE
192 192
193 193 Attribute mappings
194 194 Login Attribute = uid
195 195 First Name Attribute = firstName
196 196 Last Name Attribute = lastName
197 197 E-mail Attribute = mail
198 198
199 199 .. _enable_ldap:
200 200
201 201 Enable LDAP : required
202 202 Whether to use LDAP for authenticating users.
203 203
204 204 .. _ldap_host:
205 205
206 206 Host : required
207 207 LDAP server hostname or IP address. Can be also a comma separated
208 208 list of servers to support LDAP fail-over.
209 209
210 210 .. _Port:
211 211
212 212 Port : required
213 213 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
214 214
215 215 .. _ldap_account:
216 216
217 217 Account : optional
218 218 Only required if the LDAP server does not allow anonymous browsing of
219 219 records. This should be a special account for record browsing. This
220 220 will require `LDAP Password`_ below.
221 221
222 222 .. _LDAP Password:
223 223
224 224 Password : optional
225 225 Only required if the LDAP server does not allow anonymous browsing of
226 226 records.
227 227
228 228 .. _Enable LDAPS:
229 229
230 230 Connection Security : required
231 231 Defines the connection to LDAP server
232 232
233 233 No encryption
234 234 Plain non encrypted connection
235
235
236 236 LDAPS connection
237 Enable ldaps connection. It will likely require `Port`_ to be set to
238 a different value (standard LDAPS port is 636). When LDAPS is enabled
237 Enable ldaps connection. It will likely require `Port`_ to be set to
238 a different value (standard LDAPS port is 636). When LDAPS is enabled
239 239 then `Certificate Checks`_ is required.
240
240
241 241 START_TLS on LDAP connection
242 242 START TLS connection
243 243
244 244 .. _Certificate Checks:
245 245
246 246 Certificate Checks : optional
247 247 How SSL certificates verification is handled - this is only useful when
248 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
248 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
249 249 while the other options are susceptible to man-in-the-middle attacks. SSL
250 250 certificates can be installed to /etc/openldap/cacerts so that the
251 251 DEMAND or HARD options can be used with self-signed certificates or
252 252 certificates that do not have traceable certificates of authority.
253 253
254 254 NEVER
255 255 A serve certificate will never be requested or checked.
256 256
257 257 ALLOW
258 258 A server certificate is requested. Failure to provide a
259 259 certificate or providing a bad certificate will not terminate the
260 260 session.
261 261
262 262 TRY
263 263 A server certificate is requested. Failure to provide a
264 264 certificate does not halt the session; providing a bad certificate
265 265 halts the session.
266 266
267 267 DEMAND
268 268 A server certificate is requested and must be provided and
269 269 authenticated for the session to proceed.
270 270
271 271 HARD
272 272 The same as DEMAND.
273 273
274 274 .. _Base DN:
275 275
276 276 Base DN : required
277 277 The Distinguished Name (DN) where searches for users will be performed.
278 278 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
279 279
280 280 .. _LDAP Filter:
281 281
282 282 LDAP Filter : optional
283 283 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
284 284 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
285 285 which LDAP objects are identified as representing Users for
286 286 authentication. The filter is augmented by `Login Attribute`_ below.
287 287 This can commonly be left blank.
288 288
289 289 .. _LDAP Search Scope:
290 290
291 291 LDAP Search Scope : required
292 292 This limits how far LDAP will search for a matching object.
293 293
294 294 BASE
295 295 Only allows searching of `Base DN`_ and is usually not what you
296 296 want.
297 297
298 298 ONELEVEL
299 299 Searches all entries under `Base DN`_, but not Base DN itself.
300 300
301 301 SUBTREE
302 302 Searches all entries below `Base DN`_, but not Base DN itself.
303 303 When using SUBTREE `LDAP Filter`_ is useful to limit object
304 304 location.
305 305
306 306 .. _Login Attribute:
307 307
308 Login Attribute : required
308 Login Attribute : required
309 309 The LDAP record attribute that will be matched as the USERNAME or
310 310 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
311 311 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
312 312 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
313 313 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
314 314 ::
315 315
316 316 (&(LDAPFILTER)(uid=jsmith))
317 317
318 318 .. _ldap_attr_firstname:
319 319
320 320 First Name Attribute : required
321 321 The LDAP record attribute which represents the user's first name.
322 322
323 323 .. _ldap_attr_lastname:
324 324
325 325 Last Name Attribute : required
326 326 The LDAP record attribute which represents the user's last name.
327 327
328 328 .. _ldap_attr_email:
329 329
330 330 Email Attribute : required
331 331 The LDAP record attribute which represents the user's email address.
332 332
333 333 If all data are entered correctly, and python-ldap_ is properly installed
334 334 users should be granted access to RhodeCode with ldap accounts. At this
335 335 time user information is copied from LDAP into the RhodeCode user database.
336 336 This means that updates of an LDAP user object may not be reflected as a
337 337 user update in RhodeCode.
338 338
339 339 If You have problems with LDAP access and believe You entered correct
340 340 information check out the RhodeCode logs, any error messages sent from LDAP
341 341 will be saved there.
342 342
343 343 Active Directory
344 344 ''''''''''''''''
345 345
346 346 RhodeCode can use Microsoft Active Directory for user authentication. This
347 347 is done through an LDAP or LDAPS connection to Active Directory. The
348 348 following LDAP configuration settings are typical for using Active
349 349 Directory ::
350 350
351 351 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
352 352 Login Attribute = sAMAccountName
353 353 First Name Attribute = givenName
354 354 Last Name Attribute = sn
355 355 E-mail Attribute = mail
356 356
357 357 All other LDAP settings will likely be site-specific and should be
358 358 appropriately configured.
359 359
360 360
361 361 Authentication by container or reverse-proxy
362 362 --------------------------------------------
363 363
364 364 Starting with version 1.3, RhodeCode supports delegating the authentication
365 365 of users to its WSGI container, or to a reverse-proxy server through which all
366 366 clients access the application.
367 367
368 368 When these authentication methods are enabled in RhodeCode, it uses the
369 369 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
370 370 perform the authentication itself. The authorization, however, is still done by
371 371 RhodeCode according to its settings.
372 372
373 373 When a user logs in for the first time using these authentication methods,
374 374 a matching user account is created in RhodeCode with default permissions. An
375 375 administrator can then modify it using RhodeCode's admin interface.
376 376 It's also possible for an administrator to create accounts and configure their
377 377 permissions before the user logs in for the first time.
378 378
379 379 Container-based authentication
380 380 ''''''''''''''''''''''''''''''
381 381
382 382 In a container-based authentication setup, RhodeCode reads the user name from
383 383 the ``REMOTE_USER`` server variable provided by the WSGI container.
384 384
385 385 After setting up your container (see `Apache's WSGI config`_), you'd need
386 386 to configure it to require authentication on the location configured for
387 387 RhodeCode.
388 388
389 389 In order for RhodeCode to start using the provided username, you should set the
390 390 following in the [app:main] section of your .ini file::
391 391
392 392 container_auth_enabled = true
393 393
394 394
395 395 Proxy pass-through authentication
396 396 '''''''''''''''''''''''''''''''''
397 397
398 398 In a proxy pass-through authentication setup, RhodeCode reads the user name
399 399 from the ``X-Forwarded-User`` request header, which should be configured to be
400 400 sent by the reverse-proxy server.
401 401
402 402 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
403 403 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
404 404 configure the authentication and add the username in a request header named
405 405 ``X-Forwarded-User``.
406 406
407 407 For example, the following config section for Apache sets a subdirectory in a
408 408 reverse-proxy setup with basic auth::
409 409
410 410 <Location /<someprefix> >
411 411 ProxyPass http://127.0.0.1:5000/<someprefix>
412 412 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
413 413 SetEnvIf X-Url-Scheme https HTTPS=1
414 414
415 415 AuthType Basic
416 416 AuthName "RhodeCode authentication"
417 417 AuthUserFile /home/web/rhodecode/.htpasswd
418 418 require valid-user
419 419
420 420 RequestHeader unset X-Forwarded-User
421 421
422 422 RewriteEngine On
423 423 RewriteCond %{LA-U:REMOTE_USER} (.+)
424 424 RewriteRule .* - [E=RU:%1]
425 425 RequestHeader set X-Forwarded-User %{RU}e
426 </Location>
426 </Location>
427 427
428 428 In order for RhodeCode to start using the forwarded username, you should set
429 429 the following in the [app:main] section of your .ini file::
430 430
431 431 proxypass_auth_enabled = true
432 432
433 433 .. note::
434 434 If you enable proxy pass-through authentication, make sure your server is
435 435 only accessible through the proxy. Otherwise, any client would be able to
436 436 forge the authentication header and could effectively become authenticated
437 437 using any account of their liking.
438 438
439 439 Integration with Issue trackers
440 440 -------------------------------
441 441
442 442 RhodeCode provides a simple integration with issue trackers. It's possible
443 443 to define a regular expression that will fetch issue id stored in commit
444 444 messages and replace that with an url to this issue. To enable this simply
445 445 uncomment following variables in the ini file::
446 446
447 447 url_pat = (?:^#|\s#)(\w+)
448 448 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
449 449 issue_prefix = #
450 450
451 451 `url_pat` is the regular expression that will fetch issues from commit messages.
452 452 Default regex will match issues in format of #<number> eg. #300.
453
454 Matched issues will be replace with the link specified as `issue_server_link`
453
454 Matched issues will be replace with the link specified as `issue_server_link`
455 455 {id} will be replaced with issue id, and {repo} with repository name.
456 Since the # is striped `issue_prefix` is added as a prefix to url.
457 `issue_prefix` can be something different than # if you pass
456 Since the # is striped `issue_prefix` is added as a prefix to url.
457 `issue_prefix` can be something different than # if you pass
458 458 ISSUE- as issue prefix this will generate an url in format::
459
460 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
459
460 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
461 461
462 462 Hook management
463 463 ---------------
464 464
465 465 Hooks can be managed in similar way to this used in .hgrc files.
466 466 To access hooks setting click `advanced setup` on Hooks section of Mercurial
467 Settings in Admin.
467 Settings in Admin.
468 468
469 469 There are 4 built in hooks that cannot be changed (only enable/disable by
470 470 checkboxes on previos section).
471 To add another custom hook simply fill in first section with
471 To add another custom hook simply fill in first section with
472 472 <name>.<hook_type> and the second one with hook path. Example hooks
473 can be found at *rhodecode.lib.hooks*.
473 can be found at *rhodecode.lib.hooks*.
474 474
475 475
476 476 Changing default encoding
477 477 -------------------------
478 478
479 479 By default RhodeCode uses utf8 encoding, starting from 1.3 series this
480 480 can be changed, simply edit default_encoding in .ini file to desired one.
481 481 This affects many parts in rhodecode including commiters names, filenames,
482 482 encoding of commit messages. In addition RhodeCode can detect if `chardet`
483 483 library is installed. If `chardet` is detected RhodeCode will fallback to it
484 484 when there are encode/decode errors.
485 485
486 486
487 487 Setting Up Celery
488 488 -----------------
489 489
490 490 Since version 1.1 celery is configured by the rhodecode ini configuration files.
491 Simply set use_celery=true in the ini file then add / change the configuration
491 Simply set use_celery=true in the ini file then add / change the configuration
492 492 variables inside the ini file.
493 493
494 494 Remember that the ini files use the format with '.' not with '_' like celery.
495 495 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
496 496 the config file.
497 497
498 498 In order to start using celery run::
499 499
500 500 paster celeryd <configfile.ini>
501 501
502 502
503 503 .. note::
504 Make sure you run this command from the same virtualenv, and with the same
504 Make sure you run this command from the same virtualenv, and with the same
505 505 user that rhodecode runs.
506
506
507 507 HTTPS support
508 508 -------------
509 509
510 510 There are two ways to enable https:
511 511
512 512 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
513 513 recognize this headers and make proper https redirections
514 - Alternatively, change the `force_https = true` flag in the ini configuration
514 - Alternatively, change the `force_https = true` flag in the ini configuration
515 515 to force using https, no headers are needed than to enable https
516 516
517 517
518 518 Nginx virtual host example
519 519 --------------------------
520 520
521 521 Sample config for nginx using proxy::
522 522
523 523 upstream rc {
524 524 server 127.0.0.1:5000;
525 525 # add more instances for load balancing
526 526 #server 127.0.0.1:5001;
527 527 #server 127.0.0.1:5002;
528 528 }
529
529
530 530 server {
531 531 listen 80;
532 532 server_name hg.myserver.com;
533 533 access_log /var/log/nginx/rhodecode.access.log;
534 534 error_log /var/log/nginx/rhodecode.error.log;
535 535
536 536 # uncomment if you have nginx with chunking module compiled
537 537 # fixes the issues of having to put postBuffer data for large git
538 # pushes
538 # pushes
539 539 #chunkin on;
540 540 #error_page 411 = @my_411_error;
541 541 #location @my_411_error {
542 542 # chunkin_resume;
543 543 #}
544
544
545 545 # uncomment if you want to serve static files by nginx
546 546 #root /path/to/installation/rhodecode/public;
547
547
548 548 location / {
549 549 try_files $uri @rhode;
550 550 }
551
551
552 552 location @rhode {
553 553 proxy_pass http://rc;
554 554 include /etc/nginx/proxy.conf;
555 555 }
556 556
557 }
558
557 }
558
559 559 Here's the proxy.conf. It's tuned so it will not timeout on long
560 560 pushes or large pushes::
561
561
562 562 proxy_redirect off;
563 563 proxy_set_header Host $host;
564 564 proxy_set_header X-Url-Scheme $scheme;
565 565 proxy_set_header X-Host $http_host;
566 566 proxy_set_header X-Real-IP $remote_addr;
567 567 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
568 568 proxy_set_header Proxy-host $proxy_host;
569 569 client_max_body_size 400m;
570 570 client_body_buffer_size 128k;
571 571 proxy_buffering off;
572 572 proxy_connect_timeout 7200;
573 573 proxy_send_timeout 7200;
574 574 proxy_read_timeout 7200;
575 575 proxy_buffers 8 32k;
576
576
577 577 Also, when using root path with nginx you might set the static files to false
578 578 in the production.ini file::
579 579
580 580 [app:main]
581 581 use = egg:rhodecode
582 582 full_stack = true
583 583 static_files = false
584 584 lang=en
585 585 cache_dir = %(here)s/data
586 586
587 587 In order to not have the statics served by the application. This improves speed.
588 588
589 589
590 590 Apache virtual host reverse proxy example
591 591 -----------------------------------------
592 592
593 593 Here is a sample configuration file for apache using proxy::
594 594
595 595 <VirtualHost *:80>
596 596 ServerName hg.myserver.com
597 597 ServerAlias hg.myserver.com
598
598
599 599 <Proxy *>
600 600 Order allow,deny
601 601 Allow from all
602 602 </Proxy>
603
603
604 604 #important !
605 605 #Directive to properly generate url (clone url) for pylons
606 606 ProxyPreserveHost On
607
607
608 608 #rhodecode instance
609 609 ProxyPass / http://127.0.0.1:5000/
610 610 ProxyPassReverse / http://127.0.0.1:5000/
611
611
612 612 #to enable https use line below
613 613 #SetEnvIf X-Url-Scheme https HTTPS=1
614
615 </VirtualHost>
614
615 </VirtualHost>
616 616
617 617
618 618 Additional tutorial
619 619 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
620 620
621 621
622 622 Apache as subdirectory
623 623 ----------------------
624 624
625 625 Apache subdirectory part::
626 626
627 627 <Location /<someprefix> >
628 628 ProxyPass http://127.0.0.1:5000/<someprefix>
629 629 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
630 630 SetEnvIf X-Url-Scheme https HTTPS=1
631 </Location>
631 </Location>
632 632
633 633 Besides the regular apache setup you will need to add the following line
634 634 into [app:main] section of your .ini file::
635 635
636 636 filter-with = proxy-prefix
637 637
638 638 Add the following at the end of the .ini file::
639 639
640 640 [filter:proxy-prefix]
641 641 use = egg:PasteDeploy#prefix
642 prefix = /<someprefix>
642 prefix = /<someprefix>
643 643
644 644
645 645 then change <someprefix> into your choosen prefix
646 646
647 647 Apache's WSGI config
648 648 --------------------
649 649
650 650 Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
651 651 that, you'll need to:
652 652
653 653 - Install mod_wsgi. If using a Debian-based distro, you can install
654 654 the package libapache2-mod-wsgi::
655 655
656 656 aptitude install libapache2-mod-wsgi
657 657
658 658 - Enable mod_wsgi::
659 659
660 660 a2enmod wsgi
661 661
662 662 - Create a wsgi dispatch script, like the one below. Make sure you
663 663 check the paths correctly point to where you installed RhodeCode
664 664 and its Python Virtual Environment.
665 665 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
666 666 as in the following example. Once again, check the paths are
667 667 correctly specified.
668 668
669 669 Here is a sample excerpt from an Apache Virtual Host configuration file::
670 670
671 671 WSGIDaemonProcess pylons \
672 672 threads=4 \
673 673 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
674 674 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
675 675 WSGIPassAuthorization On
676 676
677 677 .. note::
678 when running apache as root please add: `user=www-data group=www-data`
678 when running apache as root please add: `user=www-data group=www-data`
679 679 into above configuration
680 680
681 681 .. note::
682 682 RhodeCode cannot be runned in multiprocess mode in apache, make sure
683 683 you don't specify `processes=num` directive in the config
684 684
685 685
686 686 Example wsgi dispatch script::
687 687
688 688 import os
689 689 os.environ["HGENCODING"] = "UTF-8"
690 690 os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
691
691
692 692 # sometimes it's needed to set the curent dir
693 os.chdir('/home/web/rhodecode/')
693 os.chdir('/home/web/rhodecode/')
694 694
695 695 import site
696 696 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
697
697
698 698 from paste.deploy import loadapp
699 699 from paste.script.util.logging_config import fileConfig
700 700
701 701 fileConfig('/home/web/rhodecode/production.ini')
702 702 application = loadapp('config:/home/web/rhodecode/production.ini')
703 703
704 704 Note: when using mod_wsgi you'll need to install the same version of
705 705 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
706 706 environment.
707 707
708 708
709 709 Other configuration files
710 710 -------------------------
711 711
712 712 Some example init.d scripts can be found in init.d directory::
713 713
714 714 https://secure.rhodecode.org/rhodecode/files/beta/init.d
715 715
716 716 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
717 717 .. _python: http://www.python.org/
718 718 .. _mercurial: http://mercurial.selenic.com/
719 719 .. _celery: http://celeryproject.org/
720 720 .. _rabbitmq: http://www.rabbitmq.com/
721 721 .. _python-ldap: http://www.python-ldap.org/
722 722 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
723 723 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
724 724 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
725 .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file
725 .. _google group rhodecode: http://groups.google.com/group/rhodecode
@@ -1,99 +1,99 b''
1 1 .. _upgrade:
2 2
3 3 =======
4 4 Upgrade
5 5 =======
6 6
7 7 Upgrading from PyPI (aka "Cheeseshop")
8 8 ---------------------------------------
9 9
10 10 .. note::
11 Firstly, it is recommended that you **always** perform a database and
11 Firstly, it is recommended that you **always** perform a database and
12 12 configuration backup before doing an upgrade.
13
14 (These directions will use '{version}' to note that this is the version of
15 Rhodecode that these files were used with. If backing up your RhodeCode
16 instance from version 1.3.6 to 1.4.0, the ``production.ini`` file would be
13
14 (These directions will use '{version}' to note that this is the version of
15 Rhodecode that these files were used with. If backing up your RhodeCode
16 instance from version 1.3.6 to 1.4.0, the ``production.ini`` file would be
17 17 backed up to ``production.ini.1-3-6``.)
18 18
19 19
20 20 If using a sqlite database, stop the Rhodecode process/daemon/service, and
21 21 then make a copy of the database file::
22 22
23 23 service rhodecode stop
24 24 cp rhodecode.db rhodecode.db.{version}
25 25
26 26
27 27 Back up your configuration file::
28 28
29 29 cp production.ini production.ini.{version}
30 30
31 31
32 32 Ensure that you are using the Python Virtual Environment that you'd originally
33 33 installed Rhodecode in::
34 34
35 35 pip freeze
36 36
37 will list all packages installed in the current environment. If Rhodecode
37 will list all packages installed in the current environment. If Rhodecode
38 38 isn't listed, change virtual environments to your venv location::
39 39
40 40 source /opt/rhodecode-venv/bin/activate
41 41
42 42
43 43 Once you have verified the environment you can upgrade ``Rhodecode`` with::
44 44
45 45 easy_install -U rhodecode
46 46
47 47 Or::
48 48
49 49 pip install --upgrade rhodecode
50 50
51 51
52 52 Then run the following command from the installation directory::
53
53
54 54 paster make-config RhodeCode production.ini
55
55
56 56 This will display any changes made by the new version of RhodeCode to your
57 current configuration. It will try to perform an automerge. It's recommended
57 current configuration. It will try to perform an automerge. It's recommended
58 58 that you re-check the content after the automerge.
59 59
60 60 .. note::
61 61 Please always make sure your .ini files are up to date. Often errors are
62 62 caused by missing params added in new versions.
63 63
64 64
65 It is also recommended that you rebuild the whoosh index after upgrading since
65 It is also recommended that you rebuild the whoosh index after upgrading since
66 66 the new whoosh version could introduce some incompatible index changes. Please
67 67 Read the changelog to see if there were any changes to whoosh.
68 68
69 69
70 70 The final step is to upgrade the database. To do this simply run::
71 71
72 72 paster upgrade-db production.ini
73
73
74 74 This will upgrade the schema and update some of the defaults in the database,
75 and will always recheck the settings of the application, if there are no new
75 and will always recheck the settings of the application, if there are no new
76 76 options that need to be set.
77 77
78 You may find it helpful to clear out your log file so that new errors are
78 You may find it helpful to clear out your log file so that new errors are
79 79 readily apparent::
80 80
81 81 echo > rhodecode.log
82 82
83 83 Once that is complete, you may now start your upgraded Rhodecode Instance::
84 84
85 85 service rhodecode start
86 86
87 87 Or::
88 88
89 89 paster serve /var/www/rhodecode/production.ini
90 90
91 91 .. note::
92 92 If you're using Celery, make sure you restart all instances of it after
93 93 upgrade.
94 94
95 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
95 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
96 96 .. _python: http://www.python.org/
97 97 .. _mercurial: http://mercurial.selenic.com/
98 98 .. _celery: http://celeryproject.org/
99 99 .. _rabbitmq: http://www.rabbitmq.com/
@@ -1,26 +1,26 b''
1 1 .. _backup:
2 2
3 3 ====================
4 4 Backing up RhodeCode
5 5 ====================
6 6
7 7
8 8 Settings
9 9 --------
10 10
11 11 Just copy your .ini file, it contains all RhodeCode settings.
12 12
13 13 Whoosh index
14 14 ------------
15 15
16 16 Whoosh index is located in **/data/index** directory where you installed
17 17 RhodeCode ie. the same place where the ini file is located
18 18
19 19
20 20 Database
21 21 --------
22 22
23 23 When using sqlite just copy rhodecode.db.
24 24 Any other database engine requires a manual backup operation.
25 25
26 Database backup will contain all gathered statistics No newline at end of file
26 Database backup will contain all gathered statistics
@@ -1,30 +1,30 b''
1 1 .. _debugging:
2 2
3 3 ===================
4 4 Debugging RhodeCode
5 5 ===================
6 6
7 7 If you encountered problems with RhodeCode here are some instructions how to
8 8 possibly debug them.
9 9
10 10 ** First make sure you're using the latest version available.**
11 11
12 12 enable detailed debug
13 13 ---------------------
14 14
15 15 RhodeCode uses standard python logging modules to log it's output.
16 16 By default only loggers with INFO level are displayed. To enable full output
17 change `level = DEBUG` for all logging handlers in currently used .ini file.
17 change `level = DEBUG` for all logging handlers in currently used .ini file.
18 18 This change will allow to see much more detailed output in the logfile or
19 19 console. This generally helps a lot to track issues.
20 20
21 21
22 22 enable interactive debug mode
23 23 -----------------------------
24 24
25 25 To enable interactive debug mode simply comment out `set debug = false` in
26 26 .ini file, this will trigger and interactive debugger each time there an
27 27 error in browser, or send a http link if error occured in the backend. This
28 28 is a great tool for fast debugging as you get a handy python console right
29 29 in the web view. ** NEVER ENABLE THIS ON PRODUCTION ** the interactive console
30 30 can be a serious security threat to you system.
@@ -1,107 +1,107 b''
1 1 .. _general:
2 2
3 3 =======================
4 4 General RhodeCode usage
5 5 =======================
6 6
7 7
8 8 Repository deleting
9 9 -------------------
10 10
11 11 Currently when admin/owner deletes a repository, RhodeCode does not physically
12 12 delete a repository from filesystem, it renames it in a special way so it's
13 13 not possible to push,clone or access repository. It's worth a notice that,
14 even if someone will be given administrative access to RhodeCode and will
14 even if someone will be given administrative access to RhodeCode and will
15 15 delete a repository You can easy restore such action by restoring `rm__<date>`
16 16 from the repository name, and internal repository storage (.hg/.git)
17 17
18 18 Follow current branch in file view
19 19 ----------------------------------
20 20
21 21 In file view when this checkbox is checked the << and >> arrows will jump
22 22 to changesets within the same branch currently viewing. So for example
23 23 if someone is viewing files at 'beta' branch and marks `follow current branch`
24 24 checkbox the << and >> buttons will only show him revisions for 'beta' branch
25 25
26 26
27 27 Compare view from changelog
28 28 ---------------------------
29 29
30 30 Checkboxes in compare view allow users to view combined compare view. You can
31 31 only show the range between the first and last checkbox (no cherry pick).
32 32 Clicking more than one checkbox will activate a link in top saying
33 33 `Show selected changes <from-rev> -> <to-rev>` clicking this will bring
34 34 compare view
35 35
36 36 Compare view is also available from the journal on pushes having more than
37 37 one changeset
38 38
39 39
40 40 Non changeable repository urls
41 41 ------------------------------
42 42
43 43 Due to complicated nature of repository grouping, often urls of repositories
44 44 can change.
45 45
46 46 example::
47
47
48 48 #before
49 49 http://server.com/repo_name
50 50 # after insertion to test_group group the url will be
51 51 http://server.com/test_group/repo_name
52
52
53 53 This can be an issue for build systems and any other hardcoded scripts, moving
54 repository to a group leads to a need for changing external systems. To
55 overcome this RhodeCode introduces a non changable replacement url. It's
54 repository to a group leads to a need for changing external systems. To
55 overcome this RhodeCode introduces a non changable replacement url. It's
56 56 simply an repository ID prefixed with `_` above urls are also accessible as::
57 57
58 58 http://server.com/_<ID>
59
59
60 60 Since ID are always the same moving the repository will not affect such url.
61 the _<ID> syntax can be used anywhere in the system so urls with repo_name
61 the _<ID> syntax can be used anywhere in the system so urls with repo_name
62 62 for changelogs, files and other can be exchanged with _<ID> syntax.
63 63
64 64
65 65 Mailing
66 66 -------
67 67
68 68 When administrator will fill up the mailing settings in .ini files
69 69 RhodeCode will send mails on user registration, or when RhodeCode errors occur
70 70 on errors the mails will have a detailed traceback of error.
71 71
72 72
73 73 Mails are also sent for code comments. If someone comments on a changeset
74 mail is sent to all participants, the person who commited the changeset
74 mail is sent to all participants, the person who commited the changeset
75 75 (if present in RhodeCode), and to all people mentioned with @mention system.
76 76
77 77
78 78 Trending source files
79 79 ---------------------
80 80
81 81 Trending source files are calculated based on pre defined dict of known
82 82 types and extensions. If You miss some extension or Would like to scan some
83 83 custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict
84 84 located in `/rhodecode/lib/celerylib/tasks.py`
85 85
86 86
87 87 Cloning remote repositories
88 88 ---------------------------
89 89
90 90 RhodeCode has an ability to clone remote repos from given remote locations.
91 91 Currently it support following options:
92 92
93 93 - hg -> hg clone
94 94 - svn -> hg clone
95 95 - git -> git clone
96 96
97 97
98 98 .. note::
99
99
100 100 - *`svn -> hg` cloning requires `hgsubversion` library to be installed.*
101 101
102 102 If you need to clone repositories that are protected via basic auth, you
103 might pass the url with stored credentials inside eg.
103 might pass the url with stored credentials inside eg.
104 104 `http://user:passw@remote.server/repo, RhodeCode will try to login and clone
105 105 using given credentials. Please take a note that they will be stored as
106 plaintext inside the database. RhodeCode will remove auth info when showing the
106 plaintext inside the database. RhodeCode will remove auth info when showing the
107 107 clone url in summary page.
@@ -1,55 +1,55 b''
1 1 .. _git_support:
2 2
3 3 ===========
4 4 GIT support
5 5 ===========
6 6
7 7
8 8 Git support in RhodeCode 1.3 was enabled by default. You need to have a git
9 9 client installed on the machine to make git fully work.
10 10
11 11 Although There is one limitation on git usage.
12 12
13 13 - large pushes requires a http server with chunked encoding support.
14
14
15 15 if you plan to use git you need to run RhodeCode with some
16 http server that supports chunked encoding which git http protocol uses,
17 i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app
16 http server that supports chunked encoding which git http protocol uses,
17 i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app
18 18 replacement. Starting from version 1.4 waitress_ is the default wsgi server
19 19 used in RhodeCode.
20 20
21 21 To use, simply change change the following in the .ini file::
22 22
23 23 use = egg:Paste#http
24 24
25 25 to::
26
26
27 27 use = egg:waitress#main
28 28
29 29 or::
30 30
31 31 use = egg:gunicorn#main
32
33
32
33
34 34 And comment out bellow options::
35 35
36 threadpool_workers =
37 threadpool_max_requests =
38 use_threadpool =
39
36 threadpool_workers =
37 threadpool_max_requests =
38 use_threadpool =
39
40 40
41 41 You can simply run `paster serve` as usual.
42 42
43
44 You can always disable git/hg support by editing a
43
44 You can always disable git/hg support by editing a
45 45 file **rhodecode/__init__.py** and commenting out backends
46 46
47 47 .. code-block:: python
48
48
49 49 BACKENDS = {
50 50 'hg': 'Mercurial repository',
51 51 #'git': 'Git repository',
52 52 }
53 53
54 54 .. _waitress: http://pypi.python.org/pypi/waitress
55 .. _gunicorn: http://pypi.python.org/pypi/gunicorn No newline at end of file
55 .. _gunicorn: http://pypi.python.org/pypi/gunicorn
@@ -1,41 +1,41 b''
1 1 .. _locking:
2 2
3 3 ===================================
4 4 RhodeCode repository locking system
5 5 ===================================
6 6
7 7
8 | Repos with **locking function=disabled** is the default, that's how repos work
8 | Repos with **locking function=disabled** is the default, that's how repos work
9 9 today.
10 10 | Repos with **locking function=enabled** behaves like follows:
11 11
12 12 Repos have a state called `locked` that can be true or false.
13 The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push`
13 The hg/git commands `hg/git clone`, `hg/git pull`, and `hg/git push`
14 14 influence this state:
15 15
16 - The command `hg/git pull <repo>` will lock that repo (locked=true)
16 - The command `hg/git pull <repo>` will lock that repo (locked=true)
17 17 if the user has write/admin permissions on this repo
18 18
19 - The command `hg/git clone <repo>` will lock that repo (locked=true) if the
19 - The command `hg/git clone <repo>` will lock that repo (locked=true) if the
20 20 user has write/admin permissions on this repo
21 21
22 22
23 23 RhodeCode will remember the user id who locked the repo
24 only this specific user can unlock the repo (locked=false) by calling
24 only this specific user can unlock the repo (locked=false) by calling
25 25
26 - `hg/git push <repo>`
26 - `hg/git push <repo>`
27 27
28 every other command on that repo from this user and
28 every other command on that repo from this user and
29 29 every command from any other user will result in http return code 423 (locked)
30 30
31 31
32 additionally the http error includes the <user> that locked the repo
32 additionally the http error includes the <user> that locked the repo
33 33 (e.g. β€œrepository <repo> locked by user <user>”)
34 34
35 35
36 So the scenario of use for repos with `locking function` enabled is that
36 So the scenario of use for repos with `locking function` enabled is that
37 37 every initial clone and every pull gives users (with write permission)
38 38 the exclusive right to do a push.
39 39
40 40
41 Each repo can be manually unlocked by admin from the repo settings menu. No newline at end of file
41 Each repo can be manually unlocked by admin from the repo settings menu.
@@ -1,50 +1,50 b''
1 1 .. _performance:
2 2
3 3 ================================
4 4 Optimizing RhodeCode Performance
5 5 ================================
6 6
7 7 When serving large amount of big repositories RhodeCode can start
8 8 performing slower than expected. Because of demanding nature of handling large
9 9 amount of data from version control systems here are some tips how to get
10 10 the best performance.
11 11
12 12 * RhodeCode will perform better on machines with faster disks (SSD/SAN). It's
13 13 more important to have faster disk than faster CPU.
14 14
15 15 * Slowness on initial page can be easily fixed by grouping repositories, and/or
16 16 increasing cache size (see below)
17 17
18 18
19 19 Follow these few steps to improve performance of RhodeCode system.
20 20
21 21
22 22 1. Increase cache
23 23
24 24 in the .ini file::
25
25
26 26 beaker.cache.sql_cache_long.expire=3600 <-- set this to higher number
27 27
28 28 This option affects the cache expiration time for main page. Having
29 29 few hundreds of repositories on main page can sometimes make the system
30 30 to behave slow when cache expires for all of them. Increasing `expire`
31 31 option to day (86400) or a week (604800) will improve general response
32 32 times for the main page. RhodeCode has an intelligent cache expiration
33 33 system and it will expire cache for repositories that had been changed.
34 34
35 35 2. Switch from sqlite to postgres or mysql
36
36
37 37 sqlite is a good option when having small load on the system. But due to
38 38 locking issues with sqlite, it's not recommended to use it for larger
39 39 setup. Switching to mysql or postgres will result in a immediate
40 40 performance increase.
41
41
42 42 3. Scale RhodeCode horizontally
43 43
44 44 - running two or more instances on the same server can speed up things a lot
45 45 - load balance using round robin or ip hash
46 - you need to handle consistent user session storage by switching to
47 db sessions, client side sessions or sharing session data folder across
46 - you need to handle consistent user session storage by switching to
47 db sessions, client side sessions or sharing session data folder across
48 48 instances. See http://beaker.readthedocs.org/ docs for details.
49 49 - remember that each instance needs it's own .ini file and unique
50 `instance_id` set in them No newline at end of file
50 `instance_id` set in them
@@ -1,37 +1,37 b''
1 1 .. _subrepos:
2 2
3 3 =============================================
4 4 working with RhodeCode and mercurial subrepos
5 5 =============================================
6 6
7 7 example usage of Subrepos with RhodeCode::
8
8
9 9 ## init a simple repo
10 hg init repo1
10 hg init repo1
11 11 cd repo1
12 12 echo "file1" > file1
13 hg add file1
13 hg add file1
14 14 hg ci --message "initial file 1"
15
15
16 16 #clone subrepo we want to add
17 17 hg clone http://rc.local/subrepo
18 18
19 19 ## use path like url to existing repo in RhodeCode
20 20 echo "subrepo = http://rc.local/subrepo" > .hgsub
21 21
22 22 hg add .hgsub
23 23 hg ci --message "added remote subrepo"
24 24
25
25
26 26
27 27 In file list of repo1 you will see a connected subrepo at revision it was
28 28 during cloning.
29 29 Clicking in subrepos link should send you to proper repository in RhodeCode
30 30
31 31 cloning repo1 will also clone attached subrepository.
32 32
33 33 Next we can edit the subrepo data, and push back to RhodeCode. This will update
34 34 both of repositories.
35 35
36 36 see http://mercurial.aragost.com/kick-start/en/subrepositories/ for more
37 information about subrepositories No newline at end of file
37 information about subrepositories
@@ -1,70 +1,70 b''
1 1 .. _troubleshooting:
2 2
3 3
4 4 ===============
5 5 Troubleshooting
6 6 ===============
7 7
8 8 :Q: **Missing static files?**
9 9 :A: Make sure either to set the `static_files = true` in the .ini file or
10 double check the root path for your http setup. It should point to
10 double check the root path for your http setup. It should point to
11 11 for example:
12 12 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
13
14 |
13
14 |
15 15
16 16 :Q: **Can't install celery/rabbitmq?**
17 17 :A: Don't worry RhodeCode works without them too. No extra setup is required.
18 18 Try out great celery docs for further help.
19 19
20 20 |
21
21
22 22 :Q: **Long lasting push timeouts?**
23 23 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
24 24 are caused by https server and not RhodeCode.
25
26 |
25
26 |
27 27
28 28 :Q: **Large pushes timeouts?**
29 29 :A: Make sure you set a proper max_body_size for the http server. Very often
30 30 Apache, Nginx or other http servers kill the connection due to to large
31 31 body.
32 32
33 33 |
34 34
35 35 :Q: **Apache doesn't pass basicAuth on pull/push?**
36 36 :A: Make sure you added `WSGIPassAuthorization true`.
37 37
38 38 |
39 39
40 40 :Q: **Git fails on push/pull?**
41 41 :A: Make sure you're using an wsgi http server that can handle chunked encoding
42 42 such as `waitress` or `gunicorn`
43 43
44 44 |
45 45
46 46 :Q: **How i use hooks in RhodeCode?**
47 47 :A: It's easy if they are python hooks just use advanced link in hooks section
48 48 in Admin panel, that works only for Mercurial. If you want to use githooks,
49 just install proper one in repository eg. create file in
49 just install proper one in repository eg. create file in
50 50 `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
51 51 connect to callback hooks, for both Git and Mercurial.
52 52
53 53 |
54 54
55 55 :Q: **RhodeCode is slow for me, how can i make it faster?**
56 56 :A: See the :ref:`performance` section
57 57
58 For further questions search the `Issues tracker`_, or post a message in the
58 For further questions search the `Issues tracker`_, or post a message in the
59 59 `google group rhodecode`_
60 60
61 61 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
62 62 .. _python: http://www.python.org/
63 63 .. _mercurial: http://mercurial.selenic.com/
64 64 .. _celery: http://celeryproject.org/
65 65 .. _rabbitmq: http://www.rabbitmq.com/
66 66 .. _python-ldap: http://www.python-ldap.org/
67 67 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
68 68 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
69 69 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
70 .. _google group rhodecode: http://groups.google.com/group/rhodecode No newline at end of file
70 .. _google group rhodecode: http://groups.google.com/group/rhodecode
@@ -1,342 +1,342 b''
1 1 <%page args="parent" />
2 2 <div class="box">
3 3 <!-- box / title -->
4 4 <div class="title">
5 5 <h5>
6 6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
7 7 </h5>
8 8 %if c.rhodecode_user.username != 'default':
9 9 <ul class="links">
10 10 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
11 11 <li>
12 12 %if c.group:
13 13 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
14 14 %else:
15 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span>
15 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span>
16 16 %endif
17 17 </li>
18 18 %endif
19 19 %if c.group and h.HasReposGroupPermissionAny('group.admin')(c.group.group_name):
20 20 <li>
21 21 <span>${h.link_to(_('Edit group'),h.url('edit_repos_group',group_name=c.group.group_name), title=_('You have admin right to this group, and can edit it'))}</span>
22 22 </li>
23 23 %endif
24 24 </ul>
25 25 %endif
26 26 </div>
27 27 <!-- end box / title -->
28 28 <div class="table">
29 29 % if c.groups:
30 30 <div id='groups_list_wrap' class="yui-skin-sam">
31 31 <table id="groups_list">
32 32 <thead>
33 33 <tr>
34 34 <th class="left"><a href="#">${_('Group name')}</a></th>
35 35 <th class="left"><a href="#">${_('Description')}</a></th>
36 36 ##<th class="left"><a href="#">${_('Number of repositories')}</a></th>
37 37 </tr>
38 38 </thead>
39 39
40 40 ## REPO GROUPS
41 41 % for gr in c.groups:
42 42 <tr>
43 43 <td>
44 44 <div style="white-space: nowrap">
45 45 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
46 46 ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))}
47 47 </div>
48 48 </td>
49 49 %if c.visual.stylify_metatags:
50 50 <td>${h.urlify_text(h.desc_stylize(gr.group_description))}</td>
51 51 %else:
52 52 <td>${gr.group_description}</td>
53 53 %endif
54 54 ## this is commented out since for multi nested repos can be HEAVY!
55 55 ## in number of executed queries during traversing uncomment at will
56 56 ##<td><b>${gr.repositories_recursive_count}</b></td>
57 57 </tr>
58 58 % endfor
59 59 </table>
60 60 </div>
61 61 <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div>
62 62 <div style="height: 20px"></div>
63 63 % endif
64 64 <div id="welcome" style="display:none;text-align:center">
65 65 <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1>
66 66 </div>
67 67 <%cnt=0%>
68 68 <%namespace name="dt" file="/data_table/_dt_elements.html"/>
69 69 % if c.visual.lightweight_dashboard is False:
70 70 ## old full detailed version
71 71 <div id='repos_list_wrap' class="yui-skin-sam">
72 72 <table id="repos_list">
73 73 <thead>
74 74 <tr>
75 75 <th class="left"></th>
76 76 <th class="left">${_('Name')}</th>
77 77 <th class="left">${_('Description')}</th>
78 78 <th class="left">${_('Last change')}</th>
79 79 <th class="left">${_('Tip')}</th>
80 80 <th class="left">${_('Owner')}</th>
81 81 <th class="left">${_('RSS')}</th>
82 82 <th class="left">${_('Atom')}</th>
83 83 </tr>
84 84 </thead>
85 85 <tbody>
86 86 %for cnt,repo in enumerate(c.repos_list):
87 87 <tr class="parity${(cnt+1)%2}">
88 88 ##QUICK MENU
89 89 <td class="quick_repo_menu">
90 90 ${dt.quick_menu(repo['name'])}
91 91 </td>
92 92 ##REPO NAME AND ICONS
93 93 <td class="reponame">
94 94 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']),pageargs.get('short_repo_names'))}
95 95 </td>
96 96 ##DESCRIPTION
97 97 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
98 98 %if c.visual.stylify_metatags:
99 99 ${h.urlify_text(h.desc_stylize(h.truncate(repo['description'],60)))}</span>
100 100 %else:
101 101 ${h.truncate(repo['description'],60)}</span>
102 102 %endif
103 103 </td>
104 104 ##LAST CHANGE DATE
105 105 <td>
106 106 ${dt.last_change(repo['last_change'])}
107 107 </td>
108 108 ##LAST REVISION
109 109 <td>
110 110 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])}
111 111 </td>
112 112 ##
113 113 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
114 114 <td>
115 115 ${dt.rss(repo['name'])}
116 116 </td>
117 117 <td>
118 118 ${dt.atom(repo['name'])}
119 119 </td>
120 120 </tr>
121 121 %endfor
122 122 </tbody>
123 123 </table>
124 124 </div>
125 125 % else:
126 126 ## lightweight version
127 127 <div class="yui-skin-sam" id="repos_list_wrap"></div>
128 128 <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div>
129 129 % endif
130 130 </div>
131 131 </div>
132 132 % if c.visual.lightweight_dashboard is False:
133 133 <script>
134 134 YUD.get('repo_count').innerHTML = ${cnt+1 if cnt else 0};
135 135
136 136 // groups table sorting
137 137 var myColumnDefs = [
138 138 {key:"name",label:"${_('Group name')}",sortable:true,
139 139 sortOptions: { sortFunction: groupNameSort }},
140 140 {key:"desc",label:"${_('Description')}",sortable:true},
141 141 ];
142 142
143 143 var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list"));
144 144
145 145 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
146 146 myDataSource.responseSchema = {
147 147 fields: [
148 148 {key:"name"},
149 149 {key:"desc"},
150 150 ]
151 151 };
152 152
153 153 var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,{
154 154 sortedBy:{key:"name",dir:"asc"},
155 155 paginator: new YAHOO.widget.Paginator({
156 156 rowsPerPage: 50,
157 157 alwaysVisible: false,
158 158 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
159 159 pageLinks: 5,
160 160 containerClass: 'pagination-wh',
161 161 currentPageClass: 'pager_curpage',
162 162 pageLinkClass: 'pager_link',
163 163 nextPageLinkLabel: '&gt;',
164 164 previousPageLinkLabel: '&lt;',
165 165 firstPageLinkLabel: '&lt;&lt;',
166 166 lastPageLinkLabel: '&gt;&gt;',
167 167 containers:['group-user-paginator']
168 168 }),
169 169 MSG_SORTASC:"${_('Click to sort ascending')}",
170 170 MSG_SORTDESC:"${_('Click to sort descending')}"
171 171 });
172 172
173 173 // main table sorting
174 174 var myColumnDefs = [
175 175 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
176 176 {key:"name",label:"${_('Name')}",sortable:true,
177 177 sortOptions: { sortFunction: nameSort }},
178 178 {key:"desc",label:"${_('Description')}",sortable:true},
179 179 {key:"last_change",label:"${_('Last Change')}",sortable:true,
180 180 sortOptions: { sortFunction: ageSort }},
181 181 {key:"tip",label:"${_('Tip')}",sortable:true,
182 182 sortOptions: { sortFunction: revisionSort }},
183 183 {key:"owner",label:"${_('Owner')}",sortable:true},
184 184 {key:"rss",label:"",sortable:false},
185 185 {key:"atom",label:"",sortable:false},
186 186 ];
187 187
188 188 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list"));
189 189
190 190 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
191 191
192 192 myDataSource.responseSchema = {
193 193 fields: [
194 194 {key:"menu"},
195 195 //{key:"raw_name"},
196 196 {key:"name"},
197 197 {key:"desc"},
198 198 {key:"last_change"},
199 199 {key:"tip"},
200 200 {key:"owner"},
201 201 {key:"rss"},
202 202 {key:"atom"},
203 203 ]
204 204 };
205 205
206 206 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,
207 207 {
208 208 sortedBy:{key:"name",dir:"asc"},
209 209 MSG_SORTASC:"${_('Click to sort ascending')}",
210 210 MSG_SORTDESC:"${_('Click to sort descending')}",
211 211 MSG_EMPTY:"${_('No records found.')}",
212 212 MSG_ERROR:"${_('Data error.')}",
213 213 MSG_LOADING:"${_('Loading...')}",
214 214 }
215 215 );
216 216 myDataTable.subscribe('postRenderEvent',function(oArgs) {
217 217 tooltip_activate();
218 218 quick_repo_menu();
219 219 var func = function(node){
220 220 return node.parentNode.parentNode.parentNode.parentNode;
221 221 }
222 222 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func);
223 223 });
224 224
225 225 </script>
226 226 % else:
227 227 <script>
228 228 var data = ${c.data|n};
229 229 var myDataSource = new YAHOO.util.DataSource(data);
230 230 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
231 231
232 232 myDataSource.responseSchema = {
233 233 resultsList: "records",
234 234 fields: [
235 235 {key:"menu"},
236 236 {key:"raw_name"},
237 237 {key:"name"},
238 238 {key:"desc"},
239 239 {key:"last_change"},
240 240 {key:"last_changeset"},
241 241 {key:"owner"},
242 242 {key:"rss"},
243 243 {key:"atom"},
244 244 ]
245 245 };
246 246 myDataSource.doBeforeCallback = function(req,raw,res,cb) {
247 247 // This is the filter function
248 248 var data = res.results || [],
249 249 filtered = [],
250 250 i,l;
251 251
252 252 if (req) {
253 253 req = req.toLowerCase();
254 254 for (i = 0; i<data.length; i++) {
255 255 var pos = data[i].raw_name.toLowerCase().indexOf(req)
256 256 if (pos != -1) {
257 257 filtered.push(data[i]);
258 258 }
259 259 }
260 260 res.results = filtered;
261 261 }
262 262 YUD.get('repo_count').innerHTML = res.results.length;
263 263 return res;
264 264 }
265 265
266 266 // main table sorting
267 267 var myColumnDefs = [
268 268 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
269 269 {key:"name",label:"${_('Name')}",sortable:true,
270 270 sortOptions: { sortFunction: nameSort }},
271 271 {key:"desc",label:"${_('Description')}",sortable:true},
272 272 {key:"last_change",label:"${_('Last Change')}",sortable:true,
273 273 sortOptions: { sortFunction: ageSort }},
274 274 {key:"last_changeset",label:"${_('Tip')}",sortable:true,
275 275 sortOptions: { sortFunction: revisionSort }},
276 276 {key:"owner",label:"${_('Owner')}",sortable:true},
277 277 {key:"rss",label:"",sortable:false},
278 278 {key:"atom",label:"",sortable:false},
279 279 ];
280 280
281 281 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{
282 282 sortedBy:{key:"name",dir:"asc"},
283 283 paginator: new YAHOO.widget.Paginator({
284 284 rowsPerPage: ${c.visual.lightweight_dashboard_items},
285 285 alwaysVisible: false,
286 286 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}",
287 287 pageLinks: 5,
288 288 containerClass: 'pagination-wh',
289 289 currentPageClass: 'pager_curpage',
290 290 pageLinkClass: 'pager_link',
291 291 nextPageLinkLabel: '&gt;',
292 292 previousPageLinkLabel: '&lt;',
293 293 firstPageLinkLabel: '&lt;&lt;',
294 294 lastPageLinkLabel: '&gt;&gt;',
295 295 containers:['user-paginator']
296 296 }),
297 297
298 298 MSG_SORTASC:"${_('Click to sort ascending')}",
299 299 MSG_SORTDESC:"${_('Click to sort descending')}",
300 300 MSG_EMPTY:"${_('No records found.')}",
301 301 MSG_ERROR:"${_('Data error.')}",
302 302 MSG_LOADING:"${_('Loading...')}",
303 303 }
304 304 );
305 305 myDataTable.subscribe('postRenderEvent',function(oArgs) {
306 306 tooltip_activate();
307 307 quick_repo_menu();
308 308 });
309 309
310 310 var filterTimeout = null;
311 311
312 312 updateFilter = function () {
313 313 // Reset timeout
314 314 filterTimeout = null;
315 315
316 316 // Reset sort
317 317 var state = myDataTable.getState();
318 318 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
319 319
320 320 // Get filtered data
321 321 myDataSource.sendRequest(YUD.get('q_filter').value,{
322 322 success : myDataTable.onDataReturnInitializeTable,
323 323 failure : myDataTable.onDataReturnInitializeTable,
324 324 scope : myDataTable,
325 325 argument: state
326 326 });
327 327
328 328 };
329 329 YUE.on('q_filter','click',function(){
330 330 if(!YUD.hasClass('q_filter', 'loaded')){
331 331 YUD.get('q_filter').value = '';
332 332 //TODO: load here full list later to do search within groups
333 333 YUD.addClass('q_filter', 'loaded');
334 334 }
335 335 });
336 336
337 337 YUE.on('q_filter','keyup',function (e) {
338 338 clearTimeout(filterTimeout);
339 339 filterTimeout = setTimeout(updateFilter,600);
340 340 });
341 341 </script>
342 342 % endif
@@ -1,61 +1,60 b''
1 1 from rhodecode.tests import *
2 2 from rhodecode.model.db import UserRepoToPerm, Repository, User, Permission
3 3 from rhodecode.model.meta import Session
4 4
5 5
6 6 def _get_permission_for_user(user, repo):
7 7 perm = UserRepoToPerm.query()\
8 8 .filter(UserRepoToPerm.repository ==
9 9 Repository.get_by_repo_name(repo))\
10 10 .filter(UserRepoToPerm.user == User.get_by_username(user))\
11 11 .all()
12 12 return perm
13 13
14 14
15 15 class TestSettingsController(TestController):
16 16
17 17 def test_index(self):
18 18 self.log_user()
19 19 response = self.app.get(url(controller='settings', action='index',
20 20 repo_name=HG_REPO))
21 21 # Test response...
22 22
23 23 def test_set_private_flag_sets_default_to_none(self):
24 24 self.log_user()
25 25 #initially repository perm should be read
26 26 perm = _get_permission_for_user(user='default', repo=HG_REPO)
27 27 self.assertTrue(len(perm), 1)
28 28 self.assertEqual(perm[0].permission.permission_name, 'repository.read')
29 29 self.assertEqual(Repository.get_by_repo_name(HG_REPO).private, False)
30 30
31 31 response = self.app.put(url('repo', repo_name=HG_REPO),
32 32 _get_repo_create_params(repo_private=1,
33 33 repo_name=HG_REPO,
34 34 user=TEST_USER_ADMIN_LOGIN))
35 35 self.checkSessionFlash(response,
36 36 msg='Repository %s updated successfully' % (HG_REPO))
37 37 self.assertEqual(Repository.get_by_repo_name(HG_REPO).private, True)
38 38
39 39 #now the repo default permission should be None
40 40 perm = _get_permission_for_user(user='default', repo=HG_REPO)
41 41 self.assertTrue(len(perm), 1)
42 42 self.assertEqual(perm[0].permission.permission_name, 'repository.none')
43 43
44 44 response = self.app.put(url('repo', repo_name=HG_REPO),
45 45 _get_repo_create_params(repo_private=False,
46 46 repo_name=HG_REPO,
47 47 user=TEST_USER_ADMIN_LOGIN))
48 48 self.checkSessionFlash(response,
49 49 msg='Repository %s updated successfully' % (HG_REPO))
50 50 self.assertEqual(Repository.get_by_repo_name(HG_REPO).private, False)
51 51
52 52 #we turn off private now the repo default permission should stay None
53 53 perm = _get_permission_for_user(user='default', repo=HG_REPO)
54 54 self.assertTrue(len(perm), 1)
55 55 self.assertEqual(perm[0].permission.permission_name, 'repository.none')
56 56
57 57 #update this permission back
58 58 perm[0].permission = Permission.get_by_key('repository.read')
59 59 Session().add(perm[0])
60 60 Session().commit()
61 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now