Bug 424115 - Create patch throws exception when I choose Workspace
Summary: Create patch throws exception when I choose Workspace
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 07:22 EST by Adam Lock CLA
Modified: 2013-12-16 07:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Lock CLA 2013-12-16 07:22:34 EST
I have a developer in my team who is trying to submit a patch for review and it is throwing an exception. They need to create a patch in workspace format so somebody else can apply the patch to their working directory.

This is the steps to reproduce:

1. Create a branch A and add some RCP plugins to it 
2. Create another branch B from A and delete some of the added RCP plugins, commit.
3. Checkout A and create new branch TMP
4. Squash merge B into TMP and commit
5. Right mouse and Create Patch... from history view of this commit.
6. In Create Patch... dialog, choose Workspace as output format.
7. The Finish button doesn't appear to do anything but exceptions appear in the Error Log which show an exception has been thrown

Is there a workaround for this? 

This is the stack trace we see in our Error log. It looks to be a problem with a missing plugin and its .classpath file.

java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard.performFinish(GitCreatePatchWizard.java:164)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
	at org.eclipse.jface.window.Window.open(Window.java:802)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard.run(GitCreatePatchWizard.java:114)
	at org.eclipse.egit.ui.internal.patch.PatchOperationUI.start(PatchOperationUI.java:96)
	at org.eclipse.egit.ui.internal.history.command.CreatePatchHandler.execute(CreatePatchHandler.java:31)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:837)
	at org.eclipse.ui.menus.CommandContributionItem.access$21(CommandContributionItem.java:823)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:813)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Caused by: java.lang.IllegalArgumentException: Could not find project for com.pilz.pas.automap.io2profibus.nl1/.classpath in repository Repository[C:\Dev\head\pas4000\.git]
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.egit.core.op.CreatePatchOperation.getProject(CreatePatchOperation.java:263)
	at org.eclipse.egit.core.op.CreatePatchOperation.getProject(CreatePatchOperation.java:256)
	at org.eclipse.egit.core.op.CreatePatchOperation.access$2(CreatePatchOperation.java:253)
	at org.eclipse.egit.core.op.CreatePatchOperation$2.format(CreatePatchOperation.java:195)
	at org.eclipse.egit.core.op.CreatePatchOperation.execute(CreatePatchOperation.java:233)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard$1.run(GitCreatePatchWizard.java:168)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Root exception:
java.lang.IllegalArgumentException: Could not find project for com.pilz.pas.automap.io2profibus.nl1/.classpath in repository Repository[C:\Dev\head\pas4000\.git]
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.egit.core.op.CreatePatchOperation.getProject(CreatePatchOperation.java:263)
	at org.eclipse.egit.core.op.CreatePatchOperation.getProject(CreatePatchOperation.java:256)
	at org.eclipse.egit.core.op.CreatePatchOperation.access$2(CreatePatchOperation.java:253)
	at org.eclipse.egit.core.op.CreatePatchOperation$2.format(CreatePatchOperation.java:195)
	at org.eclipse.egit.core.op.CreatePatchOperation.execute(CreatePatchOperation.java:233)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard$1.run(GitCreatePatchWizard.java:168)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)