diff --git a/app/views/repositories/show.rhtml b/app/views/repositories/show.rhtml
index 7df7d727d..d51724252 100644
--- a/app/views/repositories/show.rhtml
+++ b/app/views/repositories/show.rhtml
@@ -23,7 +23,11 @@
<% if @repository.supports_all_revisions? %>
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %>
<% end %>
-<% if @repository.supports_directory_revisions? %>
+<%
+ has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
+ if @repository.supports_directory_revisions? &&
+ ( has_branches || !@path.blank? || !@rev.blank? )
+ %>
|
<%= link_to l(:label_view_revisions),
:action => 'changes',