Changeset - 40c4f7351574
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2011-11-30 22:11:30
marcin@python-works.com
added option to do a checkout after cloning a repository
3 files changed with 13 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -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
rhodecode/model/forms.py
Show inline comments
 
@@ -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)]
 

	
rhodecode/templates/forks/fork.html
Show inline comments
 
@@ -67,7 +67,15 @@
 
                <div class="checkboxes">
 
                    ${h.checkbox('copy_permissions',value="True")}
 
                </div>
 
             </div>             
 
             </div>      
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="private">${_('Update after clone')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('update_after_clone',value="True")}
 
                </div>
 
             </div>                       
 
	        <div class="buttons">
 
	          ${h.submit('',_('fork this repository'),class_="ui-button")}
 
	        </div>                                                          
0 comments (0 inline, 0 general)