##// END OF EJS Templates
compare: fixed case of cross repo compare before links not working.
marcink -
r3146:8bba6dde default
parent child Browse files
Show More
@@ -88,7 +88,7 b' class TestRepoCommitView(object):'
88 88 response.mustcontain('21 files changed: 943 inserted, 288 deleted')
89 89
90 90 # files op files
91 response.mustcontain('File no longer present at commit: %s' %
91 response.mustcontain('File not present at commit: %s' %
92 92 _shorten_commit_id(commit_id))
93 93
94 94 # svn uses a different filename
@@ -133,7 +133,7 b' class TestRepoCommitView(object):'
133 133 response.mustcontain('21 files changed: 943 inserted, 288 deleted')
134 134
135 135 # files op files
136 response.mustcontain('File no longer present at commit: %s' %
136 response.mustcontain('File not present at commit: %s' %
137 137 _shorten_commit_id(commit_ids[1]))
138 138 response.mustcontain('Added docstrings to vcs.cli') # commit msg
139 139 response.mustcontain('Changed theme to ADC theme') # commit msg
@@ -163,7 +163,7 b' class TestRepoCommitView(object):'
163 163 response.mustcontain(_shorten_commit_id(commit_ids[1]))
164 164
165 165 # files op files
166 response.mustcontain('File no longer present at commit: %s' %
166 response.mustcontain('File not present at commit: %s' %
167 167 _shorten_commit_id(commit_ids[1]))
168 168
169 169 # svn is special
@@ -300,6 +300,7 b' class RepoCompareView(RepoAppView):'
300 300 diffset = codeblocks.DiffSet(
301 301 repo_name=source_repo.repo_name,
302 302 source_node_getter=codeblocks.diffset_node_getter(source_commit),
303 target_repo_name=self.db_repo_name,
303 304 target_node_getter=codeblocks.diffset_node_getter(target_commit),
304 305 )
305 306 c.diffset = self.path_filter.render_patchset_filtered(
@@ -377,6 +377,7 b' class DiffSet(object):'
377 377 def __init__(self, highlight_mode=HL_REAL, repo_name=None,
378 378 source_repo_name=None,
379 379 source_node_getter=lambda filename: None,
380 target_repo_name=None,
380 381 target_node_getter=lambda filename: None,
381 382 source_nodes=None, target_nodes=None,
382 383 # files over this size will use fast highlighting
@@ -390,6 +391,7 b' class DiffSet(object):'
390 391 self.source_nodes = source_nodes or {}
391 392 self.target_nodes = target_nodes or {}
392 393 self.repo_name = repo_name
394 self.target_repo_name = target_repo_name or repo_name
393 395 self.source_repo_name = source_repo_name or repo_name
394 396 self.max_file_size_limit = max_file_size_limit
395 397
@@ -402,6 +404,7 b' class DiffSet(object):'
402 404 file_stats={},
403 405 limited_diff=isinstance(patchset, LimitedDiffContainer),
404 406 repo_name=self.repo_name,
407 target_repo_name=self.target_repo_name,
405 408 source_repo_name=self.source_repo_name,
406 409 source_ref=source_ref,
407 410 target_ref=target_ref,
@@ -414,6 +417,7 b' class DiffSet(object):'
414 417 target_ref=diffset.target_ref,
415 418 repo_name=diffset.repo_name,
416 419 source_repo_name=diffset.source_repo_name,
420 target_repo_name=diffset.target_repo_name,
417 421 ))
418 422 diffset.files.append(filediff)
419 423 diffset.changed_files += 1
@@ -443,11 +443,14 b' from rhodecode.lib.diffs import NEW_FILE'
443 443
444 444 <%def name="diff_menu(filediff, use_comments=False)">
445 445 <div class="filediff-menu">
446 %if filediff.diffset.source_ref:
446
447 %if filediff.diffset.source_ref:
448
449 ## FILE BEFORE CHANGES
447 450 %if filediff.operation in ['D', 'M']:
448 451 <a
449 452 class="tooltip"
450 href="${h.route_path('repo_files',repo_name=filediff.diffset.repo_name,commit_id=filediff.diffset.source_ref,f_path=filediff.source_file_path)}"
453 href="${h.route_path('repo_files',repo_name=filediff.diffset.target_repo_name,commit_id=filediff.diffset.source_ref,f_path=filediff.source_file_path)}"
451 454 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
452 455 >
453 456 ${_('Show file before')}
@@ -455,11 +458,13 b' from rhodecode.lib.diffs import NEW_FILE'
455 458 %else:
456 459 <span
457 460 class="tooltip"
458 title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
461 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
459 462 >
460 463 ${_('Show file before')}
461 464 </span> |
462 465 %endif
466
467 ## FILE AFTER CHANGES
463 468 %if filediff.operation in ['A', 'M']:
464 469 <a
465 470 class="tooltip"
@@ -471,20 +476,21 b' from rhodecode.lib.diffs import NEW_FILE'
471 476 %else:
472 477 <span
473 478 class="tooltip"
474 title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
479 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
475 480 >
476 481 ${_('Show file after')}
477 482 </span>
478 483 %endif
479 484
480 % if use_comments:
481 |
482 <a href="#" onclick="return Rhodecode.comments.toggleComments(this);">
483 <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span>
484 </a>
485 % endif
485 % if use_comments:
486 |
487 <a href="#" onclick="return Rhodecode.comments.toggleComments(this);">
488 <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span>
489 </a>
490 % endif
486 491
487 %endif
492 %endif
493
488 494 </div>
489 495 </%def>
490 496
General Comments 0
You need to be logged in to leave comments. Login now