Changeset - f99075170eb4
[Not reviewed]
README.rst
Show inline comments
 
-------------------------------------
 
Pylons based replacement for hgwebdir
 
-------------------------------------
 
--------------------------------------------------------------
 
Pylons based repository management for mercurial (and soon git)
 
--------------------------------------------------------------
 

	
 
Fully customizable, with authentication, permissions. Based on vcs library.
 

	
 
@@ -13,7 +13,9 @@ Fully customizable, with authentication,
 
- diffs annotations and source code all colored by pygments.
 
- mercurial branch graph and yui-flot powered graphs with zooming and statistics
 
- admin interface for performing user/permission managements as well as repository
 
  management. 
 
  management.
 
- server side forks, it's possible to fork a project and hack it free without
 
  breaking the main.   
 
- full text search of source codes with indexing daemons using whoosh
 
  (no external search servers required all in one application)
 
- async tasks for speed and performance using celery (works without them too)  
 
@@ -32,8 +34,7 @@ Fully customizable, with authentication,
 
- code review based on hg-review (when it's stable)
 
- git support (when vcs can handle it - almost there !)
 
- commit based wikis
 
- in server forks
 
- clonning from remote repositories into hg-app 
 
- clonning from remote repositories into rhodecode (git/mercurial)
 
- other cools stuff that i can figure out (or You can help me figure out)
 

	
 
.. note::
 
@@ -45,14 +46,14 @@ Fully customizable, with authentication,
 
Installation
 
-------------
 

	
 
- I highly recommend to install new virtualenv for hg-app see 
 
- I highly recommend to install new virtualenv for rhodecode see 
 
  http://pypi.python.org/pypi/virtualenv
 
- Create new virtualenv using `virtualenv --no-site-packages /var/www/hgapp-venv`
 
  this will install new virtual env into /var/www/hgapp-venv. 
 
- Create new virtualenv using `virtualenv --no-site-packages /var/www/rhodecode-venv`
 
  this will install new virtual env into /var/www/rhodecode-venv. 
 
  Activate the virtualenv by running 
 
  `source activate /var/www/hgapp-venv/bin/activate`   
 
- Make a folder for hg-app somewhere on the filesystem for example /var/www/hgapp  
 
- Download and extract http://bitbucket.org/marcinkuzminski/hg-app/get/tip.zip
 
  `source activate /var/www/rhodecode-venv/bin/activate`   
 
- Make a folder for rhodecode somewhere on the filesystem for example /var/www/rhodecode  
 
- Download and extract http://bitbucket.org/marcinkuzminski/rhodecode/get/tip.zip
 
  into created directory.
 
- Run `python setup.py install` in order to install the application and all
 
  needed dependencies. Make sure that You're using activated virutalenv  
 
@@ -66,14 +67,14 @@ Installation
 
- Default permissions on each repository is read, and owner is admin. So remember
 
  to update these.
 
- In order to use full power of async tasks, You must install message broker
 
  preferably rabbitmq and start celeryd daemon together with hg-app. 
 
  preferably rabbitmq and start celeryd daemon together with rhodecode. 
 
  The app should gain a lot of speed and become much more responsible. 
 
  For installation instructions You can visit: 
 
  http://ask.github.com/celery/getting-started/index.html. 
 
- All needed configs are inside hg-app ie. celeryconfig.py , production.ini
 
- All needed configs are inside rhodecode ie. celeryconfig.py , production.ini
 
  You can configure the email, ports, loggers, workers from there.
 
- For full text search You can either put crontab entry for 
 
  `python /var/www/hgapp/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>`
 
  `python /var/www/rhodecode/rhodecode/lib/indexers/daemon.py incremental <path_to_repos>`
 
  or run indexer from admin panel. This will scann the repos given in the 
 
  application setup or given path for daemon.py and each scann in incremental 
 
  mode will scann only changed files, 
development.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# hg-app - Pylons environment configuration                                    #
 
# rhodecode - Pylons environment configuration                                    #
 
#                                                                              # 
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
@@ -10,11 +10,11 @@ debug = true
 
################################################################################
 
## Uncomment and replace with the address which should receive                ## 
 
## any error reports after application crash								  ##
 
## Additionally those settings will be used by hg-app mailing system          ##
 
## Additionally those settings will be used by rhodecode mailing system          ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = hg-app-noreply@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#error_message =
 

	
 
#smtp_server = mail.server.com
 
@@ -66,7 +66,7 @@ beaker.cache.super_short_term.expire=10
 
##that is also used by the cache system.
 
beaker.session.type = file
 

	
 
beaker.session.key = hg-app
 
beaker.session.key = rhodecode
 
beaker.session.secret = g654dcno0-9873jhgfreyu
 
beaker.session.timeout = 36000
 

	
init.d/rhodecode_daemon
Show inline comments
 
file renamed from init.d/hg_app_daemon to init.d/rhodecode_daemon
init.d/rhodecode_daemon2
Show inline comments
 
file renamed from init.d/hg_app_daemon2 to init.d/rhodecode_daemon2
 
@@ -4,13 +4,13 @@
 
########################################
 

	
 
### BEGIN INIT INFO
 
# Provides:          hg-app          
 
# Provides:          rhodecode          
 
# Required-Start:    $all
 
# Required-Stop:     $all
 
# Default-Start:     2 3 4 5
 
# Default-Stop:      0 1 6
 
# Short-Description: starts instance of hg-app
 
# Description:       starts instance of hg-app using start-stop-daemon
 
# Short-Description: starts instance of rhodecode
 
# Description:       starts instance of rhodecode using start-stop-daemon
 
### END INIT INFO
 

	
 
APP_NAME="rhodecode"
production.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# hg-app - Pylons environment configuration                                    #
 
# rhodecode - Pylons environment configuration                                    #
 
#                                                                              # 
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
@@ -10,11 +10,11 @@ debug = true
 
################################################################################
 
## Uncomment and replace with the address which should receive                ## 
 
## any error reports after application crash								  ##
 
## Additionally those settings will be used by hg-app mailing system          ##
 
## Additionally those settings will be used by rhodecode mailing system          ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = hg-app-noreply@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#error_message =
 

	
 
#smtp_server = mail.server.com
 
@@ -66,7 +66,7 @@ beaker.cache.super_short_term.expire=10
 
##that is also used by the cache system.
 
beaker.session.type = file
 

	
 
beaker.session.key = hg-app
 
beaker.session.key = rhodecode
 
beaker.session.secret = g654dcno0-9873jhgfreyu
 
beaker.session.timeout = 36000
 

	
rhodecode/config/deployment.ini_tmpl
Show inline comments
 
################################################################################
 
################################################################################
 
# hg-app - Pylons environment configuration                                    #
 
# rhodecode - Pylons environment configuration                                    #
 
#                                                                              # 
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
@@ -10,11 +10,11 @@ debug = true
 
################################################################################
 
## Uncomment and replace with the address which should receive                ## 
 
## any error reports after application crash								  ##
 
## Additionally those settings will be used by hg-app mailing system          ##
 
## Additionally those settings will be used by rhodecode mailing system          ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = hg-app-noreply@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#error_message =
 

	
 
#smtp_server = mail.server.com
 
@@ -67,7 +67,7 @@ beaker.cache.super_short_term.expire=10
 
##that is also used by the cache system.
 
beaker.session.type = file
 

	
 
beaker.session.key = hg-app
 
beaker.session.key = rhodecode
 
beaker.session.secret = ${app_instance_secret}
 
beaker.session.timeout = 36000
 

	
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -33,7 +33,7 @@ from rhodecode.lib.auth import LoginRequ
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.utils import repo2db_mapper, invalidate_cache, \
 
    set_rhodecode_config, get_hg_settings, get_hg_ui_settings, make_ui
 
from rhodecode.model.db import User, UserLog, HgAppSettings, HgAppUi
 
from rhodecode.model.db import User, UserLog, RhodeCodeSettings, RhodeCodeUi
 
from rhodecode.model.forms import UserForm, ApplicationSettingsForm, \
 
    ApplicationUiSettingsForm
 
from rhodecode.model.hg_model import HgModel
 
@@ -116,12 +116,12 @@ class SettingsController(BaseController)
 
                form_result = application_form.to_python(dict(request.POST))
 
            
 
                try:
 
                    hgsettings1 = self.sa.query(HgAppSettings)\
 
                    .filter(HgAppSettings.app_settings_name == 'title').one()
 
                    hgsettings1 = self.sa.query(RhodeCodeSettings)\
 
                    .filter(RhodeCodeSettings.app_settings_name == 'title').one()
 
                    hgsettings1.app_settings_value = form_result['rhodecode_title'] 
 
                    
 
                    hgsettings2 = self.sa.query(HgAppSettings)\
 
                    .filter(HgAppSettings.app_settings_name == 'realm').one()
 
                    hgsettings2 = self.sa.query(RhodeCodeSettings)\
 
                    .filter(RhodeCodeSettings.app_settings_name == 'realm').one()
 
                    hgsettings2.app_settings_value = form_result['rhodecode_realm'] 
 
                    
 
                    
 
@@ -155,22 +155,22 @@ class SettingsController(BaseController)
 
            
 
                try:
 
                    
 
                    hgsettings1 = self.sa.query(HgAppUi)\
 
                    .filter(HgAppUi.ui_key == 'push_ssl').one()
 
                    hgsettings1 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == 'push_ssl').one()
 
                    hgsettings1.ui_value = form_result['web_push_ssl']
 
                    
 
                    hgsettings2 = self.sa.query(HgAppUi)\
 
                    .filter(HgAppUi.ui_key == '/').one()
 
                    hgsettings2 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == '/').one()
 
                    hgsettings2.ui_value = form_result['paths_root_path']                    
 
                    
 
                    
 
                    #HOOKS
 
                    hgsettings3 = self.sa.query(HgAppUi)\
 
                    .filter(HgAppUi.ui_key == 'changegroup.update').one()
 
                    hgsettings3 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == 'changegroup.update').one()
 
                    hgsettings3.ui_active = bool(form_result['hooks_changegroup_update'])  
 
                    
 
                    hgsettings4 = self.sa.query(HgAppUi)\
 
                    .filter(HgAppUi.ui_key == 'changegroup.repo_size').one()
 
                    hgsettings4 = self.sa.query(RhodeCodeUi)\
 
                    .filter(RhodeCodeUi.ui_key == 'changegroup.repo_size').one()
 
                    hgsettings4.ui_active = bool(form_result['hooks_changegroup_repo_size'])                                          
 
                    
 
                    
