]> source.dussan.org Git - redmine.git/commitdiff
Render the commit changes list as a tree (#1896).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 17 Sep 2008 16:39:23 +0000 (16:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 17 Sep 2008 16:39:23 +0000 (16:39 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1870 e93f8b46-1217-0410-a6f0-8f06a7374b81

42 files changed:
app/controllers/repositories_controller.rb
app/helpers/repositories_helper.rb
app/views/repositories/revision.rhtml
lang/bg.yml
lang/ca.yml
lang/cs.yml
lang/da.yml
lang/de.yml
lang/en.yml
lang/es.yml
lang/fi.yml
lang/fr.yml
lang/he.yml
lang/hu.yml
lang/it.yml
lang/ja.yml
lang/ko.yml
lang/lt.yml
lang/nl.yml
lang/no.yml
lang/pl.yml
lang/pt-br.yml
lang/pt.yml
lang/ro.yml
lang/ru.yml
lang/sr.yml
lang/sv.yml
lang/th.yml
lang/tr.yml
lang/uk.yml
lang/zh-tw.yml
lang/zh.yml
public/images/bullet_add.png [new file with mode: 0644]
public/images/bullet_black.png [new file with mode: 0644]
public/images/bullet_blue.png [new file with mode: 0644]
public/images/bullet_delete.png [new file with mode: 0644]
public/images/bullet_orange.png [new file with mode: 0644]
public/images/bullet_purple.png [new file with mode: 0644]
public/images/folder_open_add.png [new file with mode: 0644]
public/images/folder_open_orange.png [new file with mode: 0644]
public/stylesheets/scm.css
test/functional/repositories_subversion_controller_test.rb

index 2f96e2d66a5ff7de55dbaf8e5c38b9084773080f..78576856d8703e279eeefca93714b03e99b0554c 100644 (file)
@@ -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
index 852ed18d7144d1917f7a28e83ea7e81bc9eb361f..1a82bb8ce1a8c1aa42e7514517b578ee0d20506c 100644 (file)
@@ -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 << '<ul>'
+    tree.keys.sort.each do |file|
+      s = !tree[file][:s].nil?
+      c = tree[file][:c]
+      
+      style = 'change'
+      style << ' folder' if s
+      style << " change-#{c.action}" if c
+      
+      text = h(file)
+      unless c.nil?
+        path_param = to_path_param(@repository.relative_path(c.path))
+        text = link_to(text, :controller => 'repositories',
+                             :action => 'entry',
+                             :id => @project,
+                             :path => path_param,
+                             :rev => @changeset.revision) unless s || c.action == 'D'
+        text << " - #{c.revision}" unless c.revision.blank?
+        text << ' (' + link_to('diff', :controller => 'repositories',
+                                       :action => 'diff',
+                                       :id => @project,
+                                       :path => path_param,
+                                       :rev => @changeset.revision) + ') ' if c.action == 'M'
+        text << ' ' + content_tag('span', c.from_path, :class => 'copied-from') unless c.from_path.blank?
+      end
+      output << "<li class='#{style}'>#{text}</li>"
+      output << render_changes_tree(tree[file][:s]) if s
+    end
+    output << '</ul>'
+    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)
index 80ac3bd1a26b44465d3fccd72c15308ff4cbb638..123fccf26160ce8decac197c247aacbd0b1bdad9 100644 (file)
 <% end %>
 
 <h3><%= l(:label_attachment_plural) %></h3>
-<div style="float:right;">
-<div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
-<div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
-<div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %>&nbsp;</div>
-</div>
+<ul id="changes-legend">
+<li class="change change-A"><%= l(:label_added) %></li>
+<li class="change change-M"><%= l(:label_modified) %></li>
+<li class="change change-C"><%= l(:label_copied) %></li>
+<li class="change change-R"><%= l(:label_renamed) %></li>
+<li class="change change-D"><%= l(:label_deleted) %></li>
+</ul>
+
 <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
