Changeset - 876776983c3c
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 15 years ago 2010-11-26 18:05:51
marcin@python-works.com
disabled dotencode format for mercurial 1.7 usage and hg <=1.6 compatibility
bumped mercurial version
3 files changed with 14 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -146,12 +146,19 @@ class DbManage(object):
 

	
 
        hooks4 = RhodeCodeUi()
 
        hooks4.ui_section = 'hooks'
 
        hooks4.ui_key = 'preoutgoing.pull_logger'
 
        hooks4.ui_value = 'python:rhodecode.lib.hooks.log_pull_action'
 

	
 
        #for mercurial 1.7 set backward comapatibility with format
 

	
 
        dotencode_disable = RhodeCodeUi()
 
        dotencode_disable.ui_section = 'format'
 
        dotencode_disable.ui_key = 'dotencode'
 
        dotencode_disable.ui_section = 'false'
 

	
 

	
 
        web1 = RhodeCodeUi()
 
        web1.ui_section = 'web'
 
        web1.ui_key = 'push_ssl'
 
        web1.ui_value = 'false'
 

	
 
@@ -178,25 +185,24 @@ class DbManage(object):
 

	
 
        hgsettings1 = RhodeCodeSettings('realm', 'RhodeCode authentication')
 
        hgsettings2 = RhodeCodeSettings('title', 'RhodeCode')
 

	
 

	
 
        try:
 

	
 

	
 
            self.sa.add(hooks1)
 
            self.sa.add(hooks2)
 
            self.sa.add(hooks3)
 
            self.sa.add(hooks4)
 
            self.sa.add(web1)
 
            self.sa.add(web2)
 
            self.sa.add(web3)
 
            self.sa.add(web4)
 
            self.sa.add(paths)
 
            self.sa.add(hgsettings1)
 
            self.sa.add(hgsettings2)
 
            self.sa.add(dotencode_disable)
 
            for k in ['ldap_active', 'ldap_host', 'ldap_port', 'ldap_ldaps',
 
                      'ldap_dn_user', 'ldap_dn_pass', 'ldap_base_dn']:
 

	
 
                setting = RhodeCodeSettings(k, '')
 
                self.sa.add(setting)
 

	
rhodecode/lib/utils.py
Show inline comments
 
@@ -209,18 +209,21 @@ def make_ui(read_from='file', path=None,
 

	
 
    elif read_from == 'db':
 
        sa = meta.Session()
 
        ret = sa.query(RhodeCodeUi)\
 
            .options(FromCache("sql_cache_short",
 
                               "get_hg_ui_settings")).all()
 
        meta.Session.remove()
 

	
 
        hg_ui = ret
 
        for ui_ in hg_ui:
 
            if ui_.ui_active:
 
                log.debug('settings ui from db[%s]%s:%s', ui_.ui_section, ui_.ui_key, ui_.ui_value)
 
                log.debug('settings ui from db[%s]%s:%s', ui_.ui_section,
 
                          ui_.ui_key, ui_.ui_value)
 
                baseui.setconfig(ui_.ui_section, ui_.ui_key, ui_.ui_value)
 

	
 
        meta.Session.remove()
 
    return baseui
 

	
 

	
 
def set_rhodecode_config(config):
 
    """
 
    Updates pylons config with new settings from database
setup.py
Show inline comments
 
@@ -5,13 +5,13 @@ py_version = sys.version_info
 
requirements = [
 
        "Pylons>=1.0.0",
 
        "SQLAlchemy>=0.6.5",
 
        "Mako>=0.3.6",
 
        "vcs>=0.1.10",
 
        "pygments>=1.3.0",
 
        "mercurial>=1.6.4",
 
        "mercurial>=1.7.1",
 
        "whoosh>=1.3.1",
 
        "celery>=2.1.3",
 
        "py-bcrypt",
 
        "babel",
 
    ]
 

	
0 comments (0 inline, 0 general)