Mercurial > kallithea
diff rhodecode/lib/celerylib/tasks.py @ 2825:f7a52d548fd0
merge with beta
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Sep 2012 23:20:33 +0200 |
parents | 63e58ef80ef1 25b10f9d23b4 |
children | a5f0bc867edc |
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/tasks.py Mon Sep 03 22:22:58 2012 +0200 +++ b/rhodecode/lib/celerylib/tasks.py Fri Sep 07 23:20:33 2012 +0200 @@ -400,9 +400,19 @@ log.info('creating fork of %s as %s', source_repo_path, destination_fork_path) backend = get_backend(repo_type) - backend(safe_str(destination_fork_path), create=True, - src_url=safe_str(source_repo_path), - update_after_clone=update_after_clone) + + if repo_type == 'git': + backend(safe_str(destination_fork_path), create=True, + src_url=safe_str(source_repo_path), + update_after_clone=update_after_clone, + bare=True) + elif repo_type == 'hg': + backend(safe_str(destination_fork_path), create=True, + src_url=safe_str(source_repo_path), + update_after_clone=update_after_clone) + else: + raise Exception('Unknown backend type %s' % repo_type) + log_create_repository(fork_repo.get_dict(), created_by=cur_user.username) action_logger(cur_user, 'user_forked_repo:%s' % fork_name,