diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -260,6 +260,7 @@ class ChangesetController(BaseRepoContro return get_node diffset = codeblocks.DiffSet( + repo_name=c.repo_name, source_node_getter=_node_getter(commit1), target_node_getter=_node_getter(commit2), ).render_patchset(_parsed, commit1.raw_id, commit2.raw_id) diff --git a/rhodecode/controllers/compare.py b/rhodecode/controllers/compare.py --- a/rhodecode/controllers/compare.py +++ b/rhodecode/controllers/compare.py @@ -254,6 +254,7 @@ class CompareController(BaseRepoControll return get_node c.diffset = codeblocks.DiffSet( + repo_name=source_repo.repo_name, source_node_getter=_node_getter(source_commit), target_node_getter=_node_getter(target_commit), ).render_patchset(_parsed, source_ref, target_ref) diff --git a/rhodecode/lib/codeblocks.py b/rhodecode/lib/codeblocks.py --- a/rhodecode/lib/codeblocks.py +++ b/rhodecode/lib/codeblocks.py @@ -352,7 +352,7 @@ class DiffSet(object): # in the case of multiline code HL_NONE = 'NONE' # no highlighting, fastest - def __init__(self, highlight_mode=HL_REAL, + def __init__(self, highlight_mode=HL_REAL, repo_name=None, source_node_getter=lambda filename: None, target_node_getter=lambda filename: None, source_nodes=None, target_nodes=None, @@ -366,7 +366,7 @@ class DiffSet(object): self.target_node_getter = target_node_getter self.source_nodes = source_nodes or {} self.target_nodes = target_nodes or {} - + self.repo_name = repo_name self.max_file_size_limit = max_file_size_limit @@ -377,6 +377,7 @@ class DiffSet(object): changed_files=0, files=[], limited_diff=isinstance(patchset, LimitedDiffContainer), + repo_name=self.repo_name, source_ref=source_ref, target_ref=target_ref, )) diff --git a/rhodecode/templates/codeblocks/diffs.html b/rhodecode/templates/codeblocks/diffs.html --- a/rhodecode/templates/codeblocks/diffs.html +++ b/rhodecode/templates/codeblocks/diffs.html @@ -65,7 +65,7 @@ collapse_all = len(diffset.files) > coll