Show More
@@ -260,6 +260,7 b' class ChangesetController(BaseRepoContro' | |||
|
260 | 260 | return get_node |
|
261 | 261 | |
|
262 | 262 | diffset = codeblocks.DiffSet( |
|
263 | repo_name=c.repo_name, | |
|
263 | 264 | source_node_getter=_node_getter(commit1), |
|
264 | 265 | target_node_getter=_node_getter(commit2), |
|
265 | 266 | ).render_patchset(_parsed, commit1.raw_id, commit2.raw_id) |
@@ -254,6 +254,7 b' class CompareController(BaseRepoControll' | |||
|
254 | 254 | return get_node |
|
255 | 255 | |
|
256 | 256 | c.diffset = codeblocks.DiffSet( |
|
257 | repo_name=source_repo.repo_name, | |
|
257 | 258 | source_node_getter=_node_getter(source_commit), |
|
258 | 259 | target_node_getter=_node_getter(target_commit), |
|
259 | 260 | ).render_patchset(_parsed, source_ref, target_ref) |
@@ -352,7 +352,7 b' class DiffSet(object):' | |||
|
352 | 352 | # in the case of multiline code |
|
353 | 353 | HL_NONE = 'NONE' # no highlighting, fastest |
|
354 | 354 | |
|
355 | def __init__(self, highlight_mode=HL_REAL, | |
|
355 | def __init__(self, highlight_mode=HL_REAL, repo_name=None, | |
|
356 | 356 | source_node_getter=lambda filename: None, |
|
357 | 357 | target_node_getter=lambda filename: None, |
|
358 | 358 | source_nodes=None, target_nodes=None, |
@@ -366,7 +366,7 b' class DiffSet(object):' | |||
|
366 | 366 | self.target_node_getter = target_node_getter |
|
367 | 367 | self.source_nodes = source_nodes or {} |
|
368 | 368 | self.target_nodes = target_nodes or {} |
|
369 | ||
|
369 | self.repo_name = repo_name | |
|
370 | 370 | |
|
371 | 371 | self.max_file_size_limit = max_file_size_limit |
|
372 | 372 | |
@@ -377,6 +377,7 b' class DiffSet(object):' | |||
|
377 | 377 | changed_files=0, |
|
378 | 378 | files=[], |
|
379 | 379 | limited_diff=isinstance(patchset, LimitedDiffContainer), |
|
380 | repo_name=self.repo_name, | |
|
380 | 381 | source_ref=source_ref, |
|
381 | 382 | target_ref=target_ref, |
|
382 | 383 | )) |
@@ -65,7 +65,7 b' collapse_all = len(diffset.files) > coll' | |||
|
65 | 65 | <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}"> |
|
66 | 66 | %if commit: |
|
67 | 67 | <div class="pull-right"> |
|
68 |
<a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name= |
|
|
68 | <a class="btn tooltip" title="${_('Browse Files at revision {}').format(commit.raw_id)}" href="${h.url('files_home',repo_name=diffset.repo_name, revision=commit.raw_id, f_path='')}"> | |
|
69 | 69 | ${_('Browse Files')} |
|
70 | 70 | </a> |
|
71 | 71 | </div> |
@@ -256,7 +256,7 b' from rhodecode.lib.diffs import NEW_FILE' | |||
|
256 | 256 | %if filediff.patch['operation'] in ['D', 'M']: |
|
257 | 257 | <a |
|
258 | 258 | class="tooltip" |
|
259 |
href="${h.url('files_home',repo_name= |
|
|
259 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}" | |
|
260 | 260 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}" |
|
261 | 261 | > |
|
262 | 262 | ${_('Show file before')} |
@@ -272,7 +272,7 b' from rhodecode.lib.diffs import NEW_FILE' | |||
|
272 | 272 | %if filediff.patch['operation'] in ['A', 'M']: |
|
273 | 273 | <a |
|
274 | 274 | class="tooltip" |
|
275 |
href="${h.url('files_home',repo_name= |
|
|
275 | href="${h.url('files_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}" | |
|
276 | 276 | title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}" |
|
277 | 277 | > |
|
278 | 278 | ${_('Show file after')} |
@@ -288,14 +288,14 b' from rhodecode.lib.diffs import NEW_FILE' | |||
|
288 | 288 | <a |
|
289 | 289 | class="tooltip" |
|
290 | 290 | title="${h.tooltip(_('Raw diff'))}" |
|
291 |
href="${h.url('files_diff_home',repo_name= |
|
|
291 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}" | |
|
292 | 292 | > |
|
293 | 293 | ${_('Raw diff')} |
|
294 | 294 | </a> |
|
295 | 295 | <a |
|
296 | 296 | class="tooltip" |
|
297 | 297 | title="${h.tooltip(_('Download diff'))}" |
|
298 |
href="${h.url('files_diff_home',repo_name= |
|
|
298 | href="${h.url('files_diff_home',repo_name=filediff.diffset.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}" | |
|
299 | 299 | > |
|
300 | 300 | ${_('Download diff')} |
|
301 | 301 | </a> |
General Comments 0
You need to be logged in to leave comments.
Login now