Show More
@@ -372,6 +372,7 b' def create_repo_fork(form_data, cur_user' | |||||
372 | alias = form_data['repo_type'] |
|
372 | alias = form_data['repo_type'] | |
373 | org_repo_name = form_data['org_path'] |
|
373 | org_repo_name = form_data['org_path'] | |
374 | fork_name = form_data['repo_name_full'] |
|
374 | fork_name = form_data['repo_name_full'] | |
|
375 | update_after_clone = form_data['update_after_clone'] | |||
375 | source_repo_path = os.path.join(base_path, org_repo_name) |
|
376 | source_repo_path = os.path.join(base_path, org_repo_name) | |
376 | destination_fork_path = os.path.join(base_path, fork_name) |
|
377 | destination_fork_path = os.path.join(base_path, fork_name) | |
377 |
|
378 | |||
@@ -379,7 +380,8 b' def create_repo_fork(form_data, cur_user' | |||||
379 | destination_fork_path) |
|
380 | destination_fork_path) | |
380 | backend = get_backend(alias) |
|
381 | backend = get_backend(alias) | |
381 | backend(safe_str(destination_fork_path), create=True, |
|
382 | backend(safe_str(destination_fork_path), create=True, | |
382 |
src_url=safe_str(source_repo_path) |
|
383 | src_url=safe_str(source_repo_path), | |
|
384 | update_after_clone=update_after_clone) | |||
383 | action_logger(cur_user, 'user_forked_repo:%s' % fork_name, |
|
385 | action_logger(cur_user, 'user_forked_repo:%s' % fork_name, | |
384 | org_repo_name, '', Session) |
|
386 | org_repo_name, '', Session) | |
385 | # finally commit at latest possible stage |
|
387 | # finally commit at latest possible stage |
@@ -603,6 +603,7 b' def RepoForkForm(edit=False, old_data={}' | |||||
603 | description = UnicodeString(strip=True, min=1, not_empty=True) |
|
603 | description = UnicodeString(strip=True, min=1, not_empty=True) | |
604 | private = StringBoolean(if_missing=False) |
|
604 | private = StringBoolean(if_missing=False) | |
605 | copy_permissions = StringBoolean(if_missing=False) |
|
605 | copy_permissions = StringBoolean(if_missing=False) | |
|
606 | update_after_clone = StringBoolean(if_missing=False) | |||
606 | fork_parent_id = UnicodeString() |
|
607 | fork_parent_id = UnicodeString() | |
607 | chained_validators = [ValidForkName(edit, old_data)] |
|
608 | chained_validators = [ValidForkName(edit, old_data)] | |
608 |
|
609 |
@@ -67,7 +67,15 b'' | |||||
67 | <div class="checkboxes"> |
|
67 | <div class="checkboxes"> | |
68 | ${h.checkbox('copy_permissions',value="True")} |
|
68 | ${h.checkbox('copy_permissions',value="True")} | |
69 | </div> |
|
69 | </div> | |
70 |
</div> |
|
70 | </div> | |
|
71 | <div class="field"> | |||
|
72 | <div class="label label-checkbox"> | |||
|
73 | <label for="private">${_('Update after clone')}:</label> | |||
|
74 | </div> | |||
|
75 | <div class="checkboxes"> | |||
|
76 | ${h.checkbox('update_after_clone',value="True")} | |||
|
77 | </div> | |||
|
78 | </div> | |||
71 | <div class="buttons"> |
|
79 | <div class="buttons"> | |
72 | ${h.submit('',_('fork this repository'),class_="ui-button")} |
|
80 | ${h.submit('',_('fork this repository'),class_="ui-button")} | |
73 | </div> |
|
81 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now