diffs: support mercurial copy in diffs details.
This commit is contained in:
parent
d0f96b7b7b
commit
feb25a9cb8
2 changed files with 16 additions and 4 deletions
|
|
@ -820,7 +820,6 @@ input.filediff-collapse-state {
|
|||
.pill {
|
||||
&[op="name"] {
|
||||
background: none;
|
||||
color: @grey2;
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
|
@ -840,6 +839,10 @@ input.filediff-collapse-state {
|
|||
background: @color4;
|
||||
color: white;
|
||||
}
|
||||
&[op="copied"] {
|
||||
background: @color4;
|
||||
color: white;
|
||||
}
|
||||
&[op="mode"] {
|
||||
background: @grey3;
|
||||
color: white;
|
||||
|
|
|
|||
|
|
@ -324,13 +324,17 @@ collapse_all = len(diffset.files) > collapse_when_files_over
|
|||
<%
|
||||
stats = filediff['patch']['stats']
|
||||
from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
|
||||
MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE
|
||||
MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE
|
||||
%>
|
||||
<span class="pill">
|
||||
%if filediff.source_file_path and filediff.target_file_path:
|
||||
%if filediff.source_file_path != filediff.target_file_path:
|
||||
## file was renamed
|
||||
<strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del>
|
||||
## file was renamed, or copied
|
||||
%if RENAMED_FILENODE in stats['ops']:
|
||||
<strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del>
|
||||
%elif COPIED_FILENODE in stats['ops']:
|
||||
<strong>${filediff.target_file_path}</strong> ⬅ ${filediff.source_file_path}
|
||||
%endif
|
||||
%else:
|
||||
## file was modified
|
||||
<strong>${filediff.source_file_path}</strong>
|
||||
|
|
@ -349,10 +353,15 @@ from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
|
|||
%if filediff.patch['is_limited_diff']:
|
||||
<span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
|
||||
%endif
|
||||
|
||||
%if RENAMED_FILENODE in stats['ops']:
|
||||
<span class="pill" op="renamed">renamed</span>
|
||||
%endif
|
||||
|
||||
%if COPIED_FILENODE in stats['ops']:
|
||||
<span class="pill" op="copied">copied</span>
|
||||
%endif
|
||||
|
||||
%if NEW_FILENODE in stats['ops']:
|
||||
<span class="pill" op="created">created</span>
|
||||
%if filediff['target_mode'].startswith('120'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue