# HG changeset patch # User Mads Kiilerich # Date 1505347686 -7200 # Node ID 7292c5976752e2d43d9fafbe487d1ae346bcbb2c # Parent 2b6459f9e91a95c31631d8b28ae27bb91f1fcbac ini: simplify preservation of old settings - just keep the old line as comment The thing about skipping mako function references is not important. diff -r 2b6459f9e91a -r 7292c5976752 development.ini --- a/development.ini Thu Sep 14 02:08:06 2017 +0200 +++ b/development.ini Thu Sep 14 02:08:06 2017 +0200 @@ -112,6 +112,7 @@ 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.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 = diff -r 2b6459f9e91a -r 7292c5976752 kallithea/lib/inifile.py --- a/kallithea/lib/inifile.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/lib/inifile.py Thu Sep 14 02:08:06 2017 +0200 @@ -64,7 +64,7 @@ [first-section] variable=VALUE - #variable2 = value after tab + #variable2 = value after tab variable2 = VAL2 @@ -92,9 +92,8 @@ 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 diff -r 2b6459f9e91a -r 7292c5976752 kallithea/tests/test.ini --- a/kallithea/tests/test.ini Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/tests/test.ini Thu Sep 14 02:08:06 2017 +0200 @@ -108,6 +108,7 @@ 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.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 = diff -r 2b6459f9e91a -r 7292c5976752 scripts/generate-ini.py --- a/scripts/generate-ini.py Thu Sep 14 02:08:06 2017 +0200 +++ b/scripts/generate-ini.py Thu Sep 14 02:08:06 2017 +0200 @@ -17,7 +17,7 @@ '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