diff --git a/configs/development.ini b/configs/development.ini --- a/configs/development.ini +++ b/configs/development.ini @@ -78,10 +78,10 @@ debugtoolbar.exclude_prefixes = ; default locale used by VCS systems #locale = en_US.UTF-8 -; path to binaries for vcsserver, it should be set by the installer +; path to binaries (hg,git,svn) for vcsserver, it should be set by the installer ; at installation time, e.g /home/user/.rccontrol/vcsserver-1/profile/bin -; it can also be a path to nix-build output in case of development -core.binary_dir = "" +; or /usr/local/bin/rhodecode_bin/vcs_bin +core.binary_dir = ; Custom exception store path, defaults to TMPDIR ; This is used to store exception from RhodeCode in shared directory diff --git a/configs/production.ini b/configs/production.ini --- a/configs/production.ini +++ b/configs/production.ini @@ -41,10 +41,10 @@ use = egg:rhodecode-vcsserver ; default locale used by VCS systems #locale = en_US.UTF-8 -; path to binaries for vcsserver, it should be set by the installer +; path to binaries (hg,git,svn) for vcsserver, it should be set by the installer ; at installation time, e.g /home/user/.rccontrol/vcsserver-1/profile/bin -; it can also be a path to nix-build output in case of development -core.binary_dir = "" +; or /usr/local/bin/rhodecode_bin/vcs_bin +core.binary_dir = ; Custom exception store path, defaults to TMPDIR ; This is used to store exception from RhodeCode in shared directory diff --git a/vcsserver/config/settings_maker.py b/vcsserver/config/settings_maker.py --- a/vcsserver/config/settings_maker.py +++ b/vcsserver/config/settings_maker.py @@ -28,6 +28,7 @@ from vcsserver.type_utils import str2boo log = logging.getLogger(__name__) + # skip keys, that are set here, so we don't double process those set_keys = { '__file__': '' @@ -51,6 +52,10 @@ class SettingsMaker: return int(input_val) @classmethod + def _float_func(cls, input_val): + return float(input_val) + + @classmethod def _list_func(cls, input_val, sep=','): return aslist(input_val, sep=sep) @@ -61,8 +66,17 @@ class SettingsMaker: return input_val @classmethod - def _float_func(cls, input_val): - return float(input_val) + def _string_no_quote_func(cls, input_val, lower=True): + """ + Special case string function that detects if value is set to empty quote string + e.g. + + core.binar_dir = "" + """ + + input_val = cls._string_func(input_val, lower=lower) + if input_val in ['""', "''"]: + return '' @classmethod def _dir_func(cls, input_val, ensure_dir=False, mode=0o755): @@ -148,10 +162,12 @@ class SettingsMaker: parser_func = { 'bool': self._bool_func, 'int': self._int_func, + 'float': self._float_func, 'list': self._list_func, 'list:newline': functools.partial(self._list_func, sep='/n'), 'list:spacesep': functools.partial(self._list_func, sep=' '), 'string': functools.partial(self._string_func, lower=lower), + 'string:noquote': functools.partial(self._string_no_quote_func, lower=lower), 'dir': self._dir_func, 'dir:ensured': functools.partial(self._dir_func, ensure_dir=True), 'file': self._file_path_func, diff --git a/vcsserver/http_main.py b/vcsserver/http_main.py --- a/vcsserver/http_main.py +++ b/vcsserver/http_main.py @@ -716,7 +716,7 @@ def sanitize_settings_and_apply_defaults settings_maker.make_setting('pyramid.default_locale_name', 'en') settings_maker.make_setting('locale', 'en_US.UTF-8') - settings_maker.make_setting('core.binary_dir', '/usr/local/bin/rhodecode_bin/vcs_bin') + settings_maker.make_setting('core.binary_dir', '/usr/local/bin/rhodecode_bin/vcs_bin', parser='string:noquote') temp_store = tempfile.gettempdir() default_cache_dir = os.path.join(temp_store, 'rc_cache')