Merge pull request !2927 from rhodecode-enterprise-ce multi-branch
Changes from branch: Multi branch
This commit is contained in:
commit
515fc40de7
54 changed files with 472 additions and 241 deletions
|
|
@ -150,7 +150,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span class="help-block">${_('Patterns for identifying SVN branches and tags. For recursive search, use "*". Eg.: "/branches/*"')}</span>
|
||||
<span class="help-block">
|
||||
${_('Patterns for identifying SVN branches and tags.')}
|
||||
${_('Examples defaults')}:<br/>
|
||||
Branches: ${", ".join(c.svn_default_branches)}<br/>
|
||||
Tags: ${", ".join(c.svn_default_tags)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="field branch_patterns">
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@
|
|||
|
||||
var _html = '';
|
||||
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a> '
|
||||
.replace('__branch__', data.results[0].branch)
|
||||
.replace('__branch__', data.results[0].branches.join(","))
|
||||
.replace('__rev__', 'r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0, 6)))
|
||||
.replace('__title__', data.results[0].message)
|
||||
.replace('__url__', pyroutes.url('repo_commit', {
|
||||
|
|
@ -342,7 +342,7 @@
|
|||
}));
|
||||
_html += ' | ';
|
||||
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a> '
|
||||
.replace('__branch__', data.results[1].branch)
|
||||
.replace('__branch__', data.results[1].branches.join(","))
|
||||
.replace('__rev__', 'r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0, 6)))
|
||||
.replace('__title__', data.results[1].message)
|
||||
.replace('__url__', pyroutes.url('repo_commit', {
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
|
||||
var _html = '';
|
||||
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a>'
|
||||
.replace('__branch__', data.results[0].branch)
|
||||
.replace('__branch__', data.results[0].branches.join(","))
|
||||
.replace('__rev__', 'r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0, 6)))
|
||||
.replace('__title__', data.results[0].message)
|
||||
.replace('__url__', pyroutes.url('repo_commit', {
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
}));
|
||||
_html += ' | ';
|
||||
_html += '<a title="__title__" href="__url__"><span class="tag branchtag"><i class="icon-code-fork"></i>__branch__</span> __rev__</a>'
|
||||
.replace('__branch__', data.results[1].branch)
|
||||
.replace('__branch__', data.results[1].branches.join(","))
|
||||
.replace('__rev__', 'r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0, 6)))
|
||||
.replace('__title__', data.results[1].message)
|
||||
.replace('__url__', pyroutes.url('repo_commit', {
|
||||
|
|
|
|||
|
|
@ -104,11 +104,11 @@
|
|||
%endif
|
||||
|
||||
## branch
|
||||
%if commit.branch:
|
||||
<span class="tag branchtag" title="${h.tooltip(_('Branch %s') % commit.branch)}">
|
||||
<a href="${h.route_path('repo_commits',repo_name=c.repo_name,_query=dict(branch=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a>
|
||||
%for branch in commit.branches:
|
||||
<span class="tag branchtag" title="${h.tooltip(_('Branch %s') % branch)}">
|
||||
<a href="${h.route_path('repo_commits',repo_name=c.repo_name,_query=dict(branch=branch))}"><i class="icon-code-fork"></i>${h.shorter(branch)}</a>
|
||||
</span>
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
## bookmarks
|
||||
%if h.is_hg(c.rhodecode_repo):
|
||||
|
|
|
|||
|
|
@ -5,22 +5,6 @@
|
|||
fileTreeRefs = {}
|
||||
</script>
|
||||
|
||||
% if h.is_svn(c.rhodecode_repo):
|
||||
## since SVN doesn't have an commit<->refs association, we simply inject it
|
||||
## based on our at_rev marker
|
||||
% if at_rev and at_rev.startswith('branches/'):
|
||||
<%
|
||||
commit.branch = at_rev
|
||||
%>
|
||||
% endif
|
||||
% if at_rev and at_rev.startswith('tags/'):
|
||||
<%
|
||||
commit.tags.append(at_rev)
|
||||
%>
|
||||
% endif
|
||||
|
||||
% endif
|
||||
|
||||
%if commit.merge:
|
||||
<span class="mergetag tag">
|
||||
<i class="icon-merge">${_('merge')}</i>
|
||||
|
|
@ -47,13 +31,13 @@
|
|||
</script>
|
||||
%endfor
|
||||
|
||||
%if commit.branch:
|
||||
<span class="branchtag tag" title="${h.tooltip(_('Branch %s') % commit.branch)}">
|
||||
<a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id,_query=dict(at=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a>
|
||||
%for branch in commit.branches:
|
||||
<span class="branchtag tag" title="${h.tooltip(_('Branch %s') % branch)}">
|
||||
<a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id,_query=dict(at=branch))}"><i class="icon-code-fork"></i>${h.shorter(branch)}</a>
|
||||
</span>
|
||||
<script>
|
||||
fileTreeRefs["${commit.branch}"] = {raw_id: "${commit.raw_id}", type:"branch", text: "${commit.branch}"};
|
||||
fileTreeRefs["${branch}"] = {raw_id: "${commit.raw_id}", type:"branch", text: "${branch}"};
|
||||
</script>
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
</%def>
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
<div class="box">
|
||||
|
||||
<div class="edit-file-title">
|
||||
<span class="title-heading">${_('Add new file')} @ <code>${h.show_id(c.commit)}</code></span>
|
||||
% if c.commit.branch:
|
||||
<span class="title-heading">${_('Add new file')}</code></span>
|
||||
% for branch in c.commit.branches:
|
||||
<span class="tag branchtag">
|
||||
<i class="icon-branch"></i> ${c.commit.branch}
|
||||
<i class="icon-branch"></i> ${branch}
|
||||
</span>
|
||||
% endif
|
||||
% endfor
|
||||
</div>
|
||||
|
||||
${h.secure_form(h.route_path('repo_files_create_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@
|
|||
<div class="box">
|
||||
|
||||
<div class="edit-file-title">
|
||||
<span class="title-heading">${_('Delete file')} @ <code>${h.show_id(c.commit)}</code></span>
|
||||
% if c.commit.branch:
|
||||
<span class="title-heading">${_('Deleting file')}</span>
|
||||
% for branch in c.commit.branches:
|
||||
<span class="tag branchtag">
|
||||
<i class="icon-branch"></i> ${c.commit.branch}
|
||||
<i class="icon-branch"></i> ${branch}
|
||||
</span>
|
||||
% endif
|
||||
% endfor
|
||||
</div>
|
||||
|
||||
${h.secure_form(h.route_path('repo_files_delete_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)}
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
<div class="box">
|
||||
|
||||
<div class="edit-file-title">
|
||||
<span class="title-heading">${_('Edit file')} @ <code>${h.show_id(c.commit)}</code></span>
|
||||
% if c.commit.branch:
|
||||
<span class="title-heading">${_('Editing file')}</code></span>
|
||||
% for branch in c.commit.branches:
|
||||
<span class="tag branchtag">
|
||||
<i class="icon-branch"></i> ${c.commit.branch}
|
||||
<i class="icon-branch"></i> ${branch}
|
||||
</span>
|
||||
% endif
|
||||
% endfor
|
||||
</div>
|
||||
|
||||
${h.secure_form(h.route_path('repo_files_update_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</a>
|
||||
% else:
|
||||
<a class="btn btn-default" href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}">
|
||||
${_('Download file')}
|
||||
${_('Download')}
|
||||
</a>
|
||||
% endif
|
||||
|
||||
|
|
@ -40,9 +40,8 @@
|
|||
${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _query=query),class_="btn btn-danger")}
|
||||
% else:
|
||||
<a class="btn btn-default" href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _query=query)}">
|
||||
${_('Edit on branch: ')}<code>${c.branch_name}</code>
|
||||
${_('Edit')}
|
||||
</a>
|
||||
|
||||
<a class="btn btn-danger" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _query=query)}">
|
||||
${_('Delete')}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@
|
|||
## Template for uploads
|
||||
<div class="edit-file-title">
|
||||
% if c.replace_binary:
|
||||
<span class="title-heading">${_('Replace content of')} <b>${c.f_path}</b> @ <code>${h.show_id(c.commit)}</code></span>
|
||||
<span class="title-heading">${_('Replace content of')} <b>${c.f_path}</b> </code></span>
|
||||
% else:
|
||||
<span class="title-heading">${_('Upload new file')} @ <code>${h.show_id(c.commit)}</code></span>
|
||||
<span class="title-heading">${_('Upload new file')} </span>
|
||||
% endif
|
||||
% if c.commit.branch:
|
||||
% for branch in c.commit.branches:
|
||||
<span class="tag branchtag">
|
||||
<i class="icon-branch"></i> ${c.commit.branch}
|
||||
<i class="icon-branch"></i> ${branch}
|
||||
</span>
|
||||
% endif
|
||||
% endfor
|
||||
</div>
|
||||
|
||||
% if not c.replace_binary:
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@
|
|||
%endfor
|
||||
|
||||
## branch
|
||||
%if cs.branch:
|
||||
<span class="branchtag tag" title="${h.tooltip(_('Branch %s') % cs.branch)}">
|
||||
<a href="${h.route_path('repo_commits',repo_name=c.repo_name,_query=dict(branch=cs.branch))}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a>
|
||||
%for branch in cs.branches:
|
||||
<span class="branchtag tag" title="${h.tooltip(_('Branch %s') % branch)}">
|
||||
<a href="${h.route_path('repo_commits',repo_name=c.repo_name,_query=dict(branch=branch))}"><i class="icon-code-fork"></i>${h.shorter(branch)}</a>
|
||||
</span>
|
||||
%endif
|
||||
%endfor
|
||||
</div>
|
||||
</td>
|
||||
<td class="td-comments">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue