diff --git a/kallithea/lib/diffs.py b/kallithea/lib/diffs.py
--- a/kallithea/lib/diffs.py
+++ b/kallithea/lib/diffs.py
@@ -401,7 +401,7 @@ class DiffProcessor(object):
# RENAME
if (head['rename_from'] and head['rename_to']
and head['rename_from'] != head['rename_to']):
- op = 'M'
+ op = 'R'
stats['binary'] = True
stats['ops'][RENAMED_FILENODE] = ('file renamed from %s to %s'
% (head['rename_from'], head['rename_to']))
diff --git a/kallithea/public/css/contextbar.css b/kallithea/public/css/contextbar.css
--- a/kallithea/public/css/contextbar.css
+++ b/kallithea/public/css/contextbar.css
@@ -46,6 +46,12 @@ i[class^='icon-'] {
color: #6cc644;
}
+.icon-diff-R:before {
+ font-family: 'kallithea';
+ content: '\e81f';
+ color: #677a85;
+}
+
#content #context-bar {
position: relative;
overflow: visible;
diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css
--- a/kallithea/public/css/style.css
+++ b/kallithea/public/css/style.css
@@ -2470,6 +2470,13 @@ BIN_FILENODE = 6
text-align: left;
}
+.cs_files .cs_renamed,
+.cs_files .cs_R {
+ height: 16px;
+ margin-top: 7px;
+ text-align: left;
+}
+
.table {
position: relative;
}
diff --git a/kallithea/templates/changeset/diff_block.html b/kallithea/templates/changeset/diff_block.html
--- a/kallithea/templates/changeset/diff_block.html
+++ b/kallithea/templates/changeset/diff_block.html
@@ -86,6 +86,11 @@
%elif op == 'D':
${_('Deleted')}
${h.short_id(c.a_ref_name) if c.a_ref_type=='rev' else c.a_ref_name}
+ %elif op == 'R':
+ ${_('Renamed')}
+ ${h.short_id(c.a_ref_name) if c.a_ref_type=='rev' else c.a_ref_name}
+
+ ${h.short_id(c.cs_ref_name) if c.cs_ref_type=='rev' else c.cs_ref_name}
%else:
${op}???
%endif
diff --git a/kallithea/tests/models/test_diff_parsers.py b/kallithea/tests/models/test_diff_parsers.py
--- a/kallithea/tests/models/test_diff_parsers.py
+++ b/kallithea/tests/models/test_diff_parsers.py
@@ -26,21 +26,19 @@ DIFF_FIXTURES = {
],
'hg_diff_mod_single_file_and_rename_and_chmod.diff': [
- ('README', 'M',
+ ('README', 'R',
{'added': 3,
'deleted': 0,
'binary': False,
- 'ops': {MOD_FILENODE: 'modified file',
- RENAMED_FILENODE: 'file renamed from README.rst to README',
+ 'ops': {RENAMED_FILENODE: 'file renamed from README.rst to README',
CHMOD_FILENODE: 'modified file chmod 100755 => 100644'}}),
],
'hg_diff_mod_file_and_rename.diff': [
- ('README.rst', 'M',
+ ('README.rst', 'R',
{'added': 3,
'deleted': 0,
'binary': False,
- 'ops': {MOD_FILENODE: 'modified file',
- RENAMED_FILENODE: 'file renamed from README to README.rst'}}),
+ 'ops': {RENAMED_FILENODE: 'file renamed from README to README.rst'}}),
],
'hg_diff_del_single_binary_file.diff': [
('US Warszawa.jpg', 'D',
@@ -66,14 +64,14 @@ DIFF_FIXTURES = {
'ops': {CHMOD_FILENODE: 'modified file chmod 100755 => 100644'}}),
],
'hg_diff_rename_file.diff': [
- ('file_renamed', 'M',
+ ('file_renamed', 'R',
{'added': 0,
'deleted': 0,
'binary': True,
'ops': {RENAMED_FILENODE: 'file renamed from file to file_renamed'}}),
],
'hg_diff_rename_and_chmod_file.diff': [
- ('README', 'M',
+ ('README', 'R',
{'added': 0,
'deleted': 0,
'binary': True,
@@ -132,7 +130,7 @@ DIFF_FIXTURES = {
'ops': {CHMOD_FILENODE: 'modified file chmod 100644 => 100755'}})
],
'git_diff_rename_file.diff': [
- ('file.xls', 'M',
+ ('file.xls', 'R',
{'added': 0,
'deleted': 0,
'binary': True,