From 3520961eae873fcbb983414ad8e18500b377c5b7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 17 Sep 2008 16:39:23 +0000 Subject: [PATCH] Render the commit changes list as a tree (#1896). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1870 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/repositories_controller.rb | 5 -- app/helpers/repositories_helper.rb | 68 ++++++++++++++++++ app/views/repositories/revision.rhtml | 38 ++++------ lang/bg.yml | 2 + lang/ca.yml | 2 + lang/cs.yml | 2 + lang/da.yml | 2 + lang/de.yml | 2 + lang/en.yml | 2 + lang/es.yml | 2 + lang/fi.yml | 2 + lang/fr.yml | 2 + lang/he.yml | 2 + lang/hu.yml | 2 + lang/it.yml | 2 + lang/ja.yml | 2 + lang/ko.yml | 2 + lang/lt.yml | 2 + lang/nl.yml | 2 + lang/no.yml | 2 + lang/pl.yml | 2 + lang/pt-br.yml | 2 + lang/pt.yml | 2 + lang/ro.yml | 2 + lang/ru.yml | 2 + lang/sr.yml | 2 + lang/sv.yml | 2 + lang/th.yml | 2 + lang/tr.yml | 2 + lang/uk.yml | 2 + lang/zh-tw.yml | 2 + lang/zh.yml | 2 + public/images/bullet_add.png | Bin 0 -> 286 bytes public/images/bullet_black.png | Bin 0 -> 211 bytes public/images/bullet_blue.png | Bin 0 -> 289 bytes public/images/bullet_delete.png | Bin 0 -> 308 bytes public/images/bullet_orange.png | Bin 0 -> 3050 bytes public/images/bullet_purple.png | Bin 0 -> 294 bytes public/images/folder_open_add.png | Bin 0 -> 3206 bytes public/images/folder_open_orange.png | Bin 0 -> 3204 bytes public/stylesheets/scm.css | 28 ++++++++ ...repositories_subversion_controller_test.rb | 37 ++++++---- 42 files changed, 189 insertions(+), 45 deletions(-) create mode 100644 public/images/bullet_add.png create mode 100644 public/images/bullet_black.png create mode 100644 public/images/bullet_blue.png create mode 100644 public/images/bullet_delete.png create mode 100644 public/images/bullet_orange.png create mode 100644 public/images/bullet_purple.png create mode 100644 public/images/folder_open_add.png create mode 100644 public/images/folder_open_orange.png diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 2f96e2d66..78576856d 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -118,11 +118,6 @@ class RepositoriesController < ApplicationController def revision @changeset = @repository.changesets.find_by_revision(@rev) raise ChangesetNotFound unless @changeset - @changes_count = @changeset.changes.size - @changes_pages = Paginator.new self, @changes_count, 150, params['page'] - @changes = @changeset.changes.find(:all, - :limit => @changes_pages.items_per_page, - :offset => @changes_pages.current.offset) respond_to do |format| format.html diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 852ed18d7..1a82bb8ce 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -32,6 +32,74 @@ module RepositoriesHelper end end + def render_changeset_changes + changes = @changeset.changes.find(:all, :limit => 1000, :order => 'path').collect do |change| + case change.action + when 'A' + # Detects moved/copied files + if !change.from_path.blank? + change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C' + end + change + when 'D' + @changeset.changes.detect {|c| c.from_path == change.path} ? nil : change + else + change + end + end.compact + + tree = { } + changes.each do |change| + p = tree + dirs = change.path.to_s.split('/').select {|d| !d.blank?} + dirs.each do |dir| + p[:s] ||= {} + p = p[:s] + p[dir] ||= {} + p = p[dir] + end + p[:c] = change + end + + render_changes_tree(tree[:s]) + end + + def render_changes_tree(tree) + return '' if tree.nil? + + output = '' + output << '' + output + end + def to_utf8(str) return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii @encodings ||= Setting.repositories_encodings.split(',').collect(&:strip) diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml index 80ac3bd1a..123fccf26 100644 --- a/app/views/repositories/revision.rhtml +++ b/app/views/repositories/revision.rhtml @@ -36,33 +36,19 @@ <% end %>

<%= l(:label_attachment_plural) %>

-
-
<%= l(:label_added) %> 
-
<%= l(:label_modified) %> 
-
<%= l(:label_deleted) %> 
-
+ +

<%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %>

- - -<% @changes.each do |change| %> - - - - -<% end %> - -
-<% if change.action == "D" -%> - <%= change.path -%> -<% else -%> - <%= link_to change.path, :action => 'entry', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision -%> -<% end -%> -<%= "(#{change.revision})" unless change.revision.blank? %>
-<% if change.action == "M" %> -<%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision %> -<% end %> -
-

<%= pagination_links_full @changes_pages %>

+ +
+<%= render_changeset_changes %> +
<% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/lang/bg.yml b/lang/bg.yml index c5c4e0e22..e072ad93b 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/ca.yml b/lang/ca.yml index ee9e17705..895f213ca 100644 --- a/lang/ca.yml +++ b/lang/ca.yml @@ -640,3 +640,5 @@ setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version. field_comments: Comment setting_commit_logs_encoding: Commit messages encoding +label_renamed: renamed +label_copied: copied diff --git a/lang/cs.yml b/lang/cs.yml index 67cfba0e1..51486aec7 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -643,3 +643,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/da.yml b/lang/da.yml index ce8b8504c..2461d5836 100644 --- a/lang/da.yml +++ b/lang/da.yml @@ -640,3 +640,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/de.yml b/lang/de.yml index dd1b74bf9..7ee142528 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/en.yml b/lang/en.yml index 7e8ba9f52..5ad1e5588 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -405,6 +405,8 @@ label_revision_plural: Revisions label_associated_revisions: Associated revisions label_added: added label_modified: modified +label_copied: copied +label_renamed: renamed label_deleted: deleted label_latest_revision: Latest revision label_latest_revision_plural: Latest revisions diff --git a/lang/es.yml b/lang/es.yml index d8f5417ae..320a169fa 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -641,3 +641,5 @@ setting_commit_logs_encoding: Codificación de los mensajes de commit button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/fi.yml b/lang/fi.yml index b63802e67..1953fdfe5 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -638,3 +638,5 @@ button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers setting_commit_logs_encoding: Commit messages encoding notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/fr.yml b/lang/fr.yml index 872266e3c..eb52d5a57 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -404,6 +404,8 @@ label_revision_plural: Révisions label_associated_revisions: Révisions associées label_added: ajouté label_modified: modifié +label_copied: copié +label_renamed: renommé label_deleted: supprimé label_latest_revision: Dernière révision label_latest_revision_plural: Dernières révisions diff --git a/lang/he.yml b/lang/he.yml index 8cd68c102..7a6c62ef6 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/hu.yml b/lang/hu.yml index fa23e7059..2b1f3c32e 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit üzenetek kódlapja button_quote: Idézet setting_sequential_project_identifiers: Szekvenciális projekt azonosítók generálása notice_unable_delete_version: A verziót nem lehet törölni +label_renamed: renamed +label_copied: copied diff --git a/lang/it.yml b/lang/it.yml index 5507e6bbc..259135886 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/ja.yml b/lang/ja.yml index c9470f91f..c38c2ef70 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/ko.yml b/lang/ko.yml index 38b5a48af..27adf167c 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/lt.yml b/lang/lt.yml index 7c62bf155..d9d193352 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -640,3 +640,5 @@ setting_commit_logs_encoding: Commit pranėšimų koduotė setting_sequential_project_identifiers: Generate sequential project identifiers button_quote: Quote notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/nl.yml b/lang/nl.yml index e8cab52b2..746f242ee 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/no.yml b/lang/no.yml index ce4741314..2b78826d0 100644 --- a/lang/no.yml +++ b/lang/no.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/pl.yml b/lang/pl.yml index 05ff1afb8..6bdac481c 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/pt-br.yml b/lang/pt-br.yml index c40c87a76..a4bbefe01 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -639,3 +639,5 @@ enumeration_issue_priorities: Prioridade das tarefas enumeration_doc_categories: Categorias de documento enumeration_activities: Atividades (time tracking) notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/pt.yml b/lang/pt.yml index 37e9ad6b2..98cde780a 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/ro.yml b/lang/ro.yml index ebf1c0a1f..855662c58 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -638,3 +638,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/ru.yml b/lang/ru.yml index 5a010ea5c..9ef18711b 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -670,3 +670,5 @@ text_user_mail_option: "Для невыбранных проектов, Вы б text_user_wrote: '%s написал(а):' text_wiki_destroy_confirmation: Вы уверены, что хотите удалить данную Wiki и все содержимое? text_workflow_edit: Выберите роль и трекер для редактирования последовательности состояний +label_renamed: renamed +label_copied: copied diff --git a/lang/sr.yml b/lang/sr.yml index f7ddfd728..574470e1b 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/sv.yml b/lang/sv.yml index b4e621c93..1e7d292d6 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -639,3 +639,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/th.yml b/lang/th.yml index e2d8a0a4f..0ad6b9b93 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -641,3 +641,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/tr.yml b/lang/tr.yml index 9fb5b63ca..7cb2a9e63 100644 --- a/lang/tr.yml +++ b/lang/tr.yml @@ -639,3 +639,5 @@ setting_mail_handler_api_key: API key setting_commit_logs_encoding: Commit messages encoding general_csv_decimal_separator: '.' notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/uk.yml b/lang/uk.yml index 8e8541f10..055d27ed9 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -640,3 +640,5 @@ setting_commit_logs_encoding: Commit messages encoding button_quote: Quote setting_sequential_project_identifiers: Generate sequential project identifiers notice_unable_delete_version: Unable to delete version +label_renamed: renamed +label_copied: copied diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index 9de70f00b..a7a7767f1 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -639,3 +639,5 @@ default_activity_development: 開發 enumeration_issue_priorities: 項目優先權 enumeration_doc_categories: 文件分類 enumeration_activities: 活動 (時間追蹤) +label_renamed: renamed +label_copied: copied diff --git a/lang/zh.yml b/lang/zh.yml index f66651cbb..ed84eeb57 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -639,3 +639,5 @@ default_activity_development: 开发 enumeration_issue_priorities: 问题优先级 enumeration_doc_categories: 文档类别 enumeration_activities: 活动(时间跟踪) +label_renamed: renamed +label_copied: copied diff --git a/public/images/bullet_add.png b/public/images/bullet_add.png new file mode 100644 index 0000000000000000000000000000000000000000..41ff8335b06be000bc6912c2bbd9d3c572c8a9da GIT binary patch literal 286 zcmV+(0pb3MP)C#5QQ<|d}62BjvZR2H60wE-$h^>lFz(Kw&{<9vg>5sw~gS5O!4 zr|{HuUFIBKiQyL}eBJ-L{`UVT|6_O~L{G%N{Wbre{kQtZ_0LvEhDX@>Vt8IAj)#jg!+?Z23wnf7d! zNAH#A4i6V)y_WtvZQ1hT)TAWgjoY{t%BOsI;8VOzQvNniDZk5xCy$)UQWb1PRjRoz l1#moJy|?3|{zvx%+XakOf%ava&w)pvdYw!Pm*LM8> zx}xa+>1^FUyPR2ai85fP3-jG?K+XRr`TqZ3F8Kd{o8tf1T@L?&;`fL$0Oag{XV?8l z2Jh=7{)5DcbAc=K<1cfQ|NjSS`ccO4{~ZuN%wYZx6n{dL0f)n-8cwFD{(e@j`2STU z>;JncjQ{ugvi#ZM%3MW!EQHHe0ByVvjfKa!G>;}_2nGNF&fymKM6jp;0000KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTm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&F}00036NkloYQJ-?uR^{Qtu6@9#&3Uw=L^{A2v{ zj3^hd@w(1^b@%X}&))?YzW%+;@Zra0hUd@U{$*fbn1;;&Mr=v>;o9(upP#p-GyP|g s|Ht^}DFXw;bhU)fZA2R|!jdvz0I@-X^7WW_W&i*H07*qoM6N<$g39N+`v3p{ literal 0 HcmV?d00001 diff --git a/public/images/bullet_purple.png b/public/images/bullet_purple.png new file mode 100644 index 0000000000000000000000000000000000000000..52ba5036b95383f6c14176ae33300b859e4d27d8 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i>p@N{tuu{izq(ta+-M44kBpIe=q zx`X8@9}gS%(w5FYFVig+ojZ_cD5YzW==f41NB?BP0gvSsuL~|cX5(?+BsuSEuz#(i z(0!iz2et`~ZLD6*`-~P&eW1fC)8o%D^YrBE+t1g1f3V_>QFkv3+p8U`|6X{$=uzRE zYb8;$Jas}77I1~H-7TjsdDijKvCOxpB#s?yRPsxju2(W^mhtCPasN(mSRK@VvcWVc q!c)dr)HS~K;xqxD$MKK)8^oXLysE8u-|YeP1B0ilpUXO@geCyg%6BgS literal 0 HcmV?d00001 diff --git a/public/images/folder_open_add.png b/public/images/folder_open_add.png new file mode 100644 index 0000000000000000000000000000000000000000..1ce4dcaefecf2cd685b91e24a7042ae432e202cd GIT binary patch literal 3206 zcmV;140-d3P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+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;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0004>NklyBrL{b<6yIq>;@Z=)MCJ57fD17gc(2Jy>-=jJI?G&u}+dz zV}w2Bx%ZsMz3(1jjG-NfzvX_p(CTK7q&!b+O2iWAPxy}ZV|-WnfPmY`TP*8i4tlQHfDumnJg zHqo|$m3*DrE!^4|AMX(!d?BuFA$o>**cUYo0G!dP{~7?5T)H7UzEOPu0000 ul { margin-left: 18px; padding: 0; } + +li.change { + list-style-type:none; + background-image: url(../images/bullet_black.png); + background-position: 1px 1px; + background-repeat: no-repeat; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 20px; + margin: 0; +} +li.change.folder { background-image: url(../images/folder_open.png); } +li.change.folder.change-A { background-image: url(../images/folder_open_add.png); } +li.change.folder.change-M { background-image: url(../images/folder_open_orange.png); } +li.change.change-A { background-image: url(../images/bullet_add.png); } +li.change.change-M { background-image: url(../images/bullet_orange.png); } +li.change.change-C { background-image: url(../images/bullet_blue.png); } +li.change.change-R { background-image: url(../images/bullet_purple.png); } +li.change.change-D { background-image: url(../images/bullet_delete.png); } + +li.change .copied-from { font-style: italic; color: #999; font-size: 0.9em; } +li.change .copied-from:before { content: " - "} + +#changes-legend { float: right; font-size: 0.8em; margin: 0; } +#changes-legend li { float: left; background-position: 5px 0; } + table.filecontent { border: 1px solid #ccc; border-collapse: collapse; width:98%; } table.filecontent th { border: 1px solid #ccc; background-color: #eee; } table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding: 0.2em;} diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index 8320be7e7..245a170d1 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -125,16 +125,18 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase get :revision, :id => 1, :rev => 2 assert_response :success assert_template 'revision' - assert_tag :tag => 'tr', - :child => { :tag => 'td', + assert_tag :tag => 'ul', + :child => { :tag => 'li', # link to the entry at rev 2 - :child => { :tag => 'a', :attributes => {:href => 'repositories/entry/ecookbook/test/some/path/in/the/repo?rev=2'}, - :content => %r{/test/some/path/in/the/repo} } - }, - :child => { :tag => 'td', - # link to partial diff - :child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' } } - } + :child => { :tag => 'a', + :attributes => {:href => '/repositories/entry/ecookbook/test/some/path/in/the/repo?rev=2'}, + :content => 'repo', + # link to partial diff + :sibling => { :tag => 'a', + :attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' } + } + } + } end def test_revision_with_repository_pointing_to_a_subdirectory @@ -145,11 +147,18 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase get :revision, :id => 1, :rev => 2 assert_response :success assert_template 'revision' - assert_tag :tag => 'tr', - :child => { :tag => 'td', :content => %r{/test/some/path/in/the/repo} }, - :child => { :tag => 'td', - :child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/path/in/the/repo?rev=2' } } - } + assert_tag :tag => 'ul', + :child => { :tag => 'li', + # link to the entry at rev 2 + :child => { :tag => 'a', + :attributes => {:href => '/repositories/entry/ecookbook/path/in/the/repo?rev=2'}, + :content => 'repo', + # link to partial diff + :sibling => { :tag => 'a', + :attributes => { :href => '/repositories/diff/ecookbook/path/in/the/repo?rev=2' } + } + } + } end def test_diff