##// END OF EJS Templates
svn: allow to specify any svn compatible version string not only hardcoded values....
ergo -
r844:c77576f0 default
parent child Browse files
Show More
@@ -41,16 +41,6 b' from vcsserver.vcs_base import RemoteBas'
41 41 log = logging.getLogger(__name__)
42 42
43 43
44 # Set of svn compatible version flags.
45 # Compare with subversion/svnadmin/svnadmin.c
46 svn_compatible_versions = {
47 'pre-1.4-compatible',
48 'pre-1.5-compatible',
49 'pre-1.6-compatible',
50 'pre-1.8-compatible',
51 'pre-1.9-compatible'
52 }
53
54 44 svn_compatible_versions_map = {
55 45 'pre-1.4-compatible': '1.3',
56 46 'pre-1.5-compatible': '1.4',
@@ -59,6 +49,8 b' svn_compatible_versions_map = {'
59 49 'pre-1.9-compatible': '1.8',
60 50 }
61 51
52 current_compatible_version = '1.12'
53
62 54
63 55 def reraise_safe_exceptions(func):
64 56 """Decorator for converting svn exceptions to something neutral."""
@@ -79,13 +71,13 b' class SubversionFactory(RepoFactory):'
79 71 def _create_repo(self, wire, create, compatible_version):
80 72 path = svn.core.svn_path_canonicalize(wire['path'])
81 73 if create:
82 fs_config = {'compatible-version': '1.9'}
74 fs_config = {'compatible-version': current_compatible_version}
83 75 if compatible_version:
84 if compatible_version not in svn_compatible_versions:
85 raise Exception('Unknown SVN compatible version "{}"'
86 .format(compatible_version))
87 fs_config['compatible-version'] = \
88 svn_compatible_versions_map[compatible_version]
76
77 compatible_version_string = \
78 svn_compatible_versions_map.get(compatible_version) \
79 or compatible_version
80 fs_config['compatible-version'] = compatible_version_string
89 81
90 82 log.debug('Create SVN repo with config "%s"', fs_config)
91 83 repo = svn.repos.create(path, "", "", None, fs_config)
General Comments 0
You need to be logged in to leave comments. Login now