##// END OF EJS Templates
merged found bugs and fixed for stable release:...
marcink -
r921:136af52f default
parent child Browse files
Show More
@@ -46,6 +46,7 b' lang=en'
46 46 cache_dir = %(here)s/data
47 47 index_dir = %(here)s/data/index
48 48 cut_off_limit = 256000
49 force_https = false
49 50
50 51 ####################################
51 52 ### CELERY CONFIG ####
@@ -3,6 +3,25 b''
3 3 Changelog
4 4 =========
5 5
6 1.1.1 (**2011-01-06**)
7 ----------------------
8
9 news
10 ++++
11
12 - added force https option into ini files for easier https usage (no need to
13 set server headers with this options)
14 - small css updates
15
16 fixes
17 ++++
18
19 - fixed #96 redirect loop on files view on repositories without changesets
20 - fixed #97 unicode string passed into server header in special cases (mod_wsgi)
21 and server crashed with errors
22 - fixed large tooltips problems on main page
23 - fixed #92 whoosh indexer is more error proof
24
6 25 1.1.0 (**2010-12-18**)
7 26 ----------------------
8 27
@@ -157,6 +157,16 b' In order to make start using celery run:'
157 157 paster celeryd <configfile.ini>
158 158
159 159
160 HTTPS support
161 -------------
162
163 There are two ways to enable https, first is to set HTTP_X_URL_SCHEME in
164 Your http server headers, than rhodecode will recognise this headers and make
165 proper https redirections, another way is to set `force_https = true`
166 in the ini cofiguration to force using https, no headers are needed than to
167 enable https
168
169
160 170 Nginx virtual host example
161 171 --------------------------
162 172
@@ -210,9 +220,36 b' in production.ini file::'
210 220
211 221 To not have the statics served by the application. And improve speed.
212 222
213 Apache reverse proxy
214 --------------------
215 Tutorial can be found here
223
224 Apache virtual host example
225 ---------------------------
226
227 Sample config for apache using proxy::
228
229 <VirtualHost *:80>
230 ServerName hg.myserver.com
231 ServerAlias hg.myserver.com
232
233 <Proxy *>
234 Order allow,deny
235 Allow from all
236 </Proxy>
237
238 #important !
239 #Directive to properly generate url (clone url) for pylons
240 ProxyPreserveHost On
241
242 #rhodecode instance
243 ProxyPass / http://127.0.0.1:5000/
244 ProxyPassReverse / http://127.0.0.1:5000/
245
246 #to enable https use line below
247 #SetEnvIf X-Url-Scheme https HTTPS=1
248
249 </VirtualHost>
250
251
252 Additional tutorial
216 253 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
217 254
218 255
@@ -46,6 +46,7 b' lang=en'
46 46 cache_dir = %(here)s/data
47 47 index_dir = %(here)s/data/index
48 48 cut_off_limit = 256000
49 force_https = false
49 50
50 51 ####################################
51 52 ### CELERY CONFIG ####
@@ -47,6 +47,7 b' cache_dir = %(here)s/data'
47 47 index_dir = %(here)s/data/index
48 48 app_instance_uuid = ${app_instance_uuid}
49 49 cut_off_limit = 256000
50 force_https = false
50 51
51 52 ####################################
52 53 ### CELERY CONFIG ####
@@ -39,7 +39,8 b' from rhodecode.lib.base import BaseContr'
39 39 from rhodecode.lib.utils import EmptyChangeset
40 40 from rhodecode.model.scm import ScmModel
41 41
42 from vcs.exceptions import RepositoryError, ChangesetError
42 from vcs.exceptions import RepositoryError, ChangesetError, \
43 ChangesetDoesNotExistError, EmptyRepositoryError
43 44 from vcs.nodes import FileNode
44 45 from vcs.utils import diffs as differ
45 46
@@ -91,6 +92,10 b' class FilesController(BaseController):'
91 92 h.flash(str(e), category='warning')
92 93 redirect(h.url('files_home', repo_name=repo_name, revision=revision))
93 94
95 except EmptyRepositoryError, e:
96 h.flash(_('There are no files yet'), category='warning')
97 redirect(h.url('summary_home', repo_name=repo_name))
98
94 99 except RepositoryError, e:
95 100 h.flash(str(e), category='warning')
96 101 redirect(h.url('files_home', repo_name=repo_name, revision='tip'))
@@ -116,10 +116,17 b' class WhooshIndexingDaemon(object):'
116 116 the instance of vcs backend"""
117 117 node = self.get_node(repo, path)
118 118
119 #we just index the content of chosen files
120 if node.extension in INDEX_EXTENSIONS:
119 #we just index the content of chosen files, and skip binary files
120 if node.extension in INDEX_EXTENSIONS and not node.is_binary:
121
122 u_content = node.content
123 if not isinstance(u_content, unicode):
124 log.warning(' >> %s Could not get this content as unicode '
125 'replacing with empty content', path)
126 u_content = u''
127 else:
121 128 log.debug(' >> %s [WITH CONTENT]' % path)
122 u_content = node.content
129
123 130 else:
124 131 log.debug(' >> %s' % path)
125 132 #just index file name without it's content
@@ -1,8 +1,15 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # middleware to handle https correctly
4 # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.lib.middleware.https_fixup
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 5
6 middleware to handle https correctly
7
8 :created_on: May 23, 2010
9 :author: marcink
10 :copyright: (C) 2009-2011 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
@@ -18,15 +25,12 b''
18 25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 26 # MA 02110-1301, USA.
20 27
21 """
22 Created on May 23, 2010
23
24 @author: marcink
25 """
28 from rhodecode.lib import str2bool
26 29
27 30 class HttpsFixup(object):
28 def __init__(self, app):
31 def __init__(self, app, config):
29 32 self.application = app
33 self.config = config
30 34
31 35 def __call__(self, environ, start_response):
32 36 self.__fixup(environ)
@@ -40,6 +44,9 b' class HttpsFixup(object):'
40 44 """
41 45 proto = environ.get('HTTP_X_URL_SCHEME')
42 46
47 if str2bool(self.config.get('force_https')):
48 proto = 'https'
49
43 50 if proto == 'https':
44 51 environ['wsgi.url_scheme'] = proto
45 52 else:
@@ -69,6 +69,8 b' class SimpleHg(object):'
69 69 proxy_key = 'HTTP_X_REAL_IP'
70 70 def_key = 'REMOTE_ADDR'
71 71 self.ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0'))
72 # skip passing error to error controller
73 environ['pylons.status_code_redirect'] = True
72 74
73 75 #===================================================================
74 76 # AUTHENTICATE THIS MERCURIAL REQUEST
@@ -76,7 +78,7 b' class SimpleHg(object):'
76 78 username = REMOTE_USER(environ)
77 79
78 80 if not username:
79 self.authenticate.realm = self.config['rhodecode_realm']
81 self.authenticate.realm = str(self.config['rhodecode_realm'])
80 82 result = self.authenticate(environ)
81 83 if isinstance(result, str):
82 84 AUTH_TYPE.update(environ, 'basic')
@@ -905,20 +905,6 b' margin:0;'
905 905 padding:4px 8px;
906 906 }
907 907
908 #content div.box div.form div.fields div.field div.input a.ui-input-file {
909 width:28px;
910 height:28px;
911 display:inline;
912 position:absolute;
913 overflow:hidden;
914 cursor:pointer;
915 background:#e5e3e3 url("../images/button_browse.png") no-repeat;
916 border:none;
917 text-decoration:none;
918 margin:0 0 0 6px;
919 padding:0;
920 }
921
922 908 #content div.box div.form div.fields div.field div.textarea {
923 909 border-top:1px solid #b3b3b3;
924 910 border-left:1px solid #b3b3b3;
@@ -978,15 +964,6 b' font-size:11px;'
978 964 padding:5px 5px 5px 0;
979 965 }
980 966
981 #content div.box div.form div.fields div.field div.textarea table td table td a.mceButtonActive {
982 background:#b1b1b1;
983 }
984
985 #content div.box div.form div.fields div.field div.select a.ui-selectmenu {
986 color:#565656;
987 text-decoration:none;
988 }
989
990 967 #content div.box div.form div.fields div.field input[type=text]:focus,#content div.box div.form div.fields div.field input[type=password]:focus,#content div.box div.form div.fields div.field input[type=file]:focus,#content div.box div.form div.fields div.field textarea:focus,#content div.box div.form div.fields div.field select:focus {
991 968 background:#f6f6f6;
992 969 border-color:#666;
@@ -997,7 +974,7 b' margin:0;'
997 974 padding:0 0 0 8px;
998 975 }
999 976
1000 div.form div.fields div.field div.highlight .ui-state-default {
977 div.form div.fields div.field div.highlight .ui-button {
1001 978 background:#4e85bb url("../images/button_highlight.png") repeat-x;
1002 979 border-top:1px solid #5c91a4;
1003 980 border-left:1px solid #2a6f89;
@@ -1019,7 +996,7 b' margin:0;'
1019 996 padding:6px 12px;
1020 997 }
1021 998
1022 #content div.box div.form div.fields div.buttons div.highlight input.ui-state-default {
999 #content div.box div.form div.fields div.buttons div.highlight input.ui-button {
1023 1000 background:#4e85bb url("../../images/button_highlight.png") repeat-x;
1024 1001 border-top:1px solid #5c91a4;
1025 1002 border-left:1px solid #2a6f89;
@@ -1408,7 +1385,7 b' margin:0;'
1408 1385 padding:10px 0 0 150px;
1409 1386 }
1410 1387
1411 #register div.form div.fields div.buttons div.highlight input.ui-state-default {
1388 #register div.form div.fields div.buttons div.highlight input.ui-button {
1412 1389 background:url("../images/button_highlight.png") repeat-x scroll 0 0 #4E85BB;
1413 1390 color:#FFF;
1414 1391 border-color:#5C91A4 #2B7089 #1A6480 #2A6F89;
@@ -1614,10 +1591,18 b' padding:0;'
1614 1591 }
1615 1592
1616 1593 div.browserblock .browser-header {
1617 border-bottom:1px solid #CCC;
1618 1594 background:#FFF;
1619 color:blue;
1620 1595 padding:10px 0;
1596 float:left;
1597 }
1598
1599 div.browserblock .browser-branch {
1600 background:#FFF;
1601 padding:20px 0 0 0;
1602 float:left;
1603 }
1604 div.browserblock .browser-branch label {
1605 color:#4A4A4A;
1621 1606 }
1622 1607
1623 1608 div.browserblock .browser-header span {
@@ -1627,6 +1612,7 b' font-weight:700;'
1627 1612
1628 1613 div.browserblock .browser-body {
1629 1614 background:#EEE;
1615 border-top:1px solid #CCC;
1630 1616 }
1631 1617
1632 1618 table.code-browser {
@@ -1754,6 +1740,10 b' width:auto;'
1754 1740 opacity:1px;
1755 1741 padding:8px;
1756 1742 white-space: pre;
1743 -webkit-border-radius: 8px 8px 8px 8px;
1744 -khtml-border-radius: 8px 8px 8px 8px;
1745 -moz-border-radius: 8px 8px 8px 8px;
1746 border-radius: 8px 8px 8px 8px;
1757 1747 }
1758 1748
1759 1749 .ac {
@@ -2052,7 +2042,7 b' border-left:1px solid #316293;'
2052 2042 border:1px solid #316293;
2053 2043 }
2054 2044
2055 #content div.box div.title div.search div.button input.ui-state-default {
2045 #content div.box div.title div.search div.button input.ui-button {
2056 2046 background:#4e85bb url("../../images/button_highlight.png") repeat-x;
2057 2047 border:1px solid #316293;
2058 2048 border-left:none;
@@ -2066,7 +2056,7 b' border-left:none;'
2066 2056 color:#FFF;
2067 2057 }
2068 2058
2069 #content div.box div.form div.fields div.field div.highlight .ui-state-default {
2059 #content div.box div.form div.fields div.field div.highlight .ui-button {
2070 2060 background:#4e85bb url("../../images/button_highlight.png") repeat-x;
2071 2061 border-top:1px solid #5c91a4;
2072 2062 border-left:1px solid #2a6f89;
@@ -2211,7 +2201,7 b' font-weight:700;'
2211 2201 margin:0;
2212 2202 }
2213 2203
2214 div.form div.fields div.field div.button .ui-state-default,#content div.box div.form div.fields div.buttons input.ui-state-default {
2204 div.form div.fields div.field div.button .ui-button,#content div.box div.form div.fields div.buttons input.ui-button {
2215 2205 background:#e5e3e3 url("../images/button.png") repeat-x;
2216 2206 border-top:1px solid #DDD;
2217 2207 border-left:1px solid #c6c6c6;
@@ -2259,7 +2249,7 b' margin:6px 0 0;'
2259 2249 padding:0;
2260 2250 }
2261 2251
2262 #content div.box div.action div.button input.ui-state-default,#login div.form div.fields div.buttons input.ui-state-default,#register div.form div.fields div.buttons input.ui-state-default {
2252 #content div.box div.action div.button input.ui-button,#login div.form div.fields div.buttons input.ui-button,#register div.form div.fields div.buttons input.ui-button {
2263 2253 background:#e5e3e3 url("../images/button.png") repeat-x;
2264 2254 border-top:1px solid #DDD;
2265 2255 border-left:1px solid #c6c6c6;
@@ -87,7 +87,7 b''
87 87 </div>
88 88 </td>
89 89 ##DESCRIPTION
90 <td><span class="tooltip" tooltip_title="${repo['description']}">
90 <td><span class="tooltip" tooltip_title="${h.tooltip(repo['description'])}">
91 91 ${h.truncate(repo['description'],60)}</span>
92 92 </td>
93 93 ##LAST CHANGE
@@ -45,6 +45,7 b' lang=en'
45 45 cache_dir = %(here)s/data
46 46 index_dir = /tmp/index
47 47 cut_off_limit = 256000
48 force_https = false
48 49
49 50 ####################################
50 51 ### CELERY CONFIG ####
General Comments 0
You need to be logged in to leave comments. Login now