Show More
@@ -961,11 +961,13 b' class GitRemote(RemoteBase):' | |||
|
961 | 961 | @reraise_safe_exceptions |
|
962 | 962 | def init(self, wire): |
|
963 | 963 | repo_path = safe_str(wire['path']) |
|
964 | os.makedirs(repo_path, mode=0o755) | |
|
964 | 965 | pygit2.init_repository(repo_path, bare=False) |
|
965 | 966 | |
|
966 | 967 | @reraise_safe_exceptions |
|
967 | 968 | def init_bare(self, wire): |
|
968 | 969 | repo_path = safe_str(wire['path']) |
|
970 | os.makedirs(repo_path, mode=0o755) | |
|
969 | 971 | pygit2.init_repository(repo_path, bare=True) |
|
970 | 972 | |
|
971 | 973 | @reraise_safe_exceptions |
@@ -189,13 +189,21 b' class SvnRemote(RemoteBase):' | |||
|
189 | 189 | if not os.path.isfile(os.path.join(path, 'format')): |
|
190 | 190 | return False |
|
191 | 191 | |
|
192 | try: | |
|
193 | svn.repos.open(path) | |
|
194 | except svn.core.SubversionException: | |
|
195 | tb = traceback.format_exc() | |
|
196 | log.debug("Invalid Subversion path `%s`, tb: %s", path, tb) | |
|
197 | return False | |
|
198 | return True | |
|
192 | cache_on, context_uid, repo_id = self._cache_on(wire) | |
|
193 | region = self._region(wire) | |
|
194 | ||
|
195 | @region.conditional_cache_on_arguments(condition=cache_on) | |
|
196 | def _assert_correct_path(_context_uid, _repo_id, fast_check): | |
|
197 | ||
|
198 | try: | |
|
199 | svn.repos.open(path) | |
|
200 | except svn.core.SubversionException: | |
|
201 | tb = traceback.format_exc() | |
|
202 | log.debug("Invalid Subversion path `%s`, tb: %s", path, tb) | |
|
203 | return False | |
|
204 | return True | |
|
205 | ||
|
206 | return _assert_correct_path(context_uid, repo_id, True) | |
|
199 | 207 | |
|
200 | 208 | @reraise_safe_exceptions |
|
201 | 209 | def verify(self, wire,): |
General Comments 0
You need to be logged in to leave comments.
Login now