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