-<table class="list">
-<tbody>
-<% @changes.each do |change| %>
-<tr class="<%= cycle 'odd', 'even' %>">
-<td><div class="square action_<%= change.action %>"></div>
-<% 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?  %></td>
-<td align="right">
-<% 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 %>
-</td>
-</tr>
-<% end %>
-</tbody>
-</table>
-<p class="pagination"><%= pagination_links_full @changes_pages %></p>
+
+<div class="changeset-changes">
+<%= render_changeset_changes %>
+</div>
 
 <% content_for :header_tags do %>
 <%= stylesheet_link_tag "scm" %>
index c5c4e0e22ee83d134fbaecad4022c8c00e884c27..e072ad93b6fd2130ff05bdb01185d0905cb79499 100644 (file)
@@ -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
index ee9e1770536b0793731696a71edb309b7dc7736a..895f213ca3f92c60799cfebea2cc7aa0b530dbee 100644 (file)
@@ -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\r
+label_copied: copied\r
index 67cfba0e1c857433b2ea1be5bfbc0655be025ea0..51486aec7f1135c239eca6d1c1d3934a8bf7ae10 100644 (file)
@@ -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
index ce8b8504c318b211c8d2887cc9c5581acdec5d2b..2461d5836514e2a46beb9315586b8408e869020b 100644 (file)
@@ -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
index dd1b74bf9ddb4058a950d2949896d59309e22c23..7ee142528c27d313f2f8578d009efc70d22ff93f 100644 (file)
@@ -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
index 7e8ba9f52ee711d92e741c1a5a3d746dd4267a6a..5ad1e5588fec5789c00df08000ccd56d016aef3d 100644 (file)
@@ -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
index d8f5417ae42a553e492774a556c534d05daf5f36..320a169fa32b55d8f322872bfb76c3d6f0bf86fb 100644 (file)
@@ -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
index b63802e67e2aad9f17ddcace5a22395a84e3c59a..1953fdfe52dd4eef586deca52357e56715a48a3e 100644 (file)
@@ -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
index 872266e3c7a424ac153c09aac6f821e478aa5505..eb52d5a5728f1bc31eeb47b8bfb1f751f77e2779 100644 (file)
@@ -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
index 8cd68c102adcefe662c8a61193219ba9385f034d..7a6c62ef6223e4f1d369fc47df4855d0cc40d8be 100644 (file)
@@ -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
index fa23e7059c1dd7fa57dbf1ba539430640e6b6a81..2b1f3c32ecf6b422544b1b20336fa5ca6116b13e 100644 (file)
@@ -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
index 5507e6bbcc3f142750f1de4a6beb1727485ab4ab..2591358861c52f46ba4333f4252f51acf5f8f722 100644 (file)
@@ -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
index c9470f91fa144cdc40d88673df26e6cfc2325073..c38c2ef706d8027bea6084096d99704c8a66d311 100644 (file)
@@ -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
index 38b5a48af4d57acfc7e8ed7a6f9d526f841555a5..27adf167cd7ba94834c02f4714f9ddbdff3d7eb1 100644 (file)
@@ -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
index 7c62bf155c8997088da5de96b4f6ddcecc8602f0..d9d193352b7e7397ca926d2d1dbf7cb68498bea8 100644 (file)
@@ -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
index e8cab52b20aa9ddb8b578338c94476310e3566e1..746f242eee95fe4f28fbef418d7f9a558eee0c05 100644 (file)
@@ -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
index ce474131449ab47673dded2710597b296480f660..2b78826d074ae6d6ca42e53e880c76528d87cb12 100644 (file)
@@ -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
index 05ff1afb8a868ddf3bd3a1984e1ec356f78f8143..6bdac481c15e93e48ff913c841912f174624d4d1 100644 (file)
@@ -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
index c40c87a76ee06e9d18c7da680c9c45d6794f1204..a4bbefe0139ee859cb9998f1e62afb761a46a280 100644 (file)
@@ -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\r
+label_copied: copied\r
index 37e9ad6b21e67983324e7145d17492f6aac6c55b..98cde780a66bedb8510057183c525e8747137951 100644 (file)
@@ -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
index ebf1c0a1f1b1db38bee370f4b3cd7aae134db23f..855662c58810d4f7f41e5490f7a18b6379a3d93e 100644 (file)
@@ -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
index 5a010ea5c300e24cc00406919f3dbcd1603b13a5..9ef18711b3c6f59ae61e3c7c02bef906e9b91d7d 100644 (file)
@@ -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
index f7ddfd7289ad2fb659352324085b245ac3fc92c8..574470e1b32b99dc2e444bac94ebe75570f657c1 100644 (file)
@@ -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
index b4e621c9317ee44097ad199bba2c5f45cbe63129..1e7d292d62d28b80d8e35a29e72294c5710f7b53 100644 (file)
@@ -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
index e2d8a0a4f5c06a52c0889988d13f61601e370710..0ad6b9b93eca75a31c2f4b6dff3bd250eb19168b 100644 (file)
@@ -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
index 9fb5b63ca5582d55bcf284575fb8c3d2a8a19ffb..7cb2a9e63e7e7dc4c2f7a9d491ced0f861ae2e46 100644 (file)
@@ -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
index 8e8541f10de7069dc98170c7fe3e91bc0801087a..055d27ed97f3d4eedbf47e32e96b92d175fcf4be 100644 (file)
@@ -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
index 9de70f00bf05175d1112f9f9779806382a73cb08..a7a7767f17e210e3931c83baf3b116ee7cd037fb 100644 (file)
@@ -639,3 +639,5 @@ default_activity_development: 開發
 enumeration_issue_priorities: 項目優先權
 enumeration_doc_categories: 文件分類
 enumeration_activities: 活動 (時間追蹤)
