diff --git a/rhodecode/lib/celerylib/tasks.py b/rhodecode/lib/celerylib/tasks.py --- a/rhodecode/lib/celerylib/tasks.py +++ b/rhodecode/lib/celerylib/tasks.py @@ -372,6 +372,7 @@ def create_repo_fork(form_data, cur_user alias = form_data['repo_type'] org_repo_name = form_data['org_path'] fork_name = form_data['repo_name_full'] + update_after_clone = form_data['update_after_clone'] source_repo_path = os.path.join(base_path, org_repo_name) destination_fork_path = os.path.join(base_path, fork_name) @@ -379,7 +380,8 @@ def create_repo_fork(form_data, cur_user destination_fork_path) backend = get_backend(alias) backend(safe_str(destination_fork_path), create=True, - src_url=safe_str(source_repo_path)) + src_url=safe_str(source_repo_path), + update_after_clone=update_after_clone) action_logger(cur_user, 'user_forked_repo:%s' % fork_name, org_repo_name, '', Session) # finally commit at latest possible stage diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -603,6 +603,7 @@ def RepoForkForm(edit=False, old_data={} description = UnicodeString(strip=True, min=1, not_empty=True) private = StringBoolean(if_missing=False) copy_permissions = StringBoolean(if_missing=False) + update_after_clone = StringBoolean(if_missing=False) fork_parent_id = UnicodeString() chained_validators = [ValidForkName(edit, old_data)] diff --git a/rhodecode/templates/forks/fork.html b/rhodecode/templates/forks/fork.html --- a/rhodecode/templates/forks/fork.html +++ b/rhodecode/templates/forks/fork.html @@ -67,7 +67,15 @@
${h.checkbox('copy_permissions',value="True")}
- + +
+
+ +
+
+ ${h.checkbox('update_after_clone',value="True")} +
+
${h.submit('',_('fork this repository'),class_="ui-button")}