Changeset - 7292c5976752
[Not reviewed]
default
0 4 0
Mads Kiilerich - 8 years ago 2017-09-14 02:08:06
mads@kiilerich.com
ini: simplify preservation of old settings - just keep the old line as comment

The thing about skipping mako function references is not important.
4 files changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -112,6 +112,7 @@ initial_repo_scan = true
 
archive_cache_dir = %(here)s/tarballcache
 

	
 
## change this to unique ID for security
 
#app_instance_uuid = VERY-SECRET
 
app_instance_uuid = development-not-secret
 

	
 
## cut off limit for large diffs (size in bytes)
 
@@ -286,6 +287,7 @@ beaker.session.httponly = true
 
beaker.session.timeout = 2592000
 

	
 
## Server secret used with HMAC to ensure integrity of cookies.
 
#beaker.session.secret = VERY-SECRET
 
beaker.session.secret = development-not-secret
 
## Further, encrypt the data with AES.
 
#beaker.session.encrypt_key = <key_for_encryption>
kallithea/lib/inifile.py
Show inline comments
 
@@ -64,7 +64,7 @@ def expand(template, desc, mako_variable
 
    [first-section]
 
    <BLANKLINE>
 
    variable=VALUE
 
    #variable2 = value after tab
 
    #variable2  =    value after tab
 
    variable2 = VAL2
 
    <BLANKLINE>
 
    <BLANKLINE>
 
@@ -92,9 +92,8 @@ def expand(template, desc, mako_variable
 
                key, value = m.groups()
 
                line = m.group(0)
 
                if key in section_settings:
 
                    line = '%s = %s' % (key, section_settings[key])
 
                    if '$' not in value:
 
                        line = '#%s = %s\n%s' % (key, value, line)
 
                    # keep old entry as example - comments might refer to it
 
                    line = '#%s\n%s = %s' % (line, key, section_settings[key])
 
                return line.rstrip()
 

	
 
            # process lines that not are comments or empty and look like name=value
kallithea/tests/test.ini
Show inline comments
 
@@ -108,6 +108,7 @@ initial_repo_scan = false
 
archive_cache_dir = %(here)s/tarballcache
 

	
 
## change this to unique ID for security
 
#app_instance_uuid = VERY-SECRET
 
app_instance_uuid = test
 

	
 
## cut off limit for large diffs (size in bytes)
 
@@ -284,6 +285,7 @@ beaker.session.httponly = true
 
beaker.session.timeout = 2592000
 

	
 
## Server secret used with HMAC to ensure integrity of cookies.
 
#beaker.session.secret = VERY-SECRET
 
beaker.session.secret = {74e0cd75-b339-478b-b129-07dd221def1f}
 
## Further, encrypt the data with AES.
 
#beaker.session.encrypt_key = <key_for_encryption>
scripts/generate-ini.py
Show inline comments
 
@@ -17,7 +17,7 @@ mako_variable_values = {
 
    'http_server': 'waitress',
 
    'host': '127.0.0.1',
 
    'port': '5000',
 
    'uuid': lambda: '${app_instance_uuid}',
 
    'uuid': lambda: 'VERY-SECRET',
 
}
 

	
 
# files to be generated from the mako template
0 comments (0 inline, 0 general)