Show More
@@ -50,6 +50,7 b' from rhodecode.lib.compat import json, O' | |||
|
50 | 50 | from rhodecode.lib.hooks import log_create_repository |
|
51 | 51 | |
|
52 | 52 | from rhodecode.model.db import Statistics, Repository, User |
|
53 | from rhodecode.model.scm import ScmModel | |
|
53 | 54 | |
|
54 | 55 | |
|
55 | 56 | add_cache(config) |
@@ -402,17 +403,19 b' def create_repo_fork(form_data, cur_user' | |||
|
402 | 403 | backend = get_backend(repo_type) |
|
403 | 404 | |
|
404 | 405 | if repo_type == 'git': |
|
405 | backend(safe_str(destination_fork_path), create=True, | |
|
406 | r = backend(safe_str(destination_fork_path), create=True, | |
|
406 | 407 | src_url=safe_str(source_repo_path), |
|
407 | 408 | update_after_clone=update_after_clone, |
|
408 | 409 | bare=True) |
|
409 | 410 | elif repo_type == 'hg': |
|
410 | backend(safe_str(destination_fork_path), create=True, | |
|
411 | r = backend(safe_str(destination_fork_path), create=True, | |
|
411 | 412 | src_url=safe_str(source_repo_path), |
|
412 | 413 | update_after_clone=update_after_clone) |
|
413 | 414 | else: |
|
414 | 415 | raise Exception('Unknown backend type %s' % repo_type) |
|
415 | 416 | |
|
417 | # add rhodecode hook into this repo | |
|
418 | ScmModel().install_git_hook(repo=r) | |
|
416 | 419 | log_create_repository(fork_repo.get_dict(), created_by=cur_user.username) |
|
417 | 420 | |
|
418 | 421 | action_logger(cur_user, 'user_forked_repo:%s' % fork_name, |
General Comments 0
You need to be logged in to leave comments.
Login now