rhodecode/controllers/login.py
Show inline comments
 
@@ -101,7 +101,7 @@ class LoginController(BaseController):
 
                form_result = register_form.to_python(dict(request.POST))
 
                form_result['active'] = c.auto_active
 
                user_model.create_registration(form_result)
 
                h.flash(_('You have successfully registered into hg-app'),
 
                h.flash(_('You have successfully registered into rhodecode'),
 
                            category='success')                
 
                return redirect(url('login_home'))
 
                               
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -23,10 +23,10 @@ def get_session():
 
    return sa
 

	
 
def get_hg_settings():
 
    from rhodecode.model.db import HgAppSettings
 
    from rhodecode.model.db import RhodeCodeSettings
 
    try:
 
        sa = get_session()
 
        ret = sa.query(HgAppSettings).all()
 
        ret = sa.query(RhodeCodeSettings).all()
 
    finally:
 
        sa.remove()
 
        
 
@@ -39,10 +39,10 @@ def get_hg_settings():
 
    return settings
 

	
 
def get_hg_ui_settings():
 
    from rhodecode.model.db import HgAppUi
 
    from rhodecode.model.db import RhodeCodeUi
 
    try:
 
        sa = get_session()
 
        ret = sa.query(HgAppUi).all()
 
        ret = sa.query(RhodeCodeUi).all()
 
    finally:
 
        sa.remove()
 
        
 
@@ -239,8 +239,8 @@ def reset_user_password(user_email):
 
            sa.rollback()
 
        
 
        run_task(send_email, user_email,
 
                 "Your new hg-app password",
 
                 'Your new hg-app password:%s' % (new_passwd))
 
                 "Your new rhodecode password",
 
                 'Your new rhodecode password:%s' % (new_passwd))
 
        log.info('send new password mail to %s', user_email)
 
        
 
        
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -34,7 +34,7 @@ sys.path.append(ROOT)
 
