Show More
@@ -579,6 +579,9 b' svn.proxy.location_root = /' | |||||
579 | ## Command to reload the mod dav svn configuration on change. |
|
579 | ## Command to reload the mod dav svn configuration on change. | |
580 | ## Example: `/etc/init.d/apache2 reload` |
|
580 | ## Example: `/etc/init.d/apache2 reload` | |
581 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
581 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
|
582 | ## If the timeout expires before the reload command finishes, the command will | |||
|
583 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |||
|
584 | #svn.proxy.reload_timeout = 10 | |||
582 |
|
585 | |||
583 |
|
586 | |||
584 | ################################ |
|
587 | ################################ |
@@ -550,6 +550,9 b' svn.proxy.location_root = /' | |||||
550 | ## Command to reload the mod dav svn configuration on change. |
|
550 | ## Command to reload the mod dav svn configuration on change. | |
551 | ## Example: `/etc/init.d/apache2 reload` |
|
551 | ## Example: `/etc/init.d/apache2 reload` | |
552 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload |
|
552 | #svn.proxy.reload_cmd = /etc/init.d/apache2 reload | |
|
553 | ## If the timeout expires before the reload command finishes, the command will | |||
|
554 | ## be killed. Setting it to zero means no timeout. Defaults to 10 seconds. | |||
|
555 | #svn.proxy.reload_timeout = 10 | |||
553 |
|
556 | |||
554 |
|
557 | |||
555 | ################################ |
|
558 | ################################ |
@@ -24,7 +24,8 b' import os' | |||||
24 | # Do not use `from rhodecode import events` here, it will be overridden by the |
|
24 | # Do not use `from rhodecode import events` here, it will be overridden by the | |
25 | # events module in this package due to pythons import mechanism. |
|
25 | # events module in this package due to pythons import mechanism. | |
26 | from rhodecode.events import RepoGroupEvent |
|
26 | from rhodecode.events import RepoGroupEvent | |
27 |
from rhodecode.config.middleware import |
|
27 | from rhodecode.config.middleware import ( | |
|
28 | _bool_setting, _string_setting, _int_setting) | |||
28 |
|
29 | |||
29 | from .events import ModDavSvnConfigChange |
|
30 | from .events import ModDavSvnConfigChange | |
30 | from .subscribers import generate_config_subscriber, AsyncSubprocessSubscriber |
|
31 | from .subscribers import generate_config_subscriber, AsyncSubprocessSubscriber | |
@@ -56,13 +57,17 b' def _sanitize_settings_and_apply_default' | |||||
56 | """ |
|
57 | """ | |
57 | Set defaults, convert to python types and validate settings. |
|
58 | Set defaults, convert to python types and validate settings. | |
58 | """ |
|
59 | """ | |
59 | # Convert bool settings from string to bool. |
|
|||
60 | _bool_setting(settings, config_keys.generate_config, 'false') |
|
60 | _bool_setting(settings, config_keys.generate_config, 'false') | |
61 | _bool_setting(settings, config_keys.list_parent_path, 'true') |
|
61 | _bool_setting(settings, config_keys.list_parent_path, 'true') | |
|
62 | _int_setting(settings, config_keys.reload_timeout, 10) | |||
62 | _string_setting(settings, config_keys.config_file_path, '', lower=False) |
|
63 | _string_setting(settings, config_keys.config_file_path, '', lower=False) | |
63 | _string_setting(settings, config_keys.location_root, '/', lower=False) |
|
64 | _string_setting(settings, config_keys.location_root, '/', lower=False) | |
64 | _string_setting(settings, config_keys.reload_command, '', lower=False) |
|
65 | _string_setting(settings, config_keys.reload_command, '', lower=False) | |
65 |
|
66 | |||
|
67 | # Convert negative timeout values to zero. | |||
|
68 | if settings[config_keys.reload_timeout] < 0: | |||
|
69 | settings[config_keys.reload_timeout] = 0 | |||
|
70 | ||||
66 | # Append path separator to location root. |
|
71 | # Append path separator to location root. | |
67 | settings[config_keys.location_root] = _append_path_sep( |
|
72 | settings[config_keys.location_root] = _append_path_sep( | |
68 | settings[config_keys.location_root]) |
|
73 | settings[config_keys.location_root]) |
@@ -26,3 +26,4 b" generate_config = 'svn.proxy.generate_co" | |||||
26 | list_parent_path = 'svn.proxy.list_parent_path' |
|
26 | list_parent_path = 'svn.proxy.list_parent_path' | |
27 | location_root = 'svn.proxy.location_root' |
|
27 | location_root = 'svn.proxy.location_root' | |
28 | reload_command = 'svn.proxy.reload_cmd' |
|
28 | reload_command = 'svn.proxy.reload_cmd' | |
|
29 | reload_timeout = 'svn.proxy.reload_timeout' |
General Comments 0
You need to be logged in to leave comments.
Login now