+label_renamed: renamed
+label_copied: copied
index f66651cbb7e03e4ad08a930a5d0f8c9e7ff67930..ed84eeb5706ba2ec1af259fbf68d92b5de512a87 100644 (file)
@@ -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 (file)
index 0000000..41ff833
Binary files /dev/null and b/public/images/bullet_add.png differ
diff --git a/public/images/bullet_black.png b/public/images/bullet_black.png
new file mode 100644 (file)
index 0000000..5761970
Binary files /dev/null and b/public/images/bullet_black.png differ
diff --git a/public/images/bullet_blue.png b/public/images/bullet_blue.png
new file mode 100644 (file)
index 0000000..a7651ec
Binary files /dev/null and b/public/images/bullet_blue.png differ
diff --git a/public/images/bullet_delete.png b/public/images/bullet_delete.png
new file mode 100644 (file)
index 0000000..bd6271b
Binary files /dev/null and b/public/images/bullet_delete.png differ
diff --git a/public/images/bullet_orange.png b/public/images/bullet_orange.png
new file mode 100644 (file)
index 0000000..638b1ef
Binary files /dev/null and b/public/images/bullet_orange.png differ
diff --git a/public/images/bullet_purple.png b/public/images/bullet_purple.png
new file mode 100644 (file)
index 0000000..52ba503
Binary files /dev/null and b/public/images/bullet_purple.png differ
diff --git a/public/images/folder_open_add.png b/public/images/folder_open_add.png
new file mode 100644 (file)
index 0000000..1ce4dca
Binary files /dev/null and b/public/images/folder_open_add.png differ
diff --git a/public/images/folder_open_orange.png b/public/images/folder_open_orange.png
new file mode 100644 (file)
index 0000000..fb909ba
Binary files /dev/null and b/public/images/folder_open_orange.png differ
index d5a879bf19793ab0eb808ca63f549d2a84427424..ecd319307742249e0c0ac5ac9aca368e9e4fe706 100644 (file)
@@ -1,4 +1,32 @@
 
+div.changeset-changes ul { margin: 0; padding: 0; }
+div.changeset-changes ul > 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;}
index 8320be7e7ac32d9e8e9945721635bb4e8f2033de..245a170d16b04e4df703707557c60a2adad57793 100644 (file)
@@ -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