from rhodecode.lib.auth import get_crypt_password
 
from rhodecode.lib.utils import ask_ok
 
from rhodecode.model import init_model
 
from rhodecode.model.db import User, Permission, HgAppUi, HgAppSettings, \
 
from rhodecode.model.db import User, Permission, RhodeCodeUi, RhodeCodeSettings, \
 
    UserToPerm
 
from rhodecode.model import meta
 
from sqlalchemy.engine import create_engine
 
@@ -107,50 +107,50 @@ class DbManage(object):
 
            log.error('You entered wrong path: %s', path)
 
            sys.exit()
 
        
 
        hooks1 = HgAppUi()
 
        hooks1 = RhodeCodeUi()
 
        hooks1.ui_section = 'hooks'
 
        hooks1.ui_key = 'changegroup.update'
 
        hooks1.ui_value = 'hg update >&2'
 
        
 
        hooks2 = HgAppUi()
 
        hooks2 = RhodeCodeUi()
 
        hooks2.ui_section = 'hooks'
 
        hooks2.ui_key = 'changegroup.repo_size'
 
        hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size' 
 
                
 
        web1 = HgAppUi()
 
        web1 = RhodeCodeUi()
 
        web1.ui_section = 'web'
 
        web1.ui_key = 'push_ssl'
 
        web1.ui_value = 'false'
 
                
 
        web2 = HgAppUi()
 
        web2 = RhodeCodeUi()
 
        web2.ui_section = 'web'
 
        web2.ui_key = 'allow_archive'
 
        web2.ui_value = 'gz zip bz2'
 
                
 
        web3 = HgAppUi()
 
        web3 = RhodeCodeUi()
 
        web3.ui_section = 'web'
 
        web3.ui_key = 'allow_push'
 
        web3.ui_value = '*'
 
        
 
        web4 = HgAppUi()
 
        web4 = RhodeCodeUi()
 
        web4.ui_section = 'web'
 
        web4.ui_key = 'baseurl'
 
        web4.ui_value = '/'                        
 
        
 
        paths = HgAppUi()
 
        paths = RhodeCodeUi()
 
        paths.ui_section = 'paths'
 
        paths.ui_key = '/'
 
        paths.ui_value = os.path.join(path, '*')
 
        
 
        
 
        hgsettings1 = HgAppSettings()
 
        hgsettings1 = RhodeCodeSettings()
 
        
 
        hgsettings1.app_settings_name = 'realm'
 
        hgsettings1.app_settings_value = 'hg-app authentication'
 
        hgsettings1.app_settings_value = 'rhodecode authentication'
 
        
 
        hgsettings2 = HgAppSettings()
 
        hgsettings2 = RhodeCodeSettings()
 
        hgsettings2.app_settings_name = 'title'
 
        hgsettings2.app_settings_value = 'hg-app'      
 
        hgsettings2.app_settings_value = 'rhodecode'      
 
        
 
        try:
 
            self.sa.add(hooks1)
 
