Show More
@@ -17,6 +17,7 b'' | |||
|
17 | 17 | |
|
18 | 18 | from __future__ import absolute_import |
|
19 | 19 | |
|
20 | import os | |
|
20 | 21 | from urllib2 import URLError |
|
21 | 22 | import logging |
|
22 | 23 | import posixpath as vcspath |
@@ -89,6 +90,8 b' class SubversionFactory(RepoFactory):' | |||
|
89 | 90 | repo = svn.repos.create(path, "", "", None, fs_config) |
|
90 | 91 | else: |
|
91 | 92 | repo = svn.repos.open(path) |
|
93 | ||
|
94 | log.debug('Got SVN object: %s', repo) | |
|
92 | 95 | return repo |
|
93 | 96 | |
|
94 | 97 | def repo(self, wire, create=False, compatible_version=None): |
@@ -138,6 +141,14 b' class SvnRemote(object):' | |||
|
138 | 141 | return True |
|
139 | 142 | |
|
140 | 143 | def is_path_valid_repository(self, wire, path): |
|
144 | ||
|
145 | # NOTE(marcink): short circuit the check for SVN repo | |
|
146 | # the repos.open might be expensive to check, but we have one cheap | |
|
147 | # pre condition that we can use, to check for 'format' file | |
|
148 | ||
|
149 | if not os.path.isfile(os.path.join(path, 'format')): | |
|
150 | return False | |
|
151 | ||
|
141 | 152 | try: |
|
142 | 153 | svn.repos.open(path) |
|
143 | 154 | except svn.core.SubversionException: |
General Comments 0
You need to be logged in to leave comments.
Login now