Show More
@@ -47,8 +47,17 b' svn_compatible_versions = set([' | |||||
47 | 'pre-1.5-compatible', |
|
47 | 'pre-1.5-compatible', | |
48 | 'pre-1.6-compatible', |
|
48 | 'pre-1.6-compatible', | |
49 | 'pre-1.8-compatible', |
|
49 | 'pre-1.8-compatible', | |
|
50 | 'pre-1.9-compatible', | |||
50 | ]) |
|
51 | ]) | |
51 |
|
52 | |||
|
53 | svn_compatible_versions_map = { | |||
|
54 | 'pre-1.4-compatible': '1.3', | |||
|
55 | 'pre-1.5-compatible': '1.4', | |||
|
56 | 'pre-1.6-compatible': '1.5', | |||
|
57 | 'pre-1.8-compatible': '1.7', | |||
|
58 | 'pre-1.9-compatible': '1.8', | |||
|
59 | } | |||
|
60 | ||||
52 |
|
61 | |||
53 | def reraise_safe_exceptions(func): |
|
62 | def reraise_safe_exceptions(func): | |
54 | """Decorator for converting svn exceptions to something neutral.""" |
|
63 | """Decorator for converting svn exceptions to something neutral.""" | |
@@ -68,14 +77,15 b' class SubversionFactory(RepoFactory):' | |||||
68 | def _create_repo(self, wire, create, compatible_version): |
|
77 | def _create_repo(self, wire, create, compatible_version): | |
69 | path = svn.core.svn_path_canonicalize(wire['path']) |
|
78 | path = svn.core.svn_path_canonicalize(wire['path']) | |
70 | if create: |
|
79 | if create: | |
71 | fs_config = {} |
|
80 | fs_config = {'compatible-version': '1.9'} | |
72 | if compatible_version: |
|
81 | if compatible_version: | |
73 | if compatible_version not in svn_compatible_versions: |
|
82 | if compatible_version not in svn_compatible_versions: | |
74 | raise Exception('Unknown SVN compatible version "{}"' |
|
83 | raise Exception('Unknown SVN compatible version "{}"' | |
75 | .format(compatible_version)) |
|
84 | .format(compatible_version)) | |
76 | log.debug('Create SVN repo with compatible version "%s"', |
|
85 | fs_config['compatible-version'] = \ | |
77 |
|
|
86 | svn_compatible_versions_map[compatible_version] | |
78 | fs_config[compatible_version] = '1' |
|
87 | ||
|
88 | log.debug('Create SVN repo with config "%s"', fs_config) | |||
79 | repo = svn.repos.create(path, "", "", None, fs_config) |
|
89 | repo = svn.repos.create(path, "", "", None, fs_config) | |
80 | else: |
|
90 | else: | |
81 | repo = svn.repos.open(path) |
|
91 | repo = svn.repos.open(path) | |
@@ -88,7 +98,6 b' class SubversionFactory(RepoFactory):' | |||||
88 | return self._repo(wire, create_new_repo) |
|
98 | return self._repo(wire, create_new_repo) | |
89 |
|
99 | |||
90 |
|
100 | |||
91 |
|
||||
92 | NODE_TYPE_MAPPING = { |
|
101 | NODE_TYPE_MAPPING = { | |
93 | svn.core.svn_node_file: 'file', |
|
102 | svn.core.svn_node_file: 'file', | |
94 | svn.core.svn_node_dir: 'dir', |
|
103 | svn.core.svn_node_dir: 'dir', |
General Comments 0
You need to be logged in to leave comments.
Login now