Show More
@@ -1,44 +1,42 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2016 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2016 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | import logging |
|
21 | import logging | |
22 |
|
22 | |||
23 |
from rhodecode. |
|
23 | from rhodecode.lib.utils import get_rhodecode_base_path | |
24 | from .utils import generate_mod_dav_svn_config |
|
24 | from .utils import generate_mod_dav_svn_config | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | log = logging.getLogger(__name__) |
|
27 | log = logging.getLogger(__name__) | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | def generate_config_subscriber(event): |
|
30 | def generate_config_subscriber(event): | |
31 | """ |
|
31 | """ | |
32 | Subscriber to the `rhodcode.events.RepoGroupEvent`. This triggers the |
|
32 | Subscriber to the `rhodcode.events.RepoGroupEvent`. This triggers the | |
33 | automatic generation of mod_dav_svn config file on repository group |
|
33 | automatic generation of mod_dav_svn config file on repository group | |
34 | changes. |
|
34 | changes. | |
35 | """ |
|
35 | """ | |
36 | try: |
|
36 | try: | |
37 | parent_path_root = SettingsModel().get_ui_by_section_and_key( |
|
|||
38 | 'paths', '/').ui_value |
|
|||
39 | generate_mod_dav_svn_config( |
|
37 | generate_mod_dav_svn_config( | |
40 | settings=event.request.registry.settings, |
|
38 | settings=event.request.registry.settings, | |
41 |
parent_path_root= |
|
39 | parent_path_root=get_rhodecode_base_path()) | |
42 | except Exception: |
|
40 | except Exception: | |
43 | log.exception( |
|
41 | log.exception( | |
44 | 'Exception while generating subversion mod_dav_svn configuration.') |
|
42 | 'Exception while generating subversion mod_dav_svn configuration.') |
General Comments 0
You need to be logged in to leave comments.
Login now