Defect #7984

Confusing revisions links on repository root

Added by Etienne Massip about 8 years ago. Updated over 7 years ago.

Status:NewStart date:2011-03-24
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:

Description

Actually, there's something weird on devel since of r5145 :

there is now 2 links displayed side by side on the root page of a repository ; the first one to list all repository revisions and the second one to display directory revisions, which seems to be redundant since, err...this is the root, and is very confusing .

I think that the previous check @path.blank? in source:trunk/app/views/repositories/show.rhtml#L23 should have been kept :

<%   if @repository.supports_all_revisions? %>

should be
<%   if @path.blank? && @repository.supports_all_revisions? %>

svn-root.png (121 KB) Toshi MARUYAMA, 2011-03-25 08:53

svn-trunk.png (177 KB) Toshi MARUYAMA, 2011-03-25 08:53

svn-root-r5218.png (124 KB) Toshi MARUYAMA, 2011-03-25 08:53

hg-revisions-root-default.png (119 KB) Toshi MARUYAMA, 2011-03-25 09:07

hg-root-default.png (191 KB) Toshi MARUYAMA, 2011-03-25 09:07

hg-root-tip.png (197 KB) Toshi MARUYAMA, 2011-03-25 09:07

git-root.png (133 KB) Toshi MARUYAMA, 2011-03-25 09:14

TortoiseHg.2.0.2-default-only.png (123 KB) Toshi MARUYAMA, 2011-03-25 09:33

TortoiseHg.2.0.2-show-all.png (122 KB) Toshi MARUYAMA, 2011-03-25 09:33

gitk--all.png (128 KB) Toshi MARUYAMA, 2011-03-25 09:33

ruby-redmine-1.1-top.png (142 KB) Toshi MARUYAMA, 2011-03-25 09:42

ruby-redmine-1.1-bottom.png (88.2 KB) Toshi MARUYAMA, 2011-03-25 09:42

svn-root-with-rev.r5609.png (131 KB) Toshi MARUYAMA, 2011-05-01 11:29

hg-app-1.1-stable.r5609.png (103 KB) Toshi MARUYAMA, 2011-05-01 11:29

hg-root-1.1-stable-bottom.r5609.png (129 KB) Toshi MARUYAMA, 2011-05-01 11:29

hg-root-bottom.r5609.png (101 KB) Toshi MARUYAMA, 2011-05-01 11:29

svn-branches.r5609.png (112 KB) Toshi MARUYAMA, 2011-05-01 11:29

svn-root.r5609.png (121 KB) Toshi MARUYAMA, 2011-05-01 11:29


Related issues

Related to Redmine - Feature #7246: Handle "named branch" for mercurial Closed 2011-01-07
Related to Redmine - Feature #5083: Add the ability to view a range of revisions New 2010-03-15
Related to Redmine - Feature #5386: Branch/Tags in Changeset Description New 2010-04-27
Related to Redmine - Feature #2120: Different views between develop and funcional New 2008-10-31
Related to Redmine - Feature #3909: Mercurial: show repository graphic history Closed 2009-09-23
Related to Redmine - Feature #5501: Git: Mercurial: Adding visual merge/branch history to rep... Closed 2010-05-11
Related to Redmine - Feature #539: Repository browser per Project Version. New
Related to Redmine - Patch #6159: Subversion: latest changesets performance improvement. New 2010-08-17
Related to Redmine - Feature #5279: Branch level associations between projects and repositories. New 2010-04-09
Related to Redmine - Feature #1311: Subversion: Show revision histories for branches New 2008-05-27
Related to Redmine - Patch #3357: Revision log relative to current location in the Reposito... New 2009-05-13
Related to Redmine - Defect #3943: Subversion: Directory revision list contains faulty revis... New 2009-09-29
Related to Redmine - Feature #6982: Change in behavior of Repository auto-fetch feature New 2010-11-25
Related to Redmine - Feature #1406: Browse through Git branches Closed 2008-06-09
Related to Redmine - Feature #2799: Support for Bazaar's shared reposetories (created with in... New 2009-02-21
Related to Redmine - Feature #4741: Improve Bazaar repositories error message in case to use ... New 2009-02-21
Related to Redmine - Defect #8030: Bazaar integration doesn't notice new commits to repository New 2011-03-31

Associated revisions

Revision 5213
Added by Jean-Philippe Lang about 8 years ago

