DESCRIPTION

Squash merge commits in Merge wizard

Bug: 382720
Change-Id: Ib8670fbe849ece2b5436255dc408b7dfa5ebdeaa


COMMENTS

author: Clay Cameron
date: 2012-08-16 16:51:39.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2012-08-16 16:51:45.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3260/ 

-------------------------------------
author: Brenden Conley
date: 2012-08-16 17:05:58.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3260/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2012-08-16 22:42:27.000000000

Patch Set 2: I would prefer that you didn't submit this

(5 inline comments)

This option can only be set if merge is started from team menu, but not from repositories and history view. Maybe we should also allow to set this option when merging from repositories view and history view.

Line:148, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> unrelated formatting change

Line:151, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> trailing whitespace

Line:168, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> style nit: no braces around single line blocks

Line:4, org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java -> trailing whitespace

Line:969, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> I'd add a short description what squash means to this dialog

-------------------------------------
author: Clay Cameron
date: 2012-08-17 08:19:56.000000000

Patch Set 2:

How about placing the options in a twistie? Collapsed by default. I don't think they should be shown to the user each time.

-------------------------------------
author: Clay Cameron
date: 2012-08-17 12:21:49.000000000

Patch Set 2:

> Maybe we should also allow to set this option when merging from repositories view and history view.

The thing is that merging initiated from repos or history view is a one-click action, no wizard involved.

Since I totally agree squashing should be an option there I can think of at least 3 solutions:
- open the wizard (with populated fields/selection), this is going to be two-click op
- convert Merge action into a menu with two subactions: Commit (regular merge) and Squash, expand + click
- add Merge Squash action below Merge, still one click

-------------------------------------
author: Danika Greer
date: 2012-08-19 14:56:19.000000000

Patch Set 2:

Because we're maybe going to have more options for merge (e.g. strategy options), I'd prefer to have a plain and fast "Merge" entry (like now), and an Advanced entry, which will open the dialog.

Maybe the advanced entry could be in a new Advanced submenu, as "Merge...". There could also be a "Rebase..." entry there in the future.

We have to take care that the menu will not get much bigger than it already is.

-------------------------------------
author: Carlie Harper
date: 2012-08-20 13:00:41.000000000

Patch Set 2:

+1 for keeping the plain and fast "Merge" entry.

What about having the "Merge..." entry next to "Merge" when a (non checked out) branch is selected in the Repo view or a (non checked out) commit in the History View? It would open the wizard, but now with populated fields/selection.

When we put "Merge..." in an "Advanced" submenu in this case, but directly into the menu in all other cases, wouldn't that be inconsistent? Maybe not, but I'm not sure.

However, I would do that in an additional change, because with this change everything works fine. And the dialog for "Merge..." in the History View would be some effort, because we then would have to offer Commits instead of branches. Or alternatively, we could hide the branch/commit selection (because the user already has selected that) and just present the additional options?

-------------------------------------
author: Clay Cameron
date: 2012-08-20 13:57:25.000000000

Patch Set 2:

How about replacing Group with ExpandableComposite? Is it worth the hassle* in your opinion?

* Updating the UI test will require some additional work since there seems to be no support for ExpandableComposite in SWTBot.

-------------------------------------
author: Clay Cameron
date: 2012-08-24 11:03:02.000000000

Patch Set 2: (5 inline comments)

All inline comments marked as Done. I sticked to the Group (didn't introduce an expandable composite) in the latest patch, also I didn't touch the menu entry but I'm eager to work on this in a separate patch as Stefan suggested.

Line:148, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> Done

Line:151, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> Done

Line:168, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/FetchAndMergeActionTest.java -> Done

Line:4, org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java -> Done

Line:969, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> Done

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