DESCRIPTION

Add a 'Staging' view to streamline the workflow of staging changes

Git's staging area is one of its most powerful features. This view
provides users with the ability to drag-and-drop files between
nodes to place modified or untracked files into the staging area.
Such an operation would be synonymous to adding the modified files
to the index and tracking the untracked files. Other operations
like committing is also possible from the view's context menu.

[ms]:
- rebased to current master
- fix unhandled InvocationTargetException in StagingView.java

CQ: 4125
Bug: 313263
Change-Id: I5fb81a1811cf6f2aff22016438c664fc5014b9a5
Signed-off-by: Douglas Trujillo xxx@xxx.xxx


COMMENTS

author: Douglas Trujillo
date: 2010-05-19 00:15:08.000000000

Uploaded patch set 3.

-------------------------------------
author: Jaylon Avila
date: 2010-05-19 00:25:37.000000000

Patch Set 3: No score

Never mind, looks like that can only be bypassed if I worked for, say, Google or SAP. ;)

-------------------------------------
author: Douglas Trujillo
date: 2010-05-19 08:44:20.000000000

Patch Set 3: No score; No score

figure 2 in http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf
says:

Written 100% by employees
of the same employer as the
Submitting Committer: (a)
under the supervision of the
PMC; and (b) where the
employer has signed a
Member Committer
Agreement.

I think the first condition is not met in your case since none of the EGit committers is employed by IBM (yet;-)

-------------------------------------
author: Rocco Fowler
date: 2010-05-20 07:54:35.000000000

Patch Set 3: No score

Honestly, I'm not sure a CQ is necessary. Figure 1 makes a distinction between "Submitting Committer" and "Committer on same Project". To me Remy is a "Submitting Committer" because he already *is* an Eclipse committer. He is not a committer on EGit/JGit but he is an Eclipse committer. 

I'll get a confirmation on my interpretation and get back to you.

-------------------------------------
author: Rocco Fowler
date: 2010-05-20 14:33:51.000000000

Patch Set 3:

Alright, just got clarification. You'll need a CQ. The legal poster talks about Bugzilla and all source in Bugzilla. I think it's ok to have it in Gerrit. The code (patch + all files) need to be attached to a CQ anyway.

Remy, I assume you got the image from an existing Eclipse project?

-------------------------------------
author: Carlie Harper
date: 2010-05-20 14:59:41.000000000

Patch Set 3: No score; No score

The handling of files that are both staged and dirty has issues:

- The entry in "Modified" has no decorator in this case.
- double clicking on the entry in "Staged" opens a compare view which compares the content of the working tree file with the HEAD, I would expect a comparison of the staged content with the head, however, there is no action for this yet.
- "Compare With -> ..." does not the right thing on a staged entry (if it is also dirty), it should compare the staged content with the head

An alphabetic ordering of the repositories would be nice.

I think that it is not a problem that unstaging is not yet possible. The view is useful nevertheless.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:19:29.000000000

Patch Set 3: I would prefer that you didn't submit this; No score

Double-clicking the Staged icon the first time gave me an error much little information, but the error log have this

Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.eclipse.egit.ui.internal.staging.StagingView.getNodeChildren(StagingView.java:525)
at org.eclipse.egit.ui.internal.staging.StagingView.access$4(StagingView.java:516)
at org.eclipse.egit.ui.internal.staging.StagingView$2.getChildren(StagingView.java:200)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1352)

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:20:16.000000000

Patch Set 3:

Listing all files under "modified" makes this view not much different from the project view. If would be quite useful if only modified files were listed. Ideally with the option of a flat listing, but that's extra can be bolted on later.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:21:19.000000000

Patch Set 3:

Since the view seems to cover the whole repo I would expect files outside the projects to be shown too.

-------------------------------------
author: Jaylon Avila
date: 2010-05-20 22:33:29.000000000

Patch Set 3:

Gunnar, I got the image from Team's plug-in or the CVS plug-in.

Stefan, you're right, we don't have an action yet for that. That seems like another action we'd have to implement. Though at the moment, it's not possible to commit only staged changes...so I guess we need an action for that too. ;) I thought the modified/staged entry would have modifiers but maybe my memory is off. I'll have to try it later. The 'Compare With...' is just contributed from the EGit code. Everything from the context menu is standard stuff from Eclipse or EGit. We'd have to correct them individually.

Robin, it should be only listing "dirty" files. Could you rephrase your comment? The view is pretty much the same as a view of your workspace, except that it's filtered for dirty and staged files. Showing files outside the Eclipse workspace I guess would be doable. That's also a problem the synchronization feature would need to consider now that I think about it.

-------------------------------------
author: Malia Sampson
date: 2010-05-26 15:23:36.000000000

Patch Set 3: No score; No score

Now that Remy is a committer, we can now bypass the IP process. If folks wanted this in for 0.8.0, there's a bit of time left to do some polish.

-------------------------------------
author: Marlie Beasley
date: 2010-06-02 15:32:22.000000000

Patch Set 3: No score

Good idea!

But I would prefer to show the staged files in tables. E.g. one table for modified/staged files and a second for untracked files. The repository could be chosen with a drop down on top of the view.

-------------------------------------
author: Danika Greer
date: 2011-05-14 11:04:14.000000000

Patch Set 3:

This can be abandoned now that I7d78aff4db32d864ac0410a178bad149c45b6440 is in, right?

-------------------------------------
author: Imani Waller
date: 2011-05-14 13:05:54.000000000

Patch Set 3:

Yes.

-------------------------------------
author: Douglas Trujillo
date: 2011-05-15 00:19:21.000000000

Patch Set 3: Abandoned

was further improved in change: I7d78aff4db32d864ac0410a178bad149c45b6440 and this was merged into master recently

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:64, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/ResourceNode.java -> I would say return 31 * root.hashCode() + resource.hashCode()
and add an equals method.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:23, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagedNode.java -> Why shouldn't this text be i18n;able?

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:898, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Either add the NLS stuff or leave out the NON-NLS stuff so others people can find these strings. Having a warning is meaningful.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:936, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> i18N-ab le string. Do not silence warning.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:54, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StatusNode.java -> probably not terribly important, but I guess you meant

 return 31 * getClass().getName().hashCode() + repository.hashCode(

But worse is that you don't have an equals. Defining hashCode
without equals make little sense to me.

-------------------------------------
author: Juliet Cantu
date: 2010-05-20 20:34:59.000000000

MISMATCHED INLINE COMMENT
Line:1, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/BranchSelectionDialog.java.orig -> Delete this file

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