DESCRIPTION

Added checkbox to commit dialog so that one can also push changes after
committing.

Bug: 330048
Change-Id: I70156b722cd5498fddad57cdd978004b94c259ff
Signed-off-by: Brendon Russo xxx@xxx.xxx


COMMENTS

author: Alana York
date: 2011-09-21 16:27:02.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2011-09-21 16:27:06.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2011-09-21 16:42:32.000000000

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1643/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2011-09-22 11:15:05.000000000

Patch Set 5: No score

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

-------------------------------------
author: Brenden Conley
date: 2011-09-22 11:26:35.000000000

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1650/ : UNSTABLE

-------------------------------------
author: Douglas Trujillo
date: 2011-09-22 11:34:30.000000000

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

(2 inline comments)

I hit the following exception when trying to push to my sample repository on github, note: I am using ssh with key pair and a passphrase


eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.platform.ide
Command-line arguments:  -product org.eclipse.platform.ide -data /Users/d029788/Documents/workspace/egit/../runtime-EGit -dev file:/Users/d029788/Documents/workspace/egit/.metadata/.plugins/org.eclipse.pde.core/EGit/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog

Error
Thu Sep 22 13:30:57 CEST 2011
Could not execute command "org.eclipse.egit.ui.team.SimplePush" since there's no valid selection

org.eclipse.core.commands.ExecutionException: Could not execute command "org.eclipse.egit.ui.team.SimplePush" since there's no valid selection
	at org.eclipse.egit.ui.internal.actions.CommitActionHandler.executePushCommand(CommitActionHandler.java:78)
	at org.eclipse.egit.ui.internal.actions.CommitActionHandler.execute(CommitActionHandler.java:64)
	at org.eclipse.egit.ui.internal.actions.RepositoryAction.run(RepositoryAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3971)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Line:1038, org.eclipse.egit.ui/plugin.xml -> why is this required for this change ?

Line:7, /COMMIT_MSG -> style nit: header is too long, find a shorter header and put the rest into the commit message body.

-------------------------------------
author: Alana York
date: 2011-09-22 12:13:14.000000000

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

(2 inline comments)

obviously need to investigate the error matthias is experiencing when pusing to github.

Line:1038, org.eclipse.egit.ui/plugin.xml -> since we execute the push command when the user chooses to push (checkbox checked in commit dialog) we need the appropriate handler to be active at that point. You can commit while selecting a file, but in the original <activeWhen /> expression the simple push handler would be inactive in this particular case. We therefore have to make it active then, too
xxx@xxx.xxx bug you reported in patch set 1)

Line:7, /COMMIT_MSG -> afaik this is the commit message (and not the header)

-------------------------------------
author: Douglas Trujillo
date: 2011-09-22 12:45:51.000000000

Patch Set 5: (1 inline comment)



Line:7, /COMMIT_MSG -> the first line of the commit message is considered the commit message's header and is displayed e.g. by 

 $git shortlog

also see http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines

-------------------------------------
author: Douglas Trujillo
date: 2011-09-22 20:36:26.000000000

Patch Set 5:

I did some more tests and found that this exception occurs when I edit a class and then, while the selection is in the Java editor click the "Commit" button in the main workbench toolbar. 

To enable the git buttons in the main toolbar right click the toolbar area, click "Customize perspective...", "Command Group Availability", "Git".

The exception is thrown since at org.eclipse.egit.ui.internal.actions.CommitActionHandler.executePushCommand(CommitActionHandler.java:78) doesn't expect a TextSelection.

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