Changeset - 1450ceb36aa6
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-11-18 00:13:44
marcin@python-works.com
enabled largefiles extension by default in rhodecode
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -277,48 +277,54 @@ class DbManage(object):
 
        hooks2_ = self.sa.query(RhodeCodeUi)\
 
            .filter(RhodeCodeUi.ui_key == hooks2_key).scalar()
 

	
 
        hooks2 = RhodeCodeUi() if hooks2_ is None else hooks2_
 
        hooks2.ui_section = 'hooks'
 
        hooks2.ui_key = hooks2_key
 
        hooks2.ui_value = 'python:rhodecode.lib.hooks.repo_size'
 

	
 
        hooks3 = RhodeCodeUi()
 
        hooks3.ui_section = 'hooks'
 
        hooks3.ui_key = RhodeCodeUi.HOOK_PUSH
 
        hooks3.ui_value = 'python:rhodecode.lib.hooks.log_push_action'
 

	
 
        hooks4 = RhodeCodeUi()
 
        hooks4.ui_section = 'hooks'
 
        hooks4.ui_key = RhodeCodeUi.HOOK_PULL
 
        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_value = 'false'
 

	
 
        # enable largefiles
 
        dotencode_disable = RhodeCodeUi()
 
        dotencode_disable.ui_section = 'extensions'
 
        dotencode_disable.ui_key = 'largefiles'
 
        dotencode_disable.ui_value = '1'
 

	
 
        try:
 
            self.sa.add(hooks1)
 
            self.sa.add(hooks2)
 
            self.sa.add(hooks3)
 
            self.sa.add(hooks4)
 
            self.sa.add(dotencode_disable)
 
            self.sa.commit()
 
        except:
 
            self.sa.rollback()
 
            raise
 

	
 
    def create_ldap_options(self,skip_existing=False):
 
        """Creates ldap settings"""
 

	
 
        try:
 
            for k, v in [('ldap_active', 'false'), ('ldap_host', ''),
 
                        ('ldap_port', '389'), ('ldap_tls_kind', 'PLAIN'),
 
                        ('ldap_tls_reqcert', ''), ('ldap_dn_user', ''),
 
                        ('ldap_dn_pass', ''), ('ldap_base_dn', ''),
 
                        ('ldap_filter', ''), ('ldap_search_scope', ''),
 
                        ('ldap_attr_login', ''), ('ldap_attr_firstname', ''),
 
                        ('ldap_attr_lastname', ''), ('ldap_attr_email', '')]:
 

	
 
                if skip_existing and RhodeCodeSetting.get_by_name(k) != None:
0 comments (0 inline, 0 general)