Mercurial > kallithea
comparison rhodecode/model/repo.py @ 1507:7d687ed11929 beta
changed check_... functions from their stupid names to something less retarded :)
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 01 Oct 2011 21:51:28 +0300 |
parents | bb6ba7442293 |
children | bf263968da47 142a05597cba |
comparison
equal
deleted
inserted
replaced
1506:7865043e4ca9 | 1507:7d687ed11929 |
---|---|
299 :param repo_name: | 299 :param repo_name: |
300 :param alias: | 300 :param alias: |
301 :param parent_id: | 301 :param parent_id: |
302 :param clone_uri: | 302 :param clone_uri: |
303 """ | 303 """ |
304 from rhodecode.lib.utils import check_repo_fast | 304 from rhodecode.lib.utils import is_valid_repo |
305 | 305 |
306 if new_parent_id: | 306 if new_parent_id: |
307 paths = Group.get(new_parent_id).full_path.split(Group.url_sep()) | 307 paths = Group.get(new_parent_id).full_path.split(Group.url_sep()) |
308 new_parent_path = os.sep.join(paths) | 308 new_parent_path = os.sep.join(paths) |
309 else: | 309 else: |
310 new_parent_path = '' | 310 new_parent_path = '' |
311 | 311 |
312 repo_path = os.path.join(*map(lambda x:safe_str(x), | 312 repo_path = os.path.join(*map(lambda x:safe_str(x), |
313 [self.repos_path, new_parent_path, repo_name])) | 313 [self.repos_path, new_parent_path, repo_name])) |
314 | 314 |
315 if check_repo_fast(repo_path, self.repos_path) is False: | 315 if is_valid_repo(repo_path, self.repos_path) is False: |
316 log.info('creating repo %s in %s @ %s', repo_name, repo_path, | 316 log.info('creating repo %s in %s @ %s', repo_name, repo_path, |
317 clone_uri) | 317 clone_uri) |
318 backend = get_backend(alias) | 318 backend = get_backend(alias) |
319 | 319 |
320 backend(repo_path, create=True, src_url=clone_uri) | 320 backend(repo_path, create=True, src_url=clone_uri) |