Show More
@@ -1,6 +1,6 b'' | |||||
1 | ------------------------------------- |
|
1 | -------------------------------------------------------------- | |
2 | Pylons based replacement for hgwebdir |
|
2 | Pylons based repository management for mercurial (and soon git) | |
3 | ------------------------------------- |
|
3 | -------------------------------------------------------------- | |
4 |
|
4 | |||
5 | Fully customizable, with authentication, permissions. Based on vcs library. |
|
5 | Fully customizable, with authentication, permissions. Based on vcs library. | |
6 |
|
6 | |||
@@ -13,7 +13,9 b' Fully customizable, with authentication,' | |||||
13 | - diffs annotations and source code all colored by pygments. |
|
13 | - diffs annotations and source code all colored by pygments. | |
14 | - mercurial branch graph and yui-flot powered graphs with zooming and statistics |
|
14 | - mercurial branch graph and yui-flot powered graphs with zooming and statistics | |
15 | - admin interface for performing user/permission managements as well as repository |
|
15 | - admin interface for performing user/permission managements as well as repository | |
16 |
management. |
|
16 | management. | |
|
17 | - server side forks, it's possible to fork a project and hack it free without | |||
|
18 | breaking the main. | |||
17 | - full text search of source codes with indexing daemons using whoosh |
|
19 | - full text search of source codes with indexing daemons using whoosh | |
18 | (no external search servers required all in one application) |
|
20 | (no external search servers required all in one application) | |
19 | - async tasks for speed and performance using celery (works without them too) |
|
21 | - async tasks for speed and performance using celery (works without them too) | |
@@ -32,8 +34,7 b' Fully customizable, with authentication,' | |||||
32 | - code review based on hg-review (when it's stable) |
|
34 | - code review based on hg-review (when it's stable) | |
33 | - git support (when vcs can handle it - almost there !) |
|
35 | - git support (when vcs can handle it - almost there !) | |
34 | - commit based wikis |
|
36 | - commit based wikis | |
35 | - in server forks |
|
37 | - clonning from remote repositories into rhodecode (git/mercurial) | |
36 | - clonning from remote repositories into hg-app |
|
|||
37 | - other cools stuff that i can figure out (or You can help me figure out) |
|
38 | - other cools stuff that i can figure out (or You can help me figure out) | |
38 |
|
39 | |||
39 | .. note:: |
|
40 | .. note:: | |
@@ -45,14 +46,14 b' Fully customizable, with authentication,' | |||||
45 | Installation |
|
46 | Installation | |
46 | ------------- |
|
47 | ------------- | |
47 |
|
48 | |||
48 |
- I highly recommend to install new virtualenv for |
|
49 | - I highly recommend to install new virtualenv for rhodecode see | |
49 | http://pypi.python.org/pypi/virtualenv |
|
50 | http://pypi.python.org/pypi/virtualenv | |
50 |
- Create new virtualenv using `virtualenv --no-site-packages /var/www/ |
|
51 | - Create new virtualenv using `virtualenv --no-site-packages /var/www/rhodecode-venv` | |
51 |
this will install new virtual env into /var/www/ |
|
52 | this will install new virtual env into /var/www/rhodecode-venv. | |
52 | Activate the virtualenv by running |
|
53 | Activate the virtualenv by running | |
53 |
`source activate /var/www/ |
|
54 | `source activate /var/www/rhodecode-venv/bin/activate` | |
54 |
- Make a folder for |
|
55 | - Make a folder for rhodecode somewhere on the filesystem for example /var/www/rhodecode | |
55 |
- Download and extract http://bitbucket.org/marcinkuzminski/ |
|
56 | - Download and extract http://bitbucket.org/marcinkuzminski/rhodecode/get/tip.zip | |
56 | into created directory. |
|
57 | into created directory. | |
57 | - Run `python setup.py install` in order to install the application and all |
|
58 | - Run `python setup.py install` in order to install the application and all | |
58 | needed dependencies. Make sure that You're using activated virutalenv |
|
59 | needed dependencies. Make sure that You're using activated virutalenv | |
@@ -66,14 +67,14 b' Installation' | |||||
66 | - Default permissions on each repository is read, and owner is admin. So remember |
|
67 | - Default permissions on each repository is read, and owner is admin. So remember | |
67 | to update these. |
|
68 | to update these. | |
68 | - In order to use full power of async tasks, You must install message broker |
|
69 | - In order to use full power of async tasks, You must install message broker | |
69 |
preferably rabbitmq and start celeryd daemon together with |
|
70 | preferably rabbitmq and start celeryd daemon together with rhodecode. | |
70 | The app should gain a lot of speed and become much more responsible. |
|
71 | The app should gain a lot of speed and become much more responsible. | |
71 | For installation instructions You can visit: |
|
72 | For installation instructions You can visit: | |
72 | http://ask.github.com/celery/getting-started/index.html. |
|
73 | http://ask.github.com/celery/getting-started/index.html. | |
73 |
- All needed configs are inside |
|
74 | - All needed configs are inside rhodecode ie. celeryconfig.py , production.ini | |
74 | You can configure the email, ports, loggers, workers from there. |
|
75 | You can configure the email, ports, loggers, workers from there. | |
75 | - For full text search You can either put crontab entry for |
|
76 | - For full text search You can either put crontab entry for | |
76 |
`python /var/www/ |
|
77 | `python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>` | |
77 | or run indexer from admin panel. This will scann the repos given in the |
|
78 | or run indexer from admin panel. This will scann the repos given in the | |
78 | application setup or given path for daemon.py and each scann in incremental |
|
79 | application setup or given path for daemon.py and each scann in incremental | |
79 | mode will scann only changed files, |
|
80 | mode will scann only changed files, |
@@ -1,6 +1,6 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 |
# |
|
3 | # rhodecode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
@@ -10,11 +10,11 b' debug = true' | |||||
10 | ################################################################################ |
|
10 | ################################################################################ | |
11 | ## Uncomment and replace with the address which should receive ## |
|
11 | ## Uncomment and replace with the address which should receive ## | |
12 | ## any error reports after application crash ## |
|
12 | ## any error reports after application crash ## | |
13 |
## Additionally those settings will be used by |
|
13 | ## Additionally those settings will be used by rhodecode mailing system ## | |
14 | ################################################################################ |
|
14 | ################################################################################ | |
15 | #email_to = admin@localhost |
|
15 | #email_to = admin@localhost | |
16 | #error_email_from = paste_error@localhost |
|
16 | #error_email_from = paste_error@localhost | |
17 |
#app_email_from = |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
@@ -66,7 +66,7 b' beaker.cache.super_short_term.expire=10' | |||||
66 | ##that is also used by the cache system. |
|
66 | ##that is also used by the cache system. | |
67 | beaker.session.type = file |
|
67 | beaker.session.type = file | |
68 |
|
68 | |||
69 |
beaker.session.key = |
|
69 | beaker.session.key = rhodecode | |
70 | beaker.session.secret = g654dcno0-9873jhgfreyu |
|
70 | beaker.session.secret = g654dcno0-9873jhgfreyu | |
71 | beaker.session.timeout = 36000 |
|
71 | beaker.session.timeout = 36000 | |
72 |
|
72 |
1 | NO CONTENT: file renamed from init.d/hg_app_daemon to init.d/rhodecode_daemon |
|
NO CONTENT: file renamed from init.d/hg_app_daemon to init.d/rhodecode_daemon |
@@ -4,13 +4,13 b'' | |||||
4 | ######################################## |
|
4 | ######################################## | |
5 |
|
5 | |||
6 | ### BEGIN INIT INFO |
|
6 | ### BEGIN INIT INFO | |
7 |
# Provides: |
|
7 | # Provides: rhodecode | |
8 | # Required-Start: $all |
|
8 | # Required-Start: $all | |
9 | # Required-Stop: $all |
|
9 | # Required-Stop: $all | |
10 | # Default-Start: 2 3 4 5 |
|
10 | # Default-Start: 2 3 4 5 | |
11 | # Default-Stop: 0 1 6 |
|
11 | # Default-Stop: 0 1 6 | |
12 |
# Short-Description: starts instance of |
|
12 | # Short-Description: starts instance of rhodecode | |
13 |
# Description: starts instance of |
|
13 | # Description: starts instance of rhodecode using start-stop-daemon | |
14 | ### END INIT INFO |
|
14 | ### END INIT INFO | |
15 |
|
15 | |||
16 | APP_NAME="rhodecode" |
|
16 | APP_NAME="rhodecode" |
@@ -1,6 +1,6 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 |
# |
|
3 | # rhodecode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
@@ -10,11 +10,11 b' debug = true' | |||||
10 | ################################################################################ |
|
10 | ################################################################################ | |
11 | ## Uncomment and replace with the address which should receive ## |
|
11 | ## Uncomment and replace with the address which should receive ## | |
12 | ## any error reports after application crash ## |
|
12 | ## any error reports after application crash ## | |
13 |
## Additionally those settings will be used by |
|
13 | ## Additionally those settings will be used by rhodecode mailing system ## | |
14 | ################################################################################ |
|
14 | ################################################################################ | |
15 | #email_to = admin@localhost |
|
15 | #email_to = admin@localhost | |
16 | #error_email_from = paste_error@localhost |
|
16 | #error_email_from = paste_error@localhost | |
17 |
#app_email_from = |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
@@ -66,7 +66,7 b' beaker.cache.super_short_term.expire=10' | |||||
66 | ##that is also used by the cache system. |
|
66 | ##that is also used by the cache system. | |
67 | beaker.session.type = file |
|
67 | beaker.session.type = file | |
68 |
|
68 | |||
69 |
beaker.session.key = |
|
69 | beaker.session.key = rhodecode | |
70 | beaker.session.secret = g654dcno0-9873jhgfreyu |
|
70 | beaker.session.secret = g654dcno0-9873jhgfreyu | |
71 | beaker.session.timeout = 36000 |
|
71 | beaker.session.timeout = 36000 | |
72 |
|
72 |
@@ -1,6 +1,6 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 |
# |
|
3 | # rhodecode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
@@ -10,11 +10,11 b' debug = true' | |||||
10 | ################################################################################ |
|
10 | ################################################################################ | |
11 | ## Uncomment and replace with the address which should receive ## |
|
11 | ## Uncomment and replace with the address which should receive ## | |
12 | ## any error reports after application crash ## |
|
12 | ## any error reports after application crash ## | |
13 |
## Additionally those settings will be used by |
|
13 | ## Additionally those settings will be used by rhodecode mailing system ## | |
14 | ################################################################################ |
|
14 | ################################################################################ | |
15 | #email_to = admin@localhost |
|
15 | #email_to = admin@localhost | |
16 | #error_email_from = paste_error@localhost |
|
16 | #error_email_from = paste_error@localhost | |
17 |
#app_email_from = |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
@@ -67,7 +67,7 b' beaker.cache.super_short_term.expire=10' | |||||
67 | ##that is also used by the cache system. |
|
67 | ##that is also used by the cache system. | |
68 | beaker.session.type = file |
|
68 | beaker.session.type = file | |
69 |
|
69 | |||
70 |
beaker.session.key = |
|
70 | beaker.session.key = rhodecode | |
71 | beaker.session.secret = ${app_instance_secret} |
|
71 | beaker.session.secret = ${app_instance_secret} | |
72 | beaker.session.timeout = 36000 |
|
72 | beaker.session.timeout = 36000 | |
73 |
|
73 |
@@ -33,7 +33,7 b' from rhodecode.lib.auth import LoginRequ' | |||||
33 | from rhodecode.lib.base import BaseController, render |
|
33 | from rhodecode.lib.base import BaseController, render | |
34 | from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \ |
|
34 | from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \ | |
35 | set_rhodecode_config, get_hg_settings, get_hg_ui_settings, make_ui |
|
35 | set_rhodecode_config, get_hg_settings, get_hg_ui_settings, make_ui | |
36 |
from rhodecode.model.db import User, UserLog, |
|
36 | from rhodecode.model.db import User, UserLog, RhodeCodeSettings, RhodeCodeUi | |
37 | from rhodecode.model.forms import UserForm, ApplicationSettingsForm, \ |
|
37 | from rhodecode.model.forms import UserForm, ApplicationSettingsForm, \ | |
38 | ApplicationUiSettingsForm |
|
38 | ApplicationUiSettingsForm | |
39 | from rhodecode.model.hg_model import HgModel |
|
39 | from rhodecode.model.hg_model import HgModel | |
@@ -116,12 +116,12 b' class SettingsController(BaseController)' | |||||
116 | form_result = application_form.to_python(dict(request.POST)) |
|
116 | form_result = application_form.to_python(dict(request.POST)) | |
117 |
|
117 | |||
118 | try: |
|
118 | try: | |
119 |
hgsettings1 = self.sa.query( |
|
119 | hgsettings1 = self.sa.query(RhodeCodeSettings)\ | |
120 |
.filter( |
|
120 | .filter(RhodeCodeSettings.app_settings_name == 'title').one() | |
121 | hgsettings1.app_settings_value = form_result['rhodecode_title'] |
|
121 | hgsettings1.app_settings_value = form_result['rhodecode_title'] | |
122 |
|
122 | |||
123 |
hgsettings2 = self.sa.query( |
|
123 | hgsettings2 = self.sa.query(RhodeCodeSettings)\ | |
124 |
.filter( |
|
124 | .filter(RhodeCodeSettings.app_settings_name == 'realm').one() | |
125 | hgsettings2.app_settings_value = form_result['rhodecode_realm'] |
|
125 | hgsettings2.app_settings_value = form_result['rhodecode_realm'] | |
126 |
|
126 | |||
127 |
|
127 | |||
@@ -155,22 +155,22 b' class SettingsController(BaseController)' | |||||
155 |
|
155 | |||
156 | try: |
|
156 | try: | |
157 |
|
157 | |||
158 |
hgsettings1 = self.sa.query( |
|
158 | hgsettings1 = self.sa.query(RhodeCodeUi)\ | |
159 |
.filter( |
|
159 | .filter(RhodeCodeUi.ui_key == 'push_ssl').one() | |
160 | hgsettings1.ui_value = form_result['web_push_ssl'] |
|
160 | hgsettings1.ui_value = form_result['web_push_ssl'] | |
161 |
|
161 | |||
162 |
hgsettings2 = self.sa.query( |
|
162 | hgsettings2 = self.sa.query(RhodeCodeUi)\ | |
163 |
.filter( |
|
163 | .filter(RhodeCodeUi.ui_key == '/').one() | |
164 | hgsettings2.ui_value = form_result['paths_root_path'] |
|
164 | hgsettings2.ui_value = form_result['paths_root_path'] | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | #HOOKS |
|
167 | #HOOKS | |
168 |
hgsettings3 = self.sa.query( |
|
168 | hgsettings3 = self.sa.query(RhodeCodeUi)\ | |
169 |
.filter( |
|
169 | .filter(RhodeCodeUi.ui_key == 'changegroup.update').one() | |
170 | hgsettings3.ui_active = bool(form_result['hooks_changegroup_update']) |
|
170 | hgsettings3.ui_active = bool(form_result['hooks_changegroup_update']) | |
171 |
|
171 | |||
172 |
hgsettings4 = self.sa.query( |
|
172 | hgsettings4 = self.sa.query(RhodeCodeUi)\ | |
173 |
.filter( |
|
173 | .filter(RhodeCodeUi.ui_key == 'changegroup.repo_size').one() | |
174 | hgsettings4.ui_active = bool(form_result['hooks_changegroup_repo_size']) |
|
174 | hgsettings4.ui_active = bool(form_result['hooks_changegroup_repo_size']) | |
175 |
|
175 | |||
176 |
|
176 |
@@ -101,7 +101,7 b' class LoginController(BaseController):' | |||||
101 | form_result = register_form.to_python(dict(request.POST)) |
|
101 | form_result = register_form.to_python(dict(request.POST)) | |
102 | form_result['active'] = c.auto_active |
|
102 | form_result['active'] = c.auto_active | |
103 | user_model.create_registration(form_result) |
|
103 | user_model.create_registration(form_result) | |
104 |
h.flash(_('You have successfully registered into |
|
104 | h.flash(_('You have successfully registered into rhodecode'), | |
105 | category='success') |
|
105 | category='success') | |
106 | return redirect(url('login_home')) |
|
106 | return redirect(url('login_home')) | |
107 |
|
107 |
@@ -23,10 +23,10 b' def get_session():' | |||||
23 | return sa |
|
23 | return sa | |
24 |
|
24 | |||
25 | def get_hg_settings(): |
|
25 | def get_hg_settings(): | |
26 |
from rhodecode.model.db import |
|
26 | from rhodecode.model.db import RhodeCodeSettings | |
27 | try: |
|
27 | try: | |
28 | sa = get_session() |
|
28 | sa = get_session() | |
29 |
ret = sa.query( |
|
29 | ret = sa.query(RhodeCodeSettings).all() | |
30 | finally: |
|
30 | finally: | |
31 | sa.remove() |
|
31 | sa.remove() | |
32 |
|
32 | |||
@@ -39,10 +39,10 b' def get_hg_settings():' | |||||
39 | return settings |
|
39 | return settings | |
40 |
|
40 | |||
41 | def get_hg_ui_settings(): |
|
41 | def get_hg_ui_settings(): | |
42 |
from rhodecode.model.db import |
|
42 | from rhodecode.model.db import RhodeCodeUi | |
43 | try: |
|
43 | try: | |
44 | sa = get_session() |
|
44 | sa = get_session() | |
45 |
ret = sa.query( |
|
45 | ret = sa.query(RhodeCodeUi).all() | |
46 | finally: |
|
46 | finally: | |
47 | sa.remove() |
|
47 | sa.remove() | |
48 |
|
48 | |||
@@ -239,8 +239,8 b' def reset_user_password(user_email):' | |||||
239 | sa.rollback() |
|
239 | sa.rollback() | |
240 |
|
240 | |||
241 | run_task(send_email, user_email, |
|
241 | run_task(send_email, user_email, | |
242 |
"Your new |
|
242 | "Your new rhodecode password", | |
243 |
'Your new |
|
243 | 'Your new rhodecode password:%s' % (new_passwd)) | |
244 | log.info('send new password mail to %s', user_email) |
|
244 | log.info('send new password mail to %s', user_email) | |
245 |
|
245 | |||
246 |
|
246 |
@@ -34,7 +34,7 b' sys.path.append(ROOT)' | |||||
34 | from rhodecode.lib.auth import get_crypt_password |
|
34 | from rhodecode.lib.auth import get_crypt_password | |
35 | from rhodecode.lib.utils import ask_ok |
|
35 | from rhodecode.lib.utils import ask_ok | |
36 | from rhodecode.model import init_model |
|
36 | from rhodecode.model import init_model | |
37 |
from rhodecode.model.db import User, Permission, |
|
37 | from rhodecode.model.db import User, Permission, RhodeCodeUi, RhodeCodeSettings, \ | |
38 | UserToPerm |
|
38 | UserToPerm | |
39 | from rhodecode.model import meta |
|
39 | from rhodecode.model import meta | |
40 | from sqlalchemy.engine import create_engine |
|
40 | from sqlalchemy.engine import create_engine | |
@@ -107,50 +107,50 b' class DbManage(object):' | |||||
107 | log.error('You entered wrong path: %s', path) |
|
107 | log.error('You entered wrong path: %s', path) | |
108 | sys.exit() |
|
108 | sys.exit() | |
109 |
|
109 | |||
110 |
hooks1 = |
|
110 | hooks1 = RhodeCodeUi() | |
111 | hooks1.ui_section = 'hooks' |
|
111 | hooks1.ui_section = 'hooks' | |
112 | hooks1.ui_key = 'changegroup.update' |
|
112 | hooks1.ui_key = 'changegroup.update' | |
113 | hooks1.ui_value = 'hg update >&2' |
|
113 | hooks1.ui_value = 'hg update >&2' | |
114 |
|
114 | |||
115 |
hooks2 = |
|
115 | hooks2 = RhodeCodeUi() | |
116 | hooks2.ui_section = 'hooks' |
|
116 | hooks2.ui_section = 'hooks' | |
117 | hooks2.ui_key = 'changegroup.repo_size' |
|
117 | hooks2.ui_key = 'changegroup.repo_size' | |
118 | hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size' |
|
118 | hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size' | |
119 |
|
119 | |||
120 |
web1 = |
|
120 | web1 = RhodeCodeUi() | |
121 | web1.ui_section = 'web' |
|
121 | web1.ui_section = 'web' | |
122 | web1.ui_key = 'push_ssl' |
|
122 | web1.ui_key = 'push_ssl' | |
123 | web1.ui_value = 'false' |
|
123 | web1.ui_value = 'false' | |
124 |
|
124 | |||
125 |
web2 = |
|
125 | web2 = RhodeCodeUi() | |
126 | web2.ui_section = 'web' |
|
126 | web2.ui_section = 'web' | |
127 | web2.ui_key = 'allow_archive' |
|
127 | web2.ui_key = 'allow_archive' | |
128 | web2.ui_value = 'gz zip bz2' |
|
128 | web2.ui_value = 'gz zip bz2' | |
129 |
|
129 | |||
130 |
web3 = |
|
130 | web3 = RhodeCodeUi() | |
131 | web3.ui_section = 'web' |
|
131 | web3.ui_section = 'web' | |
132 | web3.ui_key = 'allow_push' |
|
132 | web3.ui_key = 'allow_push' | |
133 | web3.ui_value = '*' |
|
133 | web3.ui_value = '*' | |
134 |
|
134 | |||
135 |
web4 = |
|
135 | web4 = RhodeCodeUi() | |
136 | web4.ui_section = 'web' |
|
136 | web4.ui_section = 'web' | |
137 | web4.ui_key = 'baseurl' |
|
137 | web4.ui_key = 'baseurl' | |
138 | web4.ui_value = '/' |
|
138 | web4.ui_value = '/' | |
139 |
|
139 | |||
140 |
paths = |
|
140 | paths = RhodeCodeUi() | |
141 | paths.ui_section = 'paths' |
|
141 | paths.ui_section = 'paths' | |
142 | paths.ui_key = '/' |
|
142 | paths.ui_key = '/' | |
143 | paths.ui_value = os.path.join(path, '*') |
|
143 | paths.ui_value = os.path.join(path, '*') | |
144 |
|
144 | |||
145 |
|
145 | |||
146 |
hgsettings1 = |
|
146 | hgsettings1 = RhodeCodeSettings() | |
147 |
|
147 | |||
148 | hgsettings1.app_settings_name = 'realm' |
|
148 | hgsettings1.app_settings_name = 'realm' | |
149 |
hgsettings1.app_settings_value = ' |
|
149 | hgsettings1.app_settings_value = 'rhodecode authentication' | |
150 |
|
150 | |||
151 |
hgsettings2 = |
|
151 | hgsettings2 = RhodeCodeSettings() | |
152 | hgsettings2.app_settings_name = 'title' |
|
152 | hgsettings2.app_settings_name = 'title' | |
153 |
hgsettings2.app_settings_value = ' |
|
153 | hgsettings2.app_settings_value = 'rhodecode' | |
154 |
|
154 | |||
155 | try: |
|
155 | try: | |
156 | self.sa.add(hooks1) |
|
156 | self.sa.add(hooks1) | |
@@ -215,8 +215,8 b' class DbManage(object):' | |||||
215 | ('hg.create.repository', 'Repository create'), |
|
215 | ('hg.create.repository', 'Repository create'), | |
216 | ('hg.create.none', 'Repository creation disabled'), |
|
216 | ('hg.create.none', 'Repository creation disabled'), | |
217 | ('hg.register.none', 'Register disabled'), |
|
217 | ('hg.register.none', 'Register disabled'), | |
218 |
('hg.register.manual_activate', 'Register new user with |
|
218 | ('hg.register.manual_activate', 'Register new user with rhodecode without manual activation'), | |
219 |
('hg.register.auto_activate', 'Register new user with |
|
219 | ('hg.register.auto_activate', 'Register new user with rhodecode without auto activation'), | |
220 | ] |
|
220 | ] | |
221 |
|
221 | |||
222 | for p in perms: |
|
222 | for p in perms: |
@@ -1,6 +1,6 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # encoding: utf-8 |
|
2 | # encoding: utf-8 | |
3 |
# whoosh indexer daemon for |
|
3 | # whoosh indexer daemon for rhodecode | |
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
|
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> | |
5 | # |
|
5 | # | |
6 | # This program is free software; you can redistribute it and/or |
|
6 | # This program is free software; you can redistribute it and/or |
@@ -129,7 +129,7 b' class SimpleHg(object):' | |||||
129 | if action == 'push': |
|
129 | if action == 'push': | |
130 | self.__invalidate_cache(repo_name) |
|
130 | self.__invalidate_cache(repo_name) | |
131 | messages = [] |
|
131 | messages = [] | |
132 |
messages.append('thank you for using |
|
132 | messages.append('thank you for using rhodecode') | |
133 |
|
133 | |||
134 | return self.msg_wrapper(app, environ, start_response, messages) |
|
134 | return self.msg_wrapper(app, environ, start_response, messages) | |
135 | else: |
|
135 | else: |
@@ -26,7 +26,7 b' from beaker.cache import cache_region' | |||||
26 | from mercurial import ui, config, hg |
|
26 | from mercurial import ui, config, hg | |
27 | from mercurial.error import RepoError |
|
27 | from mercurial.error import RepoError | |
28 | from rhodecode.model import meta |
|
28 | from rhodecode.model import meta | |
29 |
from rhodecode.model.db import Repository, User, |
|
29 | from rhodecode.model.db import Repository, User, RhodeCodeUi, RhodeCodeSettings, UserLog | |
30 | from vcs.backends.base import BaseChangeset |
|
30 | from vcs.backends.base import BaseChangeset | |
31 | from vcs.utils.lazy import LazyProperty |
|
31 | from vcs.utils.lazy import LazyProperty | |
32 | import logging |
|
32 | import logging | |
@@ -127,7 +127,7 b' def ask_ok(prompt, retries=4, complaint=' | |||||
127 | def get_hg_ui_cached(): |
|
127 | def get_hg_ui_cached(): | |
128 | try: |
|
128 | try: | |
129 | sa = meta.Session |
|
129 | sa = meta.Session | |
130 |
ret = sa.query( |
|
130 | ret = sa.query(RhodeCodeUi).all() | |
131 | finally: |
|
131 | finally: | |
132 | meta.Session.remove() |
|
132 | meta.Session.remove() | |
133 | return ret |
|
133 | return ret | |
@@ -136,7 +136,7 b' def get_hg_ui_cached():' | |||||
136 | def get_hg_settings(): |
|
136 | def get_hg_settings(): | |
137 | try: |
|
137 | try: | |
138 | sa = meta.Session |
|
138 | sa = meta.Session | |
139 |
ret = sa.query( |
|
139 | ret = sa.query(RhodeCodeSettings).all() | |
140 | finally: |
|
140 | finally: | |
141 | meta.Session.remove() |
|
141 | meta.Session.remove() | |
142 |
|
142 | |||
@@ -151,7 +151,7 b' def get_hg_settings():' | |||||
151 | def get_hg_ui_settings(): |
|
151 | def get_hg_ui_settings(): | |
152 | try: |
|
152 | try: | |
153 | sa = meta.Session |
|
153 | sa = meta.Session | |
154 |
ret = sa.query( |
|
154 | ret = sa.query(RhodeCodeUi).all() | |
155 | finally: |
|
155 | finally: | |
156 | meta.Session.remove() |
|
156 | meta.Session.remove() | |
157 |
|
157 |
@@ -7,14 +7,14 b' import logging' | |||||
7 |
|
7 | |||
8 | log = logging.getLogger(__name__) |
|
8 | log = logging.getLogger(__name__) | |
9 |
|
9 | |||
10 |
class |
|
10 | class RhodeCodeSettings(Base): | |
11 | __tablename__ = 'rhodecode_settings' |
|
11 | __tablename__ = 'rhodecode_settings' | |
12 | __table_args__ = (UniqueConstraint('app_settings_name'), {'useexisting':True}) |
|
12 | __table_args__ = (UniqueConstraint('app_settings_name'), {'useexisting':True}) | |
13 | app_settings_id = Column("app_settings_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True) |
|
13 | app_settings_id = Column("app_settings_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True) | |
14 | app_settings_name = Column("app_settings_name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
14 | app_settings_name = Column("app_settings_name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
15 | app_settings_value = Column("app_settings_value", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) |
|
15 | app_settings_value = Column("app_settings_value", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None) | |
16 |
|
16 | |||
17 |
class |
|
17 | class RhodeCodeUi(Base): | |
18 | __tablename__ = 'rhodecode_ui' |
|
18 | __tablename__ = 'rhodecode_ui' | |
19 | __table_args__ = {'useexisting':True} |
|
19 | __table_args__ = {'useexisting':True} | |
20 | ui_id = Column("ui_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True) |
|
20 | ui_id = Column("ui_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True) |
@@ -2,7 +2,7 b'' | |||||
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> | |
4 | <head> |
|
4 | <head> | |
5 |
<title>${_('Sign In to |
|
5 | <title>${_('Sign In to rhodecode')}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> |
|
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> | |
8 | <meta name="robots" content="index, nofollow"/> |
|
8 | <meta name="robots" content="index, nofollow"/> | |
@@ -19,7 +19,7 b'' | |||||
19 | <div id="login"> |
|
19 | <div id="login"> | |
20 | <!-- login --> |
|
20 | <!-- login --> | |
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 |
<h5>${_('Sign In to |
|
22 | <h5>${_('Sign In to rhodecode')}</h5> | |
23 | <div class="corner tl"></div> |
|
23 | <div class="corner tl"></div> | |
24 | <div class="corner tr"></div> |
|
24 | <div class="corner tr"></div> | |
25 | </div> |
|
25 | </div> |
@@ -2,7 +2,7 b'' | |||||
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> | |
4 | <head> |
|
4 | <head> | |
5 |
<title>${_('Reset You password to |
|
5 | <title>${_('Reset You password to rhodecode')}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> |
|
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> | |
8 | <meta name="robots" content="index, nofollow"/> |
|
8 | <meta name="robots" content="index, nofollow"/> | |
@@ -19,7 +19,7 b'' | |||||
19 | <div id="register"> |
|
19 | <div id="register"> | |
20 |
|
20 | |||
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 |
<h5>${_('Reset You password to |
|
22 | <h5>${_('Reset You password to rhodecode')}</h5> | |
23 | <div class="corner tl"></div> |
|
23 | <div class="corner tl"></div> | |
24 | <div class="corner tr"></div> |
|
24 | <div class="corner tr"></div> | |
25 | </div> |
|
25 | </div> |
@@ -2,7 +2,7 b'' | |||||
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> |
|
3 | <html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml"> | |
4 | <head> |
|
4 | <head> | |
5 |
<title>${_('Sign Up to |
|
5 | <title>${_('Sign Up to rhodecode')}</title> | |
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> |
|
7 | <link rel="icon" href="/images/hgicon.png" type="image/png" /> | |
8 | <meta name="robots" content="index, nofollow"/> |
|
8 | <meta name="robots" content="index, nofollow"/> | |
@@ -19,7 +19,7 b'' | |||||
19 | <div id="register"> |
|
19 | <div id="register"> | |
20 |
|
20 | |||
21 | <div class="title"> |
|
21 | <div class="title"> | |
22 |
<h5>${_('Sign Up to |
|
22 | <h5>${_('Sign Up to rhodecode')}</h5> | |
23 | <div class="corner tl"></div> |
|
23 | <div class="corner tl"></div> | |
24 | <div class="corner tr"></div> |
|
24 | <div class="corner tr"></div> | |
25 | </div> |
|
25 | </div> |
@@ -62,7 +62,7 b' class TestLoginController(TestController' | |||||
62 |
|
62 | |||
63 | def test_register(self): |
|
63 | def test_register(self): | |
64 | response = self.app.get(url(controller='login', action='register')) |
|
64 | response = self.app.get(url(controller='login', action='register')) | |
65 |
assert 'Sign Up to |
|
65 | assert 'Sign Up to rhodecode' in response.body, 'wrong page for user registration' | |
66 |
|
66 | |||
67 | def test_register_err_same_username(self): |
|
67 | def test_register_err_same_username(self): | |
68 | response = self.app.post(url(controller='login', action='register'), |
|
68 | response = self.app.post(url(controller='login', action='register'), | |
@@ -104,7 +104,7 b' class TestLoginController(TestController' | |||||
104 | 'lastname':lastname}) |
|
104 | 'lastname':lastname}) | |
105 | print response.body |
|
105 | print response.body | |
106 | assert response.status == '302 Found', 'Wrong response from register page got %s' % response.status |
|
106 | assert response.status == '302 Found', 'Wrong response from register page got %s' % response.status | |
107 |
assert 'You have successfully registered into |
|
107 | assert 'You have successfully registered into rhodecode' in response.session['flash'][0], 'No flash message about user registration' | |
108 |
|
108 | |||
109 | ret = self.sa.query(User).filter(User.username == 'test_regular4').one() |
|
109 | ret = self.sa.query(User).filter(User.username == 'test_regular4').one() | |
110 | assert ret.username == username , 'field mismatch %s %s' % (ret.username, username) |
|
110 | assert ret.username == username , 'field mismatch %s %s' % (ret.username, username) | |
@@ -140,7 +140,7 b' class TestLoginController(TestController' | |||||
140 | response = self.app.post(url(controller='login', action='password_reset'), |
|
140 | response = self.app.post(url(controller='login', action='password_reset'), | |
141 | {'email':email, }) |
|
141 | {'email':email, }) | |
142 | print response.session['flash'] |
|
142 | print response.session['flash'] | |
143 |
assert 'You have successfully registered into |
|
143 | assert 'You have successfully registered into rhodecode' in response.session['flash'][0], 'No flash message about user registration' | |
144 | assert 'Your new password was sent' in response.session['flash'][1], 'No flash message about password reset' |
|
144 | assert 'Your new password was sent' in response.session['flash'][1], 'No flash message about password reset' | |
145 |
|
145 | |||
146 |
|
146 |
@@ -7,10 +7,10 b' except ImportError:' | |||||
7 | from setuptools import setup, find_packages |
|
7 | from setuptools import setup, find_packages | |
8 |
|
8 | |||
9 | setup( |
|
9 | setup( | |
10 |
name=' |
|
10 | name='RhodeCode-%s' % get_version(), | |
11 | version=get_version(), |
|
11 | version=get_version(), | |
12 | description='Mercurial repository serving and browsing app', |
|
12 | description='Mercurial repository serving and browsing app', | |
13 | keywords='mercurial web hgwebdir replacement serving hgweb', |
|
13 | keywords='mercurial web hgwebdir replacement serving hgweb rhodecode', | |
14 | license='BSD', |
|
14 | license='BSD', | |
15 | author='marcin kuzminski', |
|
15 | author='marcin kuzminski', | |
16 | author_email='marcin@python-works.com', |
|
16 | author_email='marcin@python-works.com', |
@@ -1,6 +1,6 b'' | |||||
1 | ################################################################################ |
|
1 | ################################################################################ | |
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 |
# |
|
3 | # rhodecode - Pylons environment configuration # | |
4 | # # |
|
4 | # # | |
5 | # The %(here)s variable will be replaced with the parent directory of this file# |
|
5 | # The %(here)s variable will be replaced with the parent directory of this file# | |
6 | ################################################################################ |
|
6 | ################################################################################ | |
@@ -10,11 +10,11 b' debug = true' | |||||
10 | ################################################################################ |
|
10 | ################################################################################ | |
11 | ## Uncomment and replace with the address which should receive ## |
|
11 | ## Uncomment and replace with the address which should receive ## | |
12 | ## any error reports after application crash ## |
|
12 | ## any error reports after application crash ## | |
13 |
## Additionally those settings will be used by |
|
13 | ## Additionally those settings will be used by rhodecode mailing system ## | |
14 | ################################################################################ |
|
14 | ################################################################################ | |
15 | #email_to = admin@localhost |
|
15 | #email_to = admin@localhost | |
16 | #error_email_from = paste_error@localhost |
|
16 | #error_email_from = paste_error@localhost | |
17 |
#app_email_from = |
|
17 | #app_email_from = rhodecode-noreply@localhost | |
18 | #error_message = |
|
18 | #error_message = | |
19 |
|
19 | |||
20 | #smtp_server = mail.server.com |
|
20 | #smtp_server = mail.server.com | |
@@ -66,7 +66,7 b' beaker.cache.super_short_term.expire=10' | |||||
66 | ##that is also used by the cache system. |
|
66 | ##that is also used by the cache system. | |
67 | beaker.session.type = file |
|
67 | beaker.session.type = file | |
68 |
|
68 | |||
69 |
beaker.session.key = |
|
69 | beaker.session.key = rhodecode | |
70 | beaker.session.secret = g654dcno0-9873jhgfreyu |
|
70 | beaker.session.secret = g654dcno0-9873jhgfreyu | |
71 | beaker.session.timeout = 36000 |
|
71 | beaker.session.timeout = 36000 | |
72 |
|
72 |
General Comments 0
You need to be logged in to leave comments.
Login now