Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359581

Summary: [client][status] Unstage a group of files.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: GitAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, mamacdon, simon_kaegi, Szymon.Brandys, tomasz.zarna
Version: unspecified   
Target Milestone: 0.3 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 359578    
Bug Blocks: 359404    
Attachments:
Description Flags
Draft patch
none
Proposed fix none

Description libing wang CLA 2011-09-30 11:43:31 EDT
At comment 1 in bug 356130, I mentioned that unstaging selected file was blocked by bug 347776. Given that this bug was fixed, we have to enable the multiple selection in the staged area now.
In order to support this we need server support first. I've opened bug 359578 to request this.
For details on the UI side please refer to bug 356139.
Comment 1 Szymon Brandys CLA 2011-10-04 04:41:37 EDT
(In reply to comment #0)
> At comment 1 in bug 356130, I mentioned that unstaging selected file was
> blocked by bug 347776. Given that this bug was fixed, we have to enable the
> multiple selection in the staged area now.
> In order to support this we need server support first. 

Is it something for .3? The server side was addressed by Tomek some time ago.
Comment 2 libing wang CLA 2011-10-04 08:27:59 EDT
Mark, we discussed if Jay can take this. Please comment or reassign to him.
Comment 3 Mark Macdonald CLA 2011-10-04 09:51:48 EDT
Jay was looking for some small stuff to get him acquainted with the Orion JS codebase. I pinged him about Bug 359404.

Jay: are you interested/able to look at this bug too? If not, Libing will take it.
Comment 4 Jay Arthanareeswaran CLA 2011-10-05 01:21:32 EDT
(In reply to comment #3)
> Jay was looking for some small stuff to get him acquainted with the Orion JS
> codebase. I pinged him about Bug 359404.
> 
> Jay: are you interested/able to look at this bug too? If not, Libing will take
> it.

Sure, I will take a look at these both.
Comment 5 Jay Arthanareeswaran CLA 2011-10-07 07:43:25 EDT
Created attachment 204740 [details]
Draft patch

Draft version.

The patch could be improved: for instance, the stage all and unstage all checkboxes remain selected but the individual items get deselected. It's an existing one for unstaged section, but can be fixed for both sections.
Comment 6 libing wang CLA 2011-10-07 11:57:12 EDT
(In reply to comment #5)
> Created attachment 204740 [details]
> Draft patch
> 
> Draft version.
> 
> The patch could be improved: for instance, the stage all and unstage all
> checkboxes remain selected but the individual items get deselected. It's an
> existing one for unstaged section, but can be fixed for both sections.

I looked at the bug and tried it. It worked well but the check box was not cleaned well. Bu given that bug 359404 is not fixed yet , this is not a big deal though.
I HOPE both bugs will be released in the same time.
Comment 7 libing wang CLA 2011-10-07 12:00:40 EDT
My fingers didn't follow my mind:
I really meant :
I Looked at the patch.
I hope the fixed to be released, not the bugs.
Comment 8 Jay Arthanareeswaran CLA 2011-10-08 01:28:50 EDT
(In reply to comment #7)
> My fingers didn't follow my mind:
> I really meant :
> I Looked at the patch.
> I hope the fixed to be released, not the bugs.

Did you mean the remaining issues be fixed with the bug #359404 and that I can go ahead and release this patch?
Comment 9 Jay Arthanareeswaran CLA 2011-10-10 13:29:34 EDT
(In reply to comment #8)
> Did you mean the remaining issues be fixed with the bug #359404 and that I can
> go ahead and release this patch?

Okay, never mind. I will soon post a patch fixing the bug 359404. Since the fix is dependent on the previous patch, I guess I will make the bug 359404 dependent on this one.
Comment 10 Jay Arthanareeswaran CLA 2011-10-10 13:50:27 EDT
Created attachment 204896 [details]
Proposed fix

In addition to the changes in the previous patch, this patch contains fix for the issues mentioned under bug 359404 as well. Couple of notes on the patch:

1. I was tempted to move the GitStatusTableRenderer.renderAction and updateCheckbox (newly added) in to a single method since they are called under similar circumstances. But in the end kept the changes minimal.

2. There was a bit of inconsistency in selecting/deselecting the stage all check box when things are moved between staged and Unstaged sections. This patch consistently deselects both the stage all and unstage all check boxes. Please let me know if this is not the behavior we prefer.
Comment 11 libing wang CLA 2011-10-11 14:37:14 EDT
(In reply to comment #10)
> Created attachment 204896 [details]
> Proposed fix
> 
> In addition to the changes in the previous patch, this patch contains fix for
> the issues mentioned under bug 359404 as well. Couple of notes on the patch:
> 
> 1. I was tempted to move the GitStatusTableRenderer.renderAction and
> updateCheckbox (newly added) in to a single method since they are called under
> similar circumstances. But in the end kept the changes minimal.
> 
> 2. There was a bit of inconsistency in selecting/deselecting the stage all
> check box when things are moved between staged and Unstaged sections. This
> patch consistently deselects both the stage all and unstage all check boxes.
> Please let me know if this is not the behavior we prefer.

I looked at the patch and tied it out.
I went through several work flows I always had before, works fine for me.
+1 from me and I think it is good for RC2.
Comment 12 libing wang CLA 2011-10-12 16:17:13 EDT
fixed with 5256bd017e9916fcee6f2b69b887a0f404337476.
Thanks Jay for fixing this.