##// END OF EJS Templates
fixes #79 cut off limit was added into .ini config files
marcink -
r812:30ad41c7 beta
parent child Browse files
Show More
@@ -1,214 +1,215 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # RhodeCode - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ################################################################################
11 11 ## Uncomment and replace with the address which should receive ##
12 12 ## any error reports after application crash ##
13 13 ## Additionally those settings will be used by RhodeCode mailing system ##
14 14 ################################################################################
15 15 #email_to = admin@localhost
16 16 #error_email_from = paste_error@localhost
17 17 #app_email_from = rhodecode-noreply@localhost
18 18 #error_message =
19 19
20 20 #smtp_server = mail.server.com
21 21 #smtp_username =
22 22 #smtp_password =
23 23 #smtp_port =
24 24 #smtp_use_tls = false
25 25 #smtp_use_ssl = true
26 26
27 27 [server:main]
28 28 ##nr of threads to spawn
29 29 threadpool_workers = 5
30 30
31 31 ##max request before thread respawn
32 32 threadpool_max_requests = 6
33 33
34 34 ##option to use threads of process
35 35 use_threadpool = false
36 36
37 37 use = egg:Paste#http
38 38 host = 0.0.0.0
39 39 port = 5000
40 40
41 41 [app:main]
42 42 use = egg:rhodecode
43 43 full_stack = true
44 44 static_files = true
45 45 lang=en
46 46 cache_dir = %(here)s/data
47 47 index_dir = %(here)s/data/index
48 cut_off_limit = 256000
48 49
49 50 ####################################
50 51 ### CELERY CONFIG ####
51 52 ####################################
52 53 use_celery = false
53 54 broker.host = localhost
54 55 broker.vhost = rabbitmqhost
55 56 broker.port = 5672
56 57 broker.user = rabbitmq
57 58 broker.password = qweqwe
58 59
59 60 celery.imports = rhodecode.lib.celerylib.tasks
60 61
61 62 celery.result.backend = amqp
62 63 celery.result.dburi = amqp://
63 64 celery.result.serialier = json
64 65
65 66 #celery.send.task.error.emails = true
66 67 #celery.amqp.task.result.expires = 18000
67 68
68 69 celeryd.concurrency = 2
69 70 #celeryd.log.file = celeryd.log
70 71 celeryd.log.level = debug
71 72 celeryd.max.tasks.per.child = 3
72 73
73 74 #tasks will never be sent to the queue, but executed locally instead.
74 75 celery.always.eager = false
75 76
76 77 ####################################
77 78 ### BEAKER CACHE ####
78 79 ####################################
79 80 beaker.cache.data_dir=/%(here)s/data/cache/data
80 81 beaker.cache.lock_dir=/%(here)s/data/cache/lock
81 82 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
82 83
83 84 beaker.cache.super_short_term.type=memory
84 85 beaker.cache.super_short_term.expire=10
85 86
86 87 beaker.cache.short_term.type=memory
87 88 beaker.cache.short_term.expire=60
88 89
89 90 beaker.cache.long_term.type=memory
90 91 beaker.cache.long_term.expire=36000
91 92
92 93 beaker.cache.sql_cache_short.type=memory
93 94 beaker.cache.sql_cache_short.expire=10
94 95
95 96 beaker.cache.sql_cache_med.type=memory
96 97 beaker.cache.sql_cache_med.expire=360
97 98
98 99 beaker.cache.sql_cache_long.type=file
99 100 beaker.cache.sql_cache_long.expire=3600
100 101
101 102 ####################################
102 103 ### BEAKER SESSION ####
103 104 ####################################
104 105 ## Type of storage used for the session, current types are
105 106 ## dbm, file, memcached, database, and memory.
106 107 ## The storage uses the Container API
107 108 ##that is also used by the cache system.
108 109 beaker.session.type = file
109 110
110 111 beaker.session.key = rhodecode
111 112 beaker.session.secret = g654dcno0-9873jhgfreyu
112 113 beaker.session.timeout = 36000
113 114
114 115 ##auto save the session to not to use .save()
115 116 beaker.session.auto = False
116 117
117 118 ##true exire at browser close
118 119 #beaker.session.cookie_expires = 3600
119 120
120 121
121 122 ################################################################################
122 123 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
123 124 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
124 125 ## execute malicious code after an exception is raised. ##
125 126 ################################################################################
126 127 #set debug = false
127 128
128 129 ##################################
129 130 ### LOGVIEW CONFIG ###
130 131 ##################################
131 132 logview.sqlalchemy = #faa
132 133 logview.pylons.templating = #bfb
133 134 logview.pylons.util = #eee
134 135
135 136 #########################################################
136 137 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
137 138 #########################################################
138 139 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
139 140 #sqlalchemy.db1.echo = False
140 141 #sqlalchemy.db1.pool_recycle = 3600
141 142 sqlalchemy.convert_unicode = true
142 143
143 144 ################################
144 145 ### LOGGING CONFIGURATION ####
145 146 ################################
146 147 [loggers]
147 148 keys = root, routes, rhodecode, sqlalchemy,beaker,templates
148 149
149 150 [handlers]
150 151 keys = console
151 152
152 153 [formatters]
153 154 keys = generic,color_formatter
154 155
155 156 #############
156 157 ## LOGGERS ##
157 158 #############
158 159 [logger_root]
159 160 level = NOTSET
160 161 handlers = console
161 162
162 163 [logger_routes]
163 164 level = DEBUG
164 165 handlers = console
165 166 qualname = routes.middleware
166 167 # "level = DEBUG" logs the route matched and routing variables.
167 168 propagate = 0
168 169
169 170 [logger_beaker]
170 171 level = ERROR
171 172 handlers = console
172 173 qualname = beaker.container
173 174 propagate = 0
174 175
175 176 [logger_templates]
176 177 level = INFO
177 178 handlers = console
178 179 qualname = pylons.templating
179 180 propagate = 0
180 181
181 182 [logger_rhodecode]
182 183 level = DEBUG
183 184 handlers = console
184 185 qualname = rhodecode
185 186 propagate = 0
186 187
187 188 [logger_sqlalchemy]
188 189 level = ERROR
189 190 handlers = console
190 191 qualname = sqlalchemy.engine
191 192 propagate = 0
192 193
193 194 ##############
194 195 ## HANDLERS ##
195 196 ##############
196 197
197 198 [handler_console]
198 199 class = StreamHandler
199 200 args = (sys.stderr,)
200 201 level = NOTSET
201 202 formatter = color_formatter
202 203
203 204 ################
204 205 ## FORMATTERS ##
205 206 ################
206 207
207 208 [formatter_generic]
208 209 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
209 210 datefmt = %Y-%m-%d %H:%M:%S
210 211
211 212 [formatter_color_formatter]
212 213 class=rhodecode.lib.colored_formatter.ColorFormatter
213 214 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
214 215 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
@@ -1,203 +1,204 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # rhodecode - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ################################################################################
11 11 ## Uncomment and replace with the address which should receive ##
12 12 ## any error reports after application crash ##
13 13 ## Additionally those settings will be used by rhodecode mailing system ##
14 14 ################################################################################
15 15 #email_to = admin@localhost
16 16 #error_email_from = paste_error@localhost
17 17 #app_email_from = rhodecode-noreply@localhost
18 18 #error_message =
19 19
20 20 #smtp_server = mail.server.com
21 21 #smtp_username =
22 22 #smtp_password =
23 23 #smtp_port =
24 24 #smtp_use_tls = false
25 25 #smtp_use_ssl = true
26 26
27 27 [server:main]
28 28 ##nr of threads to spawn
29 29 threadpool_workers = 5
30 30
31 31 ##max request before thread respawn
32 32 threadpool_max_requests = 2
33 33
34 34 ##option to use threads of process
35 35 use_threadpool = true
36 36
37 37 use = egg:Paste#http
38 38 host = 127.0.0.1
39 39 port = 8001
40 40
41 41 [app:main]
42 42 use = egg:rhodecode
43 43 full_stack = true
44 44 static_files = false
45 45 lang=en
46 46 cache_dir = %(here)s/data
47 47 index_dir = %(here)s/data/index
48 cut_off_limit = 256000
48 49
49 50 ####################################
50 51 ### CELERY CONFIG ####
51 52 ####################################
52 53 use_celery = false
53 54 broker.host = localhost
54 55 broker.vhost = rabbitmqhost
55 56 broker.port = 5672
56 57 broker.user = rabbitmq
57 58 broker.password = qweqwe
58 59
59 60 celery.imports = rhodecode.lib.celerylib.tasks
60 61
61 62 celery.result.backend = amqp
62 63 celery.result.dburi = amqp://
63 64 celery.result.serialier = json
64 65
65 66 #celery.send.task.error.emails = true
66 67 #celery.amqp.task.result.expires = 18000
67 68
68 69 celeryd.concurrency = 2
69 70 #celeryd.log.file = celeryd.log
70 71 celeryd.log.level = debug
71 72 celeryd.max.tasks.per.child = 3
72 73
73 74 #tasks will never be sent to the queue, but executed locally instead.
74 75 celery.always.eager = false
75 76
76 77 ####################################
77 78 ### BEAKER CACHE ####
78 79 ####################################
79 80 beaker.cache.data_dir=/%(here)s/data/cache/data
80 81 beaker.cache.lock_dir=/%(here)s/data/cache/lock
81 82 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
82 83
83 84 beaker.cache.super_short_term.type=memory
84 85 beaker.cache.super_short_term.expire=10
85 86
86 87 beaker.cache.short_term.type=memory
87 88 beaker.cache.short_term.expire=60
88 89
89 90 beaker.cache.long_term.type=memory
90 91 beaker.cache.long_term.expire=36000
91 92
92 93
93 94 beaker.cache.sql_cache_short.type=memory
94 95 beaker.cache.sql_cache_short.expire=5
95 96
96 97 beaker.cache.sql_cache_med.type=memory
97 98 beaker.cache.sql_cache_med.expire=360
98 99
99 100 beaker.cache.sql_cache_long.type=file
100 101 beaker.cache.sql_cache_long.expire=3600
101 102
102 103 ####################################
103 104 ### BEAKER SESSION ####
104 105 ####################################
105 106 ## Type of storage used for the session, current types are
106 107 ## dbm, file, memcached, database, and memory.
107 108 ## The storage uses the Container API
108 109 ##that is also used by the cache system.
109 110 beaker.session.type = file
110 111
111 112 beaker.session.key = rhodecode
112 113 beaker.session.secret = g654dcno0-9873jhgfreyu
113 114 beaker.session.timeout = 36000
114 115
115 116 ##auto save the session to not to use .save()
116 117 beaker.session.auto = False
117 118
118 119 ##true exire at browser close
119 120 #beaker.session.cookie_expires = 3600
120 121
121 122
122 123 ################################################################################
123 124 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
124 125 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
125 126 ## execute malicious code after an exception is raised. ##
126 127 ################################################################################
127 128 set debug = false
128 129
129 130 ##################################
130 131 ### LOGVIEW CONFIG ###
131 132 ##################################
132 133 logview.sqlalchemy = #faa
133 134 logview.pylons.templating = #bfb
134 135 logview.pylons.util = #eee
135 136
136 137 #########################################################
137 138 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
138 139 #########################################################
139 140 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
140 141 #sqlalchemy.db1.echo = False
141 142 #sqlalchemy.db1.pool_recycle = 3600
142 143 sqlalchemy.convert_unicode = true
143 144
144 145 ################################
145 146 ### LOGGING CONFIGURATION ####
146 147 ################################
147 148 [loggers]
148 149 keys = root, routes, rhodecode, sqlalchemy
149 150
150 151 [handlers]
151 152 keys = console
152 153
153 154 [formatters]
154 155 keys = generic,color_formatter
155 156
156 157 #############
157 158 ## LOGGERS ##
158 159 #############
159 160 [logger_root]
160 161 level = INFO
161 162 handlers = console
162 163
163 164 [logger_routes]
164 165 level = INFO
165 166 handlers = console
166 167 qualname = routes.middleware
167 168 # "level = DEBUG" logs the route matched and routing variables.
168 169 propagate = 0
169 170
170 171 [logger_rhodecode]
171 172 level = DEBUG
172 173 handlers = console
173 174 qualname = rhodecode
174 175 propagate = 0
175 176
176 177 [logger_sqlalchemy]
177 178 level = ERROR
178 179 handlers = console
179 180 qualname = sqlalchemy.engine
180 181 propagate = 0
181 182
182 183 ##############
183 184 ## HANDLERS ##
184 185 ##############
185 186
186 187 [handler_console]
187 188 class = StreamHandler
188 189 args = (sys.stderr,)
189 190 level = NOTSET
190 191 formatter = color_formatter
191 192
192 193 ################
193 194 ## FORMATTERS ##
194 195 ################
195 196
196 197 [formatter_generic]
197 198 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
198 199 datefmt = %Y-%m-%d %H:%M:%S
199 200
200 201 [formatter_color_formatter]
201 202 class=rhodecode.lib.colored_formatter.ColorFormatter
202 203 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
203 204 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
@@ -1,203 +1,204 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # RhodeCode - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ################################################################################
11 11 ## Uncomment and replace with the address which should receive ##
12 12 ## any error reports after application crash ##
13 13 ## Additionally those settings will be used by RhodeCode mailing system ##
14 14 ################################################################################
15 15 #email_to = admin@localhost
16 16 #error_email_from = paste_error@localhost
17 17 #app_email_from = rhodecode-noreply@localhost
18 18 #error_message =
19 19
20 20 #smtp_server = mail.server.com
21 21 #smtp_username =
22 22 #smtp_password =
23 23 #smtp_port =
24 24 #smtp_use_tls = false
25 25 #smtp_use_ssl = true
26 26
27 27 [server:main]
28 28 ##nr of threads to spawn
29 29 threadpool_workers = 5
30 30
31 31 ##max request before thread respawn
32 32 threadpool_max_requests = 10
33 33
34 34 ##option to use threads of process
35 35 use_threadpool = true
36 36
37 37 use = egg:Paste#http
38 38 host = 127.0.0.1
39 39 port = 5000
40 40
41 41 [app:main]
42 42 use = egg:rhodecode
43 43 full_stack = true
44 44 static_files = true
45 45 lang=en
46 46 cache_dir = %(here)s/data
47 47 index_dir = %(here)s/data/index
48 48 app_instance_uuid = ${app_instance_uuid}
49 cut_off_limit = 256000
49 50
50 51 ####################################
51 52 ### CELERY CONFIG ####
52 53 ####################################
53 54 use_celery = false
54 55 broker.host = localhost
55 56 broker.vhost = rabbitmqhost
56 57 broker.port = 5672
57 58 broker.user = rabbitmq
58 59 broker.password = qweqwe
59 60
60 61 celery.imports = rhodecode.lib.celerylib.tasks
61 62
62 63 celery.result.backend = amqp
63 64 celery.result.dburi = amqp://
64 65 celery.result.serialier = json
65 66
66 67 #celery.send.task.error.emails = true
67 68 #celery.amqp.task.result.expires = 18000
68 69
69 70 celeryd.concurrency = 2
70 71 #celeryd.log.file = celeryd.log
71 72 celeryd.log.level = debug
72 73 celeryd.max.tasks.per.child = 3
73 74
74 75 #tasks will never be sent to the queue, but executed locally instead.
75 76 celery.always.eager = false
76 77
77 78 ####################################
78 79 ### BEAKER CACHE ####
79 80 ####################################
80 81 beaker.cache.data_dir=/%(here)s/data/cache/data
81 82 beaker.cache.lock_dir=/%(here)s/data/cache/lock
82 83 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
83 84
84 85 beaker.cache.super_short_term.type=memory
85 86 beaker.cache.super_short_term.expire=10
86 87
87 88 beaker.cache.short_term.type=memory
88 89 beaker.cache.short_term.expire=60
89 90
90 91 beaker.cache.long_term.type=memory
91 92 beaker.cache.long_term.expire=36000
92 93
93 94 beaker.cache.sql_cache_short.type=memory
94 95 beaker.cache.sql_cache_short.expire=10
95 96
96 97 beaker.cache.sql_cache_med.type=memory
97 98 beaker.cache.sql_cache_med.expire=360
98 99
99 100 beaker.cache.sql_cache_long.type=file
100 101 beaker.cache.sql_cache_long.expire=3600
101 102
102 103 ####################################
103 104 ### BEAKER SESSION ####
104 105 ####################################
105 106 ## Type of storage used for the session, current types are
106 107 ## dbm, file, memcached, database, and memory.
107 108 ## The storage uses the Container API
108 109 ##that is also used by the cache system.
109 110 beaker.session.type = file
110 111
111 112 beaker.session.key = rhodecode
112 113 beaker.session.secret = ${app_instance_secret}
113 114 beaker.session.timeout = 36000
114 115
115 116 ##auto save the session to not to use .save()
116 117 beaker.session.auto = False
117 118
118 119 ##true exire at browser close
119 120 #beaker.session.cookie_expires = 3600
120 121
121 122
122 123 ################################################################################
123 124 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
124 125 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
125 126 ## execute malicious code after an exception is raised. ##
126 127 ################################################################################
127 128 set debug = false
128 129
129 130 ##################################
130 131 ### LOGVIEW CONFIG ###
131 132 ##################################
132 133 logview.sqlalchemy = #faa
133 134 logview.pylons.templating = #bfb
134 135 logview.pylons.util = #eee
135 136
136 137 #########################################################
137 138 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
138 139 #########################################################
139 140 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
140 141 #sqlalchemy.db1.echo = False
141 142 #sqlalchemy.db1.pool_recycle = 3600
142 143 sqlalchemy.convert_unicode = true
143 144
144 145 ################################
145 146 ### LOGGING CONFIGURATION ####
146 147 ################################
147 148 [loggers]
148 149 keys = root, routes, rhodecode, sqlalchemy
149 150
150 151 [handlers]
151 152 keys = console
152 153
153 154 [formatters]
154 155 keys = generic,color_formatter
155 156
156 157 #############
157 158 ## LOGGERS ##
158 159 #############
159 160 [logger_root]
160 161 level = INFO
161 162 handlers = console
162 163
163 164 [logger_routes]
164 165 level = INFO
165 166 handlers = console
166 167 qualname = routes.middleware
167 168 # "level = DEBUG" logs the route matched and routing variables.
168 169 propagate = 0
169 170
170 171 [logger_rhodecode]
171 172 level = DEBUG
172 173 handlers = console
173 174 qualname = rhodecode
174 175 propagate = 0
175 176
176 177 [logger_sqlalchemy]
177 178 level = ERROR
178 179 handlers = console
179 180 qualname = sqlalchemy.engine
180 181 propagate = 0
181 182
182 183 ##############
183 184 ## HANDLERS ##
184 185 ##############
185 186
186 187 [handler_console]
187 188 class = StreamHandler
188 189 args = (sys.stderr,)
189 190 level = NOTSET
190 191 formatter = color_formatter
191 192
192 193 ################
193 194 ## FORMATTERS ##
194 195 ################
195 196
196 197 [formatter_generic]
197 198 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
198 199 datefmt = %Y-%m-%d %H:%M:%S
199 200
200 201 [formatter_color_formatter]
201 202 class=rhodecode.lib.colored_formatter.ColorFormatter
202 203 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
203 204 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
@@ -1,187 +1,192 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # changeset controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.changeset
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 changeset controller for pylons
7
8 :created_on: Apr 25, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
5 13 # This program is free software; you can redistribute it and/or
6 14 # modify it under the terms of the GNU General Public License
7 15 # as published by the Free Software Foundation; version 2
8 16 # of the License or (at your opinion) any later version of the license.
9 17 #
10 18 # This program is distributed in the hope that it will be useful,
11 19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 21 # GNU General Public License for more details.
14 22 #
15 23 # You should have received a copy of the GNU General Public License
16 24 # along with this program; if not, write to the Free Software
17 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 26 # MA 02110-1301, USA.
19 """
20 Created on April 25, 2010
21 changeset controller for pylons
22 @author: marcink
23 """
27 import logging
28 import traceback
29
24 30 from pylons import tmpl_context as c, url, request, response
25 31 from pylons.i18n.translation import _
26 32 from pylons.controllers.util import redirect
33
34 import rhodecode.lib.helpers as h
27 35 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
28 36 from rhodecode.lib.base import BaseController, render
29 37 from rhodecode.lib.utils import EmptyChangeset
30 import rhodecode.lib.helpers as h
31 38 from rhodecode.model.scm import ScmModel
39
32 40 from vcs.exceptions import RepositoryError, ChangesetError
33 41 from vcs.nodes import FileNode
34 42 from vcs.utils import diffs as differ
35 import logging
36 import traceback
37 43
38 44 log = logging.getLogger(__name__)
39 45
40 46 class ChangesetController(BaseController):
41 47
42 48 @LoginRequired()
43 49 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
44 50 'repository.admin')
45 51 def __before__(self):
46 52 super(ChangesetController, self).__before__()
47 53
48 54 def index(self, revision):
49 55 hg_model = ScmModel()
50 cut_off_limit = 1024 * 250
51 56
52 57 def wrap_to_table(str):
53 58
54 59 return '''<table class="code-difftable">
55 60 <tr class="line">
56 61 <td class="lineno new"></td>
57 62 <td class="code"><pre>%s</pre></td>
58 63 </tr>
59 64 </table>''' % str
60 65
61 66 try:
62 67 c.changeset = hg_model.get_repo(c.repo_name).get_changeset(revision)
63 68 except RepositoryError, e:
64 69 log.error(traceback.format_exc())
65 70 h.flash(str(e), category='warning')
66 71 return redirect(url('home'))
67 72 else:
68 73 try:
69 74 c.changeset_old = c.changeset.parents[0]
70 75 except IndexError:
71 76 c.changeset_old = None
72 77 c.changes = []
73 78
74 79 #===================================================================
75 80 # ADDED FILES
76 81 #===================================================================
77 82 c.sum_added = 0
78 83 for node in c.changeset.added:
79 84
80 85 filenode_old = FileNode(node.path, '', EmptyChangeset())
81 86 if filenode_old.is_binary or node.is_binary:
82 87 diff = wrap_to_table(_('binary file'))
83 88 else:
84 89 c.sum_added += node.size
85 if c.sum_added < cut_off_limit:
90 if c.sum_added < self.cut_off_limit:
86 91 f_udiff = differ.get_udiff(filenode_old, node)
87 92 diff = differ.DiffProcessor(f_udiff).as_html()
88 93
89 94 else:
90 95 diff = wrap_to_table(_('Changeset is to big and was cut'
91 96 ' off, see raw changeset instead'))
92 97
93 98 cs1 = None
94 99 cs2 = node.last_changeset.raw_id
95 100 c.changes.append(('added', node, diff, cs1, cs2))
96 101
97 102 #===================================================================
98 103 # CHANGED FILES
99 104 #===================================================================
100 105 c.sum_removed = 0
101 106 for node in c.changeset.changed:
102 107 try:
103 108 filenode_old = c.changeset_old.get_node(node.path)
104 109 except ChangesetError:
105 110 filenode_old = FileNode(node.path, '', EmptyChangeset())
106 111
107 112 if filenode_old.is_binary or node.is_binary:
108 113 diff = wrap_to_table(_('binary file'))
109 114 else:
110 115
111 if c.sum_removed < cut_off_limit:
116 if c.sum_removed < self.cut_off_limit:
112 117 f_udiff = differ.get_udiff(filenode_old, node)
113 118 diff = differ.DiffProcessor(f_udiff).as_html()
114 119 if diff:
115 120 c.sum_removed += len(diff)
116 121 else:
117 122 diff = wrap_to_table(_('Changeset is to big and was cut'
118 123 ' off, see raw changeset instead'))
119 124
120 125
121 126 cs1 = filenode_old.last_changeset.raw_id
122 127 cs2 = node.last_changeset.raw_id
123 128 c.changes.append(('changed', node, diff, cs1, cs2))
124 129
125 130 #===================================================================
126 131 # REMOVED FILES
127 132 #===================================================================
128 133 for node in c.changeset.removed:
129 134 c.changes.append(('removed', node, None, None, None))
130 135
131 136 return render('changeset/changeset.html')
132 137
133 138 def raw_changeset(self, revision):
134 139
135 140 hg_model = ScmModel()
136 141 method = request.GET.get('diff', 'show')
137 142 try:
138 143 r = hg_model.get_repo(c.repo_name)
139 144 c.scm_type = r.alias
140 145 c.changeset = r.get_changeset(revision)
141 146 except RepositoryError:
142 147 log.error(traceback.format_exc())
143 148 return redirect(url('home'))
144 149 else:
145 150 try:
146 151 c.changeset_old = c.changeset.parents[0]
147 152 except IndexError:
148 153 c.changeset_old = None
149 154 c.changes = []
150 155
151 156 for node in c.changeset.added:
152 157 filenode_old = FileNode(node.path, '')
153 158 if filenode_old.is_binary or node.is_binary:
154 diff = _('binary file') +'\n'
159 diff = _('binary file') + '\n'
155 160 else:
156 161 f_udiff = differ.get_udiff(filenode_old, node)
157 162 diff = differ.DiffProcessor(f_udiff).raw_diff()
158 163
159 164 cs1 = None
160 165 cs2 = node.last_changeset.raw_id
161 166 c.changes.append(('added', node, diff, cs1, cs2))
162 167
163 168 for node in c.changeset.changed:
164 169 filenode_old = c.changeset_old.get_node(node.path)
165 170 if filenode_old.is_binary or node.is_binary:
166 171 diff = _('binary file')
167 172 else:
168 173 f_udiff = differ.get_udiff(filenode_old, node)
169 174 diff = differ.DiffProcessor(f_udiff).raw_diff()
170 175
171 176 cs1 = filenode_old.last_changeset.raw_id
172 177 cs2 = node.last_changeset.raw_id
173 178 c.changes.append(('changed', node, diff, cs1, cs2))
174 179
175 180 response.content_type = 'text/plain'
176
181
177 182 if method == 'download':
178 183 response.content_disposition = 'attachment; filename=%s.patch' % revision
179
184
180 185 parent = True if len(c.changeset.parents) > 0 else False
181 186 c.parent_tmpl = 'Parent %s' % c.changeset.parents[0].raw_id if parent else ''
182 187
183 188 c.diffs = ''
184 189 for x in c.changes:
185 190 c.diffs += x[2]
186
191
187 192 return render('changeset/raw_changeset.html')
@@ -1,247 +1,252 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # files controller for pylons
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.controllers.files
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 Files controller for RhodeCode
7
8 :created_on: Apr 21, 2010
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
6 13 # This program is free software; you can redistribute it and/or
7 14 # modify it under the terms of the GNU General Public License
8 15 # as published by the Free Software Foundation; version 2
9 16 # of the License or (at your opinion) any later version of the license.
10 17 #
11 18 # This program is distributed in the hope that it will be useful,
12 19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 21 # GNU General Public License for more details.
15 22 #
16 23 # You should have received a copy of the GNU General Public License
17 24 # along with this program; if not, write to the Free Software
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 """
21 Created on April 21, 2010
22 files controller for pylons
23 @author: marcink
24 """
27 import tempfile
28 import logging
29 import rhodecode.lib.helpers as h
30
25 31 from mercurial import archival
32
26 33 from pylons import request, response, session, tmpl_context as c, url
27 34 from pylons.i18n.translation import _
28 35 from pylons.controllers.util import redirect
36
29 37 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
30 38 from rhodecode.lib.base import BaseController, render
31 39 from rhodecode.lib.utils import EmptyChangeset
32 40 from rhodecode.model.scm import ScmModel
41
33 42 from vcs.exceptions import RepositoryError, ChangesetError
34 43 from vcs.nodes import FileNode
35 44 from vcs.utils import diffs as differ
36 import logging
37 import rhodecode.lib.helpers as h
38 import tempfile
39 45
40 46 log = logging.getLogger(__name__)
41 47
42 48 class FilesController(BaseController):
43 49
44 50 @LoginRequired()
45 51 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
46 52 'repository.admin')
47 53 def __before__(self):
48 54 super(FilesController, self).__before__()
49 c.file_size_limit = 250 * 1024 #limit of file size to display
50 55
51 56 def index(self, repo_name, revision, f_path):
52 57 hg_model = ScmModel()
53 58 c.repo = hg_model.get_repo(c.repo_name)
54 59 revision = request.POST.get('at_rev', None) or revision
55 60
56 61 def get_next_rev(cur):
57 62 max_rev = len(c.repo.revisions) - 1
58 63 r = cur + 1
59 64 if r > max_rev:
60 65 r = max_rev
61 66 return r
62 67
63 68 def get_prev_rev(cur):
64 69 r = cur - 1
65 70 return r
66 71
67 72 c.f_path = f_path
68 73
69 74
70 75 try:
71 76 c.changeset = c.repo.get_changeset(revision)
72 77 cur_rev = c.changeset.revision
73 78 prev_rev = c.repo.get_changeset(get_prev_rev(cur_rev)).raw_id
74 79 next_rev = c.repo.get_changeset(get_next_rev(cur_rev)).raw_id
75 80
76 81 c.url_prev = url('files_home', repo_name=c.repo_name,
77 82 revision=prev_rev, f_path=f_path)
78 83 c.url_next = url('files_home', repo_name=c.repo_name,
79 84 revision=next_rev, f_path=f_path)
80 85
81 86 try:
82 87 c.files_list = c.changeset.get_node(f_path)
83 88 c.file_history = self._get_history(c.repo, c.files_list, f_path)
84 89 except RepositoryError, e:
85 90 h.flash(str(e), category='warning')
86 91 redirect(h.url('files_home', repo_name=repo_name, revision=revision))
87 92
88 93 except RepositoryError, e:
89 94 h.flash(str(e), category='warning')
90 95 redirect(h.url('files_home', repo_name=repo_name, revision='tip'))
91 96
92 97
93 98
94 99 return render('files/files.html')
95 100
96 101 def rawfile(self, repo_name, revision, f_path):
97 102 hg_model = ScmModel()
98 103 c.repo = hg_model.get_repo(c.repo_name)
99 104 file_node = c.repo.get_changeset(revision).get_node(f_path)
100 105 response.content_type = file_node.mimetype
101 106 response.content_disposition = 'attachment; filename=%s' \
102 107 % f_path.split('/')[-1]
103 108 return file_node.content
104 109
105 110 def raw(self, repo_name, revision, f_path):
106 111 hg_model = ScmModel()
107 112 c.repo = hg_model.get_repo(c.repo_name)
108 113 file_node = c.repo.get_changeset(revision).get_node(f_path)
109 114 response.content_type = 'text/plain'
110 115
111 116 return file_node.content
112 117
113 118 def annotate(self, repo_name, revision, f_path):
114 119 hg_model = ScmModel()
115 120 c.repo = hg_model.get_repo(c.repo_name)
116 121
117 122 try:
118 123 c.cs = c.repo.get_changeset(revision)
119 124 c.file = c.cs.get_node(f_path)
120 125 except RepositoryError, e:
121 126 h.flash(str(e), category='warning')
122 127 redirect(h.url('files_home', repo_name=repo_name, revision=revision))
123 128
124 129 c.file_history = self._get_history(c.repo, c.file, f_path)
125 130
126 131 c.f_path = f_path
127 132
128 133 return render('files/files_annotate.html')
129 134
130 135 def archivefile(self, repo_name, revision, fileformat):
131 136 archive_specs = {
132 137 '.tar.bz2': ('application/x-tar', 'tbz2'),
133 138 '.tar.gz': ('application/x-tar', 'tgz'),
134 139 '.zip': ('application/zip', 'zip'),
135 140 }
136 141 if not archive_specs.has_key(fileformat):
137 142 return 'Unknown archive type %s' % fileformat
138 143
139 144 def read_in_chunks(file_object, chunk_size=1024 * 40):
140 145 """Lazy function (generator) to read a file piece by piece.
141 146 Default chunk size: 40k."""
142 147 while True:
143 148 data = file_object.read(chunk_size)
144 149 if not data:
145 150 break
146 151 yield data
147 152
148 153 archive = tempfile.TemporaryFile()
149 154 repo = ScmModel().get_repo(repo_name).repo
150 155 fname = '%s-%s%s' % (repo_name, revision, fileformat)
151 156 archival.archive(repo, archive, revision, archive_specs[fileformat][1],
152 157 prefix='%s-%s' % (repo_name, revision))
153 158 response.content_type = archive_specs[fileformat][0]
154 159 response.content_disposition = 'attachment; filename=%s' % fname
155 160 archive.seek(0)
156 161 return read_in_chunks(archive)
157 162
158 163 def diff(self, repo_name, f_path):
159 164 hg_model = ScmModel()
160 165 diff1 = request.GET.get('diff1')
161 166 diff2 = request.GET.get('diff2')
162 167 c.action = request.GET.get('diff')
163 168 c.no_changes = diff1 == diff2
164 169 c.f_path = f_path
165 170 c.repo = hg_model.get_repo(c.repo_name)
166 171
167 172 try:
168 173 if diff1 not in ['', None, 'None', '0' * 12, '0' * 40]:
169 174 c.changeset_1 = c.repo.get_changeset(diff1)
170 175 node1 = c.changeset_1.get_node(f_path)
171 176 else:
172 177 c.changeset_1 = EmptyChangeset()
173 178 node1 = FileNode('.', '', changeset=c.changeset_1)
174 179
175 180 if diff2 not in ['', None, 'None', '0' * 12, '0' * 40]:
176 181 c.changeset_2 = c.repo.get_changeset(diff2)
177 182 node2 = c.changeset_2.get_node(f_path)
178 183 else:
179 184 c.changeset_2 = EmptyChangeset()
180 185 node2 = FileNode('.', '', changeset=c.changeset_2)
181 186 except RepositoryError:
182 187 return redirect(url('files_home',
183 188 repo_name=c.repo_name, f_path=f_path))
184 189
185 190 f_udiff = differ.get_udiff(node1, node2)
186 191 diff = differ.DiffProcessor(f_udiff)
187 192
188 193 if c.action == 'download':
189 194 diff_name = '%s_vs_%s.diff' % (diff1, diff2)
190 195 response.content_type = 'text/plain'
191 196 response.content_disposition = 'attachment; filename=%s' \
192 197 % diff_name
193 198 return diff.raw_diff()
194 199
195 200 elif c.action == 'raw':
196 201 response.content_type = 'text/plain'
197 202 return diff.raw_diff()
198 203
199 204 elif c.action == 'diff':
200 if node1.size > c.file_size_limit or node2.size > c.file_size_limit:
205 if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit:
201 206 c.cur_diff = _('Diff is to big to display')
202 207 else:
203 208 c.cur_diff = diff.as_html()
204 209 else:
205 210 #default option
206 if node1.size > c.file_size_limit or node2.size > c.file_size_limit:
211 if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit:
207 212 c.cur_diff = _('Diff is to big to display')
208 213 else:
209 214 c.cur_diff = diff.as_html()
210 215
211 216 if not c.cur_diff: c.no_changes = True
212 217 return render('files/file_diff.html')
213 218
214 219 def _get_history(self, repo, node, f_path):
215 220 from vcs.nodes import NodeKind
216 221 if not node.kind is NodeKind.FILE:
217 222 return []
218 223 changesets = node.history
219 224 hist_l = []
220 225
221 226 changesets_group = ([], _("Changesets"))
222 227 branches_group = ([], _("Branches"))
223 228 tags_group = ([], _("Tags"))
224 229
225 230 for chs in changesets:
226 231 n_desc = 'r%s:%s' % (chs.revision, chs.short_id)
227 232 changesets_group[0].append((chs.raw_id, n_desc,))
228 233
229 234 hist_l.append(changesets_group)
230 235
231 236 for name, chs in c.repository_branches.items():
232 237 #chs = chs.split(':')[-1]
233 238 branches_group[0].append((chs, name),)
234 239 hist_l.append(branches_group)
235 240
236 241 for name, chs in c.repository_tags.items():
237 242 #chs = chs.split(':')[-1]
238 243 tags_group[0].append((chs, name),)
239 244 hist_l.append(tags_group)
240 245
241 246 return hist_l
242 247
243 248 # [
244 249 # ([("u1", "User1"), ("u2", "User2")], "Users"),
245 250 # ([("g1", "Group1"), ("g2", "Group2")], "Groups")
246 251 # ]
247 252
@@ -1,52 +1,52 b''
1 1 """The base Controller API
2 2
3 3 Provides the BaseController class for subclassing.
4 4 """
5 5 from pylons import config, tmpl_context as c, request, session
6 6 from pylons.controllers import WSGIController
7 7 from pylons.templating import render_mako as render
8 8 from rhodecode import __version__
9 9 from rhodecode.lib import auth
10 10 from rhodecode.lib.utils import get_repo_slug
11 11 from rhodecode.model import meta
12 12 from rhodecode.model.scm import ScmModel
13 13 from rhodecode import BACKENDS
14 14
15 15 class BaseController(WSGIController):
16 16
17 17 def __before__(self):
18 18 c.rhodecode_version = __version__
19 19 c.rhodecode_name = config['rhodecode_title']
20 20 c.repo_name = get_repo_slug(request)
21 21 c.cached_repo_list = ScmModel().get_repos()
22 22 c.backends = BACKENDS.keys()
23
23 self.cut_off_limit = int(config['cut_off_limit'])
24 24 self.sa = meta.Session()
25 25 scm_model = ScmModel(self.sa)
26 26 #c.unread_journal = scm_model.get_unread_journal()
27 27
28 28 if c.repo_name:
29 29 cached_repo = scm_model.get(c.repo_name)
30 30 if cached_repo:
31 31 c.repository_tags = cached_repo.tags
32 32 c.repository_branches = cached_repo.branches
33 33 c.repository_followers = scm_model.get_followers(cached_repo.dbrepo.repo_id)
34 34 c.repository_forks = scm_model.get_forks(cached_repo.dbrepo.repo_id)
35 35 else:
36 36 c.repository_tags = {}
37 37 c.repository_branches = {}
38 38 c.repository_followers = 0
39 39 c.repository_forks = 0
40 40
41 41
42 42 def __call__(self, environ, start_response):
43 43 """Invoke the Controller"""
44 44 # WSGIController.__call__ dispatches to the Controller method
45 45 # the request is routed to. This routing information is
46 46 # available in environ['pylons.routes_dict']
47 47 try:
48 48 #putting this here makes sure that we update permissions every time
49 49 self.rhodecode_user = c.rhodecode_user = auth.get_user(session)
50 50 return WSGIController.__call__(self, environ, start_response)
51 51 finally:
52 52 meta.Session.remove()
@@ -1,201 +1,202 b''
1 1 ################################################################################
2 2 ################################################################################
3 3 # rhodecode - Pylons environment configuration #
4 4 # #
5 5 # The %(here)s variable will be replaced with the parent directory of this file#
6 6 ################################################################################
7 7
8 8 [DEFAULT]
9 9 debug = true
10 10 ################################################################################
11 11 ## Uncomment and replace with the address which should receive ##
12 12 ## any error reports after application crash ##
13 13 ## Additionally those settings will be used by rhodecode mailing system ##
14 14 ################################################################################
15 15 #email_to = admin@localhost
16 16 #error_email_from = paste_error@localhost
17 17 #app_email_from = rhodecode-noreply@localhost
18 18 #error_message =
19 19
20 20 #smtp_server = mail.server.com
21 21 #smtp_username =
22 22 #smtp_password =
23 23 #smtp_port =
24 24 #smtp_use_tls = false
25 25
26 26 [server:main]
27 27 ##nr of threads to spawn
28 28 threadpool_workers = 5
29 29
30 30 ##max request before thread respawn
31 31 threadpool_max_requests = 2
32 32
33 33 ##option to use threads of process
34 34 use_threadpool = true
35 35
36 36 use = egg:Paste#http
37 37 host = 127.0.0.1
38 38 port = 5000
39 39
40 40 [app:main]
41 41 use = egg:rhodecode
42 42 full_stack = true
43 43 static_files = true
44 44 lang=en
45 45 cache_dir = %(here)s/data
46 46 index_dir = /tmp/index
47 cut_off_limit = 256000
47 48
48 49 ####################################
49 50 ### CELERY CONFIG ####
50 51 ####################################
51 52 use_celery = false
52 53 broker.host = localhost
53 54 broker.vhost = rabbitmqhost
54 55 broker.port = 5672
55 56 broker.user = rabbitmq
56 57 broker.password = qweqwe
57 58
58 59 celery.imports = rhodecode.lib.celerylib.tasks
59 60
60 61 celery.result.backend = amqp
61 62 celery.result.dburi = amqp://
62 63 celery.result.serialier = json
63 64
64 65 #celery.send.task.error.emails = true
65 66 #celery.amqp.task.result.expires = 18000
66 67
67 68 celeryd.concurrency = 2
68 69 #celeryd.log.file = celeryd.log
69 70 celeryd.log.level = debug
70 71 celeryd.max.tasks.per.child = 3
71 72
72 73 #tasks will never be sent to the queue, but executed locally instead.
73 74 celery.always.eager = false
74 75
75 76 ####################################
76 77 ### BEAKER CACHE ####
77 78 ####################################
78 79 beaker.cache.data_dir=/%(here)s/data/cache/data
79 80 beaker.cache.lock_dir=/%(here)s/data/cache/lock
80 81 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
81 82
82 83 beaker.cache.super_short_term.type=memory
83 84 beaker.cache.super_short_term.expire=10
84 85
85 86 beaker.cache.short_term.type=memory
86 87 beaker.cache.short_term.expire=60
87 88
88 89 beaker.cache.long_term.type=memory
89 90 beaker.cache.long_term.expire=36000
90 91
91 92
92 93 beaker.cache.sql_cache_short.type=memory
93 94 beaker.cache.sql_cache_short.expire=5
94 95
95 96 beaker.cache.sql_cache_med.type=memory
96 97 beaker.cache.sql_cache_med.expire=360
97 98
98 99 beaker.cache.sql_cache_long.type=file
99 100 beaker.cache.sql_cache_long.expire=3600
100 101
101 102 ####################################
102 103 ### BEAKER SESSION ####
103 104 ####################################
104 105 ## Type of storage used for the session, current types are
105 106 ## dbm, file, memcached, database, and memory.
106 107 ## The storage uses the Container API
107 108 ##that is also used by the cache system.
108 109 beaker.session.type = file
109 110
110 111 beaker.session.key = rhodecode
111 112 beaker.session.secret = g654dcno0-9873jhgfreyu
112 113 beaker.session.timeout = 36000
113 114
114 115 ##auto save the session to not to use .save()
115 116 beaker.session.auto = False
116 117
117 118 ##true exire at browser close
118 119 #beaker.session.cookie_expires = 3600
119 120
120 121
121 122 ################################################################################
122 123 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
123 124 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
124 125 ## execute malicious code after an exception is raised. ##
125 126 ################################################################################
126 127 #set debug = false
127 128
128 129 ##################################
129 130 ### LOGVIEW CONFIG ###
130 131 ##################################
131 132 logview.sqlalchemy = #faa
132 133 logview.pylons.templating = #bfb
133 134 logview.pylons.util = #eee
134 135
135 136 #########################################################
136 137 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
137 138 #########################################################
138 139 sqlalchemy.db1.url = sqlite:///%(here)s/test.db
139 140 #sqlalchemy.db1.echo = False
140 141 #sqlalchemy.db1.pool_recycle = 3600
141 142 sqlalchemy.convert_unicode = true
142 143
143 144 ################################
144 145 ### LOGGING CONFIGURATION ####
145 146 ################################
146 147 [loggers]
147 148 keys = root, routes, rhodecode, sqlalchemy
148 149
149 150 [handlers]
150 151 keys = console
151 152
152 153 [formatters]
153 154 keys = generic,color_formatter
154 155
155 156 #############
156 157 ## LOGGERS ##
157 158 #############
158 159 [logger_root]
159 160 level = ERROR
160 161 handlers = console
161 162
162 163 [logger_routes]
163 164 level = ERROR
164 165 handlers = console
165 166 qualname = routes.middleware
166 167 # "level = DEBUG" logs the route matched and routing variables.
167 168
168 169 [logger_rhodecode]
169 170 level = ERROR
170 171 handlers = console
171 172 qualname = rhodecode
172 173 propagate = 0
173 174
174 175 [logger_sqlalchemy]
175 176 level = ERROR
176 177 handlers = console
177 178 qualname = sqlalchemy.engine
178 179 propagate = 0
179 180
180 181 ##############
181 182 ## HANDLERS ##
182 183 ##############
183 184
184 185 [handler_console]
185 186 class = StreamHandler
186 187 args = (sys.stderr,)
187 188 level = NOTSET
188 189 formatter = color_formatter
189 190
190 191 ################
191 192 ## FORMATTERS ##
192 193 ################
193 194
194 195 [formatter_generic]
195 196 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
196 197 datefmt = %Y-%m-%d %H:%M:%S
197 198
198 199 [formatter_color_formatter]
199 200 class=rhodecode.lib.colored_formatter.ColorFormatter
200 201 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
201 202 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now