Do not display both 'View all revisions' and 'View revision' links (#7984).

Revision 5218
Added by Toshi MARUYAMA about 8 years ago

scm: backout r5213. do not display both 'View all revisions' and 'View revision' links (#7984, #7246).

Git and Mercurial support branch.

Git in repository root shows master branch.
Git master branch does not have all revisions.

Mercurial default branch is default branch.
Mercurial shows tip in repository root.

Mercurial does not treat directory. "hg log DIR" costs high.
Getting correct limited changesets in sub directory and branch is very heavy.
So, if there is no recent revision in sub directory and branch,
no changeset shows.

Revision 5219
Added by Toshi MARUYAMA about 8 years ago

scm: do not display 'View revision' links in subversion if path or revision are nil (#7984).

Revision 5223
Added by Toshi MARUYAMA about 8 years ago

scm: remove "View all revisions" in sub directory (#7984).

Revision 5478
Added by Toshi MARUYAMA about 8 years ago

scm: darcs: set supports_directory_revisions true at model (#7984).

Darcs adapter saves directory changes in database.
So, Redmine 1.1 shows latest changesets in sub directory.

History

#1 Updated by Jean-Philippe Lang about 8 years ago

  • Priority changed from Normal to High

Very confusing indeed.

#2 Updated by Jean-Philippe Lang about 8 years ago

I've changed the behaviour in r5213 to display one link only.
Toshi, is there any wrong with it?

#3 Updated by Toshi MARUYAMA about 8 years ago

Subversion

#4 Updated by Etienne Massip about 8 years ago

Having both links side by side is confusing because they're semantically very close.

Dumb question : what's the distinction between "all revisions" and "revisions" ?

#5 Updated by Toshi MARUYAMA about 8 years ago

Mercurial

#7 Updated by Toshi MARUYAMA about 8 years ago

Git

#8 Updated by Toshi MARUYAMA about 8 years ago

#9 Updated by Toshi MARUYAMA about 8 years ago

Etienne Massip wrote:

Having both links side by side is confusing because they're semantically very close.

Dumb question : what's the distinction between "all revisions" and "revisions" ?

"all revisions" shows all revisions stored in database.
"revisions" shows revisions in branch.

Subversion branch is directory.
So, Subversion root directory has all revisions.
But, Git and Mercurial does not have all revisions in branch.

#12 Updated by Etienne Massip about 8 years ago

Still don't buy it ; IMM, the "all revisions" should not be visible inside a branch or revision, this doesn't make sense to me.

Btw, SVN supports branches and tags too, would be nice to have a tag combo for it too =)

#13 Updated by Toshi MARUYAMA about 8 years ago

Ruby uses Redmine 1.1.
There is no way to show revisions in branch.

http://redmine.ruby-lang.org/projects/redmine/repository/show?rev=ruby-lang.org%2F1.1

#14 Updated by Etienne Massip about 8 years ago

Toshi MARUYAMA wrote:

Ruby uses Redmine 1.1.

IMHO, 1.1 link is not smart either : "View all revisions" is a shortcut to "View all applicable revisions and not only the first ones as listed above", so it should keep on displaying only revisions in the selected branch.

There is no way to show revisions in branch.

What do you mean ?

#15 Updated by Etienne Massip about 8 years ago

Etienne Massip wrote:

IMHO, 1.1 link is not smart either : "View all revisions" is a shortcut to "View all applicable revisions and not only the first ones as listed above", so it should keep on displaying only revisions in the selected branch.

Which is kinda the same as "View revisions", you'll tell me. That's maybe why the 2 links should not be displayed together.

#16 Updated by Toshi MARUYAMA about 8 years ago

Etienne Massip wrote:

Toshi MARUYAMA wrote:

Ruby uses Redmine 1.1.

IMHO, 1.1 link is not smart either : "View all revisions" is a shortcut to "View all applicable revisions and not only the first ones as listed above", so it should keep on displaying only revisions in the selected branch.

There is no way to show revisions in branch.

What do you mean ?

View all revisions
http://redmine.ruby-lang.org/projects/redmine/repository/revisions
View revisions
http://redmine.ruby-lang.org/projects/redmine/repository/changes

Redmine 1.1 has no link "View revisions" in root directory.
So, there is no way to view revisions in root directory and master branch.

#17 Updated by Etienne Massip about 8 years ago

Actually, if a branch is selected, then the only link displayed should be "View revisions" so you'll get all revisions for the branch / directory pair. The only case the "View all revisions" would be used is with the pair "all branches /root", whichever SCM

And, btw, can't we use only one link and merge RepositoryController#changes and RepositoryController#revisions ?

#18 Updated by Jean-Philippe Lang about 8 years ago

Etienne Massip wrote:

Actually, if a branch is selected, then the only link displayed should be "View revisions" so you'll get all revisions for the branch / directory pair. The only case the "View all revisions" would be used is with the pair "all branches /root", whichever SCM

I agree. We should never display both 'View all revisions' and 'View revisions'.
For example with subversion, we should not display the 'View all revisions' when inside a directory. It doesn't really makes sense and makes the 2 links quite confusing.

Proposed patch:

Index: app/views/repositories/show.rhtml
===================================================================
--- app/views/repositories/show.rhtml    (revision 5219)
+++ app/views/repositories/show.rhtml    (working copy)
@@ -20,19 +20,17 @@
                           :revisions => @changesets, :entry => nil }%>
 <%   end %>
 <p>
-<%   if @repository.supports_all_revisions? %>
-<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %>
-<%   end %>
 <%
      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',
                    :path => to_path_param(@path), :id => @project %>
-<%   end %>
+<%   elsif @repository.supports_all_revisions? %>
+<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project %>
+<% end %>
 </p>

 <%   if true # @path.blank? %>

And, btw, can't we use only one link and merge RepositoryController#changes and RepositoryController#revisions ?

They're not exactly the same, #changes retrives the commits from the scm, #revisions from the database which is way faster. #revisions can be used to display all revisions but not so usefull to get a file/directory history.

#19 Updated by Etienne Massip about 8 years ago

Jean-Philippe Lang wrote:

They're not exactly the same, #changes retrives the commits from the scm, #revisions from the database which is way faster. #revisions can be used to display all revisions but not so usefull to get a file/directory history.

Thought the fetch from the SCM was done when displaying the page ?

#20 Updated by Toshi MARUYAMA almost 8 years ago

r5609 behaviors.

Subversion

Root

Branches

Root with revision

Mercurial

https://bitbucket.org/redmine/redmine-all

Root

Root of 1.1-stable branch

"app" dirctory of 1.1-stable branch

#21 Updated by Toshi MARUYAMA almost 8 years ago

Etienne Massip wrote:

Jean-Philippe Lang wrote:

They're not exactly the same, #changes retrives the commits from the scm, #revisions from the database which is way faster. #revisions can be used to display all revisions but not so usefull to get a file/directory history.

Thought the fetch from the SCM was done when displaying the page ?

To get tag history, Redmine calls "svn log http://redmine.rubyforge.org/svn/tags/1.1.3".

#22 Updated by Etienne Massip almost 8 years ago

I think there is still some confusion around the way revisions are handled, but maybe no more than in 1.1.

Also, adding support for SVN/CVS branches and tags would gives the reposityory tab screens a common behavior with other SCMs, I can open an issue if this makes sense to you ?

#23 Updated by Toshi MARUYAMA almost 8 years ago

Etienne Massip wrote:

Also, adding support for SVN/CVS branches and tags would gives the reposityory tab screens a common behavior with other SCMs,

Redmine Subversion repository layout is standard "trunk", "branches" and "tags".
But, if Subversion repository layout is not standard layout, user need to specify branches and tags path.

I can open an issue if this makes sense to you ?

I added related issues.

#24 Updated by Toshi MARUYAMA almost 8 years ago

But, if Subversion repository layout is not standard layout, user need to specify branches and tags path.

Redmine Mercurial mirror uses HgSubversion.
Hgsubversion detects source:sandbox/rails-2.2 and source:sandbox/rails-2.3 are branches.

$ hg branches
default                     5597:ae4eb29fea6b
1.1-stable                  5582:53eba1bc3a40
1.0-stable                  4955:d10103f89c1a
0.9-stable                  3853:72aedf7ef5fb
0.8-stable                  3304:3c08d4d012e0
../sandbox/rails-2.3        2618:d79f3571761c
../sandbox/rails-2.2        2479:12f541caa4ed
0.7-stable                  2194:fe4e88bbd556
0.6-stable                  1242:04c936a7eed4

If Redmine shows "rails-2.2" and "rails-2.3" as brances,
user need to specify source:branches and source:sandbox are branches directories.

#25 Updated by Toshi MARUYAMA over 7 years ago

  • Priority changed from High to Normal

Also available in: Atom PDF