@@ -215,8 +215,8 @@ class DbManage(object):
 
                 ('hg.create.repository', 'Repository create'),
 
                 ('hg.create.none', 'Repository creation disabled'),
 
                 ('hg.register.none', 'Register disabled'),
 
                 ('hg.register.manual_activate', 'Register new user with hg-app without manual activation'),
 
                 ('hg.register.auto_activate', 'Register new user with hg-app without auto activation'),
 
                 ('hg.register.manual_activate', 'Register new user with rhodecode without manual activation'),
 
                 ('hg.register.auto_activate', 'Register new user with rhodecode without auto activation'),
 
                ]
 
        
 
        for p in perms:
rhodecode/lib/indexers/daemon.py
Show inline comments
 
#!/usr/bin/env python
 
# encoding: utf-8
 
# whoosh indexer daemon for hg-app
 
# whoosh indexer daemon for rhodecode
 
# Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
 
#
 
# This program is free software; you can redistribute it and/or
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -129,7 +129,7 @@ class SimpleHg(object):
 
        if action == 'push':
 
            self.__invalidate_cache(repo_name)
 
            messages = []
 
            messages.append('thank you for using hg-app')
 
            messages.append('thank you for using rhodecode')
 
        
 
            return self.msg_wrapper(app, environ, start_response, messages)
 
        else:
