Show More
@@ -961,11 +961,13 b' class GitRemote(RemoteBase):' | |||||
961 | @reraise_safe_exceptions |
|
961 | @reraise_safe_exceptions | |
962 | def init(self, wire): |
|
962 | def init(self, wire): | |
963 | repo_path = safe_str(wire['path']) |
|
963 | repo_path = safe_str(wire['path']) | |
|
964 | os.makedirs(repo_path, mode=0o755) | |||
964 | pygit2.init_repository(repo_path, bare=False) |
|
965 | pygit2.init_repository(repo_path, bare=False) | |
965 |
|
966 | |||
966 | @reraise_safe_exceptions |
|
967 | @reraise_safe_exceptions | |
967 | def init_bare(self, wire): |
|
968 | def init_bare(self, wire): | |
968 | repo_path = safe_str(wire['path']) |
|
969 | repo_path = safe_str(wire['path']) | |
|
970 | os.makedirs(repo_path, mode=0o755) | |||
969 | pygit2.init_repository(repo_path, bare=True) |
|
971 | pygit2.init_repository(repo_path, bare=True) | |
970 |
|
972 | |||
971 | @reraise_safe_exceptions |
|
973 | @reraise_safe_exceptions |
@@ -189,6 +189,12 b' class SvnRemote(RemoteBase):' | |||||
189 | if not os.path.isfile(os.path.join(path, 'format')): |
|
189 | if not os.path.isfile(os.path.join(path, 'format')): | |
190 | return False |
|
190 | return False | |
191 |
|
191 | |||
|
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 | ||||
192 | try: |
|
198 | try: | |
193 | svn.repos.open(path) |
|
199 | svn.repos.open(path) | |
194 | except svn.core.SubversionException: |
|
200 | except svn.core.SubversionException: | |
@@ -197,6 +203,8 b' class SvnRemote(RemoteBase):' | |||||
197 | return False |
|
203 | return False | |
198 | return True |
|
204 | return True | |
199 |
|
205 | |||
|
206 | return _assert_correct_path(context_uid, repo_id, True) | |||
|
207 | ||||
200 | @reraise_safe_exceptions |
|
208 | @reraise_safe_exceptions | |
201 | def verify(self, wire,): |
|
209 | def verify(self, wire,): | |
202 | repo_path = wire['path'] |
|
210 | repo_path = wire['path'] |
General Comments 0
You need to be logged in to leave comments.
Login now