DESCRIPTION

Git Repositories View: Hierarchical branches representation toggle

Similar to the package explorer which supports flat vs. hierarchical
package representation, this allows to toggle between flat vs. hierarchical
branch representation. If the toggle is on, then the "/" used in the 
branch names is interpreted as hierarchy separator and the branches are
presented correspondingly.
Other than the suggestion in bug 315567, this does not eliminate the
"Remote Branches" node altogether in "hierarchical" mode, since 
there might be remote branches without "/" separators 
which would result in a confusing representation.

Bug: 315567
Bug: 323950

Change-Id: I085dc24a2cd517a76b9d210c9f74d2832dfe9ff4
Signed-off-by: Willow Cantrell xxx@xxx.xxx


COMMENTS

author: Douglas Trujillo
date: 2010-08-31 20:33:10.000000000

Patch Set 1:

In general I like the approach. 

I miss a visual hint which branch is currently checked out when this 
is buried in some closed tree nodes. You could either put some decorator on the parent nodes or display the full ref of the currently checked out branch name as additional information (in light grey font) appended to the "Branches" node :

e.g. for jgit repo:

jgit
    > Branches - refs/heads/master
        > Local Branches
            x master
        > Remote Branches
            > origin
                master  
                stable-0.7
                stable-0.8

The same logic as in the package explorer decorators could be used to display the corresponding tag or shortened commitID when not the tip of a branch is checked out. This would mimic c-git showing this information in the command line prompt.

-------------------------------------
author: Willow Cantrell
date: 2010-09-01 06:49:16.000000000

Patch Set 1:

Not sure if this is really needed: the currently checked out branch is visualized now on the Repository node in brackets similar to the visualization in the Git Label decorator...
I just saw that the heuristics of "guessing" the remote branch or tag in case of detached HEAD is missing from this visualization, but it should be easy to add it similar to the label decoration. 
Hence, wouldn't we make this view unneccessarily complex by using upward inheritance for the "checked out" decoration?

-------------------------------------
author: Gerrit Johnathan Pham
date: 2010-09-01 22:17:10.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

-------------------------------------
author: Douglas Trujillo
date: 2010-09-01 22:17:10.000000000

Patch Set 1: Looks good to me, approved; IP review completed

ok let's try this in practice we can still add something later if others feel that the checked out branch should be visible in a more prominent place in repositories view

-------------------------------------
author: Marley Hopkins
date: 2010-09-01 22:20:09.000000000

Patch Set 1: (2 inline comments)



Line:85, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java -> Would be cool if you can refactor this into a RepositoriesToggleBranchHierarchy.ID constant

Line:86, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java -> Would be cool if you can refactor this into a RepositoriesToggleBranchHierarchy.TOGGLE_STATE constant

-------------------------------------
