Show More
@@ -400,9 +400,19 b' def create_repo_fork(form_data, cur_user' | |||||
400 | log.info('creating fork of %s as %s', source_repo_path, |
|
400 | log.info('creating fork of %s as %s', source_repo_path, | |
401 | destination_fork_path) |
|
401 | destination_fork_path) | |
402 | backend = get_backend(repo_type) |
|
402 | backend = get_backend(repo_type) | |
|
403 | ||||
|
404 | if repo_type == 'git': | |||
403 | backend(safe_str(destination_fork_path), create=True, |
|
405 | backend(safe_str(destination_fork_path), create=True, | |
404 | src_url=safe_str(source_repo_path), |
|
406 | src_url=safe_str(source_repo_path), | |
405 |
update_after_clone=update_after_clone, |
|
407 | update_after_clone=update_after_clone, | |
|
408 | bare=True) | |||
|
409 | elif repo_type == 'hg': | |||
|
410 | backend(safe_str(destination_fork_path), create=True, | |||
|
411 | src_url=safe_str(source_repo_path), | |||
|
412 | update_after_clone=update_after_clone) | |||
|
413 | else: | |||
|
414 | raise Exception('Unknown backend type %s' % repo_type) | |||
|
415 | ||||
406 | log_create_repository(fork_repo.get_dict(), created_by=cur_user.username) |
|
416 | log_create_repository(fork_repo.get_dict(), created_by=cur_user.username) | |
407 |
|
417 | |||
408 | action_logger(cur_user, 'user_forked_repo:%s' % fork_name, |
|
418 | action_logger(cur_user, 'user_forked_repo:%s' % fork_name, |
General Comments 0
You need to be logged in to leave comments.
Login now