rhodecode/lib/utils.py
Show inline comments
 
@@ -26,7 +26,7 @@ from beaker.cache import cache_region
 
from mercurial import ui, config, hg
 
from mercurial.error import RepoError
 
from rhodecode.model import meta
 
from rhodecode.model.db import Repository, User, HgAppUi, HgAppSettings, UserLog
 
from rhodecode.model.db import Repository, User, RhodeCodeUi, RhodeCodeSettings, UserLog
 
from vcs.backends.base import BaseChangeset
 
from vcs.utils.lazy import LazyProperty
 
import logging
 
@@ -127,7 +127,7 @@ def ask_ok(prompt, retries=4, complaint=
 
def get_hg_ui_cached():
 
    try:
 
        sa = meta.Session
 
        ret = sa.query(HgAppUi).all()
 
        ret = sa.query(RhodeCodeUi).all()
 
    finally:
 
        meta.Session.remove()
 
    return ret
 
@@ -136,7 +136,7 @@ def get_hg_ui_cached():
 
def get_hg_settings():
 
    try:
 
        sa = meta.Session
 
        ret = sa.query(HgAppSettings).all()
 
        ret = sa.query(RhodeCodeSettings).all()
 
    finally:
 
        meta.Session.remove()
 
        
 
@@ -151,7 +151,7 @@ def get_hg_settings():
 
def get_hg_ui_settings():
 
    try:
 
        sa = meta.Session
 
        ret = sa.query(HgAppUi).all()
 
        ret = sa.query(RhodeCodeUi).all()
 
    finally:
 
        meta.Session.remove()
 
        
rhodecode/model/db.py
Show inline comments
 
@@ -7,14 +7,14 @@ import logging
 

	
 
log = logging.getLogger(__name__)
 

	
 
class HgAppSettings(Base):
 
class RhodeCodeSettings(Base):
 
    __tablename__ = 'rhodecode_settings'
 
    __table_args__ = (UniqueConstraint('app_settings_name'), {'useexisting':True})
 
    app_settings_id = Column("app_settings_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True)
 
    app_settings_name = Column("app_settings_name", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
 
    app_settings_value = Column("app_settings_value", TEXT(length=None, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
 

	
 
class HgAppUi(Base):
 
class RhodeCodeUi(Base):
 
    __tablename__ = 'rhodecode_ui'
 
    __table_args__ = {'useexisting':True}
 
    ui_id = Column("ui_id", INTEGER(), nullable=False, unique=True, default=None, primary_key=True)
rhodecode/templates/login.html
Show inline comments
 
@@ -2,7 +2,7 @@
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
 
    <head>
 
        <title>${_('Sign In to hg-app')}</title>
 
        <title>${_('Sign In to rhodecode')}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
@@ -19,7 +19,7 @@
 
<div id="login">
 
            <!-- login -->
 
            <div class="title">
 
                <h5>${_('Sign In to hg-app')}</h5>
 
                <h5>${_('Sign In to rhodecode')}</h5>
 
                <div class="corner tl"></div>
 
                <div class="corner tr"></div>
 
            </div>
rhodecode/templates/password_reset.html
Show inline comments
 
@@ -2,7 +2,7 @@
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
 
    <head>
 
        <title>${_('Reset You password to hg-app')}</title>
 
        <title>${_('Reset You password to rhodecode')}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
@@ -19,7 +19,7 @@
 
		<div id="register">
 
			
 
			<div class="title">
 
				<h5>${_('Reset You password to hg-app')}</h5>
 
				<h5>${_('Reset You password to rhodecode')}</h5>
 
                <div class="corner tl"></div>
 
                <div class="corner tr"></div>				
 
			</div>
rhodecode/templates/register.html
Show inline comments
 
@@ -2,7 +2,7 @@
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" id="mainhtml">
 
    <head>
 
        <title>${_('Sign Up to hg-app')}</title>
 
        <title>${_('Sign Up to rhodecode')}</title>
 
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
        <link rel="icon" href="/images/hgicon.png" type="image/png" />
 
        <meta name="robots" content="index, nofollow"/>
 
@@ -19,7 +19,7 @@
 
		<div id="register">
 
			
 
			<div class="title">
 
				<h5>${_('Sign Up to hg-app')}</h5>
 
				<h5>${_('Sign Up to rhodecode')}</h5>
 
                <div class="corner tl"></div>
 
                <div class="corner tr"></div>				
 
			</div>
rhodecode/tests/functional/test_login.py
Show inline comments
 
@@ -62,7 +62,7 @@ class TestLoginController(TestController
 
        
 
    def test_register(self):
 
        response = self.app.get(url(controller='login', action='register'))
 
        assert 'Sign Up to hg-app' in response.body, 'wrong page for user registration'
 
        assert 'Sign Up to rhodecode' in response.body, 'wrong page for user registration'
 
        
 
    def test_register_err_same_username(self):
 
        response = self.app.post(url(controller='login', action='register'),
 
@@ -104,7 +104,7 @@ class TestLoginController(TestController
 
                                             'lastname':lastname})
 
        print response.body
 
        assert response.status == '302 Found', 'Wrong response from register page got %s' % response.status        
 
        assert 'You have successfully registered into hg-app' in response.session['flash'][0], 'No flash message about user registration'
 
        assert 'You have successfully registered into rhodecode' in response.session['flash'][0], 'No flash message about user registration'
 
        
 
        ret = self.sa.query(User).filter(User.username == 'test_regular4').one()
 
        assert ret.username == username , 'field mismatch %s %s' % (ret.username, username)
 
@@ -140,7 +140,7 @@ class TestLoginController(TestController
 
        response = self.app.post(url(controller='login', action='password_reset'),
 
                                            {'email':email, })
 
        print response.session['flash']
 
        assert 'You have successfully registered into hg-app' in response.session['flash'][0], 'No flash message about user registration'
 
        assert 'You have successfully registered into rhodecode' in response.session['flash'][0], 'No flash message about user registration'
 
        assert 'Your new password was sent' in response.session['flash'][1], 'No flash message about password reset'
 
        
 
        
setup.py
Show inline comments
 
@@ -7,10 +7,10 @@ except ImportError:
 
    from setuptools import setup, find_packages
 

	
 
setup(
 
    name='HgApp-%s' % get_version(),
 
    name='RhodeCode-%s' % get_version(),
 
    version=get_version(),
 
    description='Mercurial repository serving and browsing app',
 
    keywords='mercurial web hgwebdir replacement serving hgweb',
 
    keywords='mercurial web hgwebdir replacement serving hgweb rhodecode',
 
    license='BSD',
 
    author='marcin kuzminski',
 
    author_email='marcin@python-works.com',
test.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# hg-app - Pylons environment configuration                                    #
 
# rhodecode - Pylons environment configuration                                    #
 
#                                                                              # 
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
@@ -10,11 +10,11 @@ debug = true
 
################################################################################
 
## Uncomment and replace with the address which should receive                ## 
 
## any error reports after application crash								  ##
 
## Additionally those settings will be used by hg-app mailing system          ##
 
## Additionally those settings will be used by rhodecode mailing system          ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = hg-app-noreply@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#error_message =
 

	
 
#smtp_server = mail.server.com
 
@@ -66,7 +66,7 @@ beaker.cache.super_short_term.expire=10
 
##that is also used by the cache system.
 
beaker.session.type = file
 

	
 
beaker.session.key = hg-app
 
beaker.session.key = rhodecode
 
beaker.session.secret = g654dcno0-9873jhgfreyu
 
beaker.session.timeout = 36000
 

	
0 comments (0 inline, 0 general)