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

Bug 336492

Summary: Unable to create local branch when changing Pull Strategy then reverting to 'none'
Product: [Technology] EGit Reporter: Robert Munteanu <robert.munteanu>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: mathias.kinzler
Version: 0.11   
Target Milestone: 0.11-M1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Robert Munteanu CLA 2011-02-07 06:41:28 EST
What steps will reproduce the problem?

1. Click Team -> Branch ...
2. Select a local branch and click New Branch...
3. Fill in a branch name
4. In the Pull Strategy container, click Merge (or Rebase) and then click none
5. Click finish

An error dialog pops up . The details are below.

Running 
JGit v0.10.1-145-g116ff37
EGit v0.10.1-204-gd506d78

-- Error Details --
Date: Mon Feb 07 13:36:00 EET 2011
Message: Branch could not be created
Severity: Error
Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.egit.ui
Session Data:
eclipse.buildId=M20100909-0800
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product


Exception Stack Trace:
org.eclipse.core.runtime.CoreException:
at org.eclipse.egit.core.op.CreateLocalBranchOperation$1.run(CreateLocalBranchOperation.java:105)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.egit.core.op.CreateLocalBranchOperation.execute(CreateLocalBranchOperation.java:125)
at org.eclipse.egit.ui.internal.repository.CreateBranchPage.createBranch(CreateBranchPage.java:395)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard$1.run(CreateBranchWizard.java:69)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard.performFinish(CreateBranchWizard.java:63)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.dialogs.BranchSelectionDialog$2.widgetSelected(BranchSelectionDialog.java:123)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.branch.BranchOperationUI.start(BranchOperationUI.java:86)
at org.eclipse.egit.ui.internal.actions.BranchActionHandler.execute(BranchActionHandler.java:29)
at org.eclipse.egit.ui.internal.actions.RepositoryAction.run(RepositoryAction.java:85)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
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$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NullPointerException
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:430)
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:423)
at org.eclipse.jgit.api.CreateBranchCommand.call(CreateBranchCommand.java:149)
at org.eclipse.egit.core.op.CreateLocalBranchOperation$1.run(CreateLocalBranchOperation.java:103)
... 59 more


-- Error Details --
Date: Mon Feb 07 13:36:00 EET 2011
Message: 
Severity: Error
Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.egit.core
Exception Stack Trace:
java.lang.NullPointerException
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:430)
at org.eclipse.jgit.lib.Repository.resolve(Repository.java:423)
at org.eclipse.jgit.api.CreateBranchCommand.call(CreateBranchCommand.java:149)
at org.eclipse.egit.core.op.CreateLocalBranchOperation$1.run(CreateLocalBranchOperation.java:103)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.egit.core.op.CreateLocalBranchOperation.execute(CreateLocalBranchOperation.java:125)
at org.eclipse.egit.ui.internal.repository.CreateBranchPage.createBranch(CreateBranchPage.java:395)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard$1.run(CreateBranchWizard.java:69)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
at org.eclipse.egit.ui.internal.repository.CreateBranchWizard.performFinish(CreateBranchWizard.java:63)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.dialogs.BranchSelectionDialog$2.widgetSelected(BranchSelectionDialog.java:123)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.egit.ui.internal.branch.BranchOperationUI.start(BranchOperationUI.java:86)
at org.eclipse.egit.ui.internal.actions.BranchActionHandler.execute(BranchActionHandler.java:29)
at org.eclipse.egit.ui.internal.actions.RepositoryAction.run(RepositoryAction.java:85)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
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$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Mathias Kinzler CLA 2011-02-08 03:09:23 EST
It looks like you have used the very very first 0.11 version... To me it looks like

http://egit.eclipse.org/r/#change,2419

should fix this. Could you please try again with a current 0.11 (at the time of writing, this would be 0.11.0.201102071227)?
Comment 2 Robert Munteanu CLA 2011-02-08 03:21:51 EST
I'm currently building my own based on master, but I will try from 0.11 and let you know.
Comment 3 Robert Munteanu CLA 2011-02-08 03:53:17 EST
Works fine when building from 0.11.
Comment 4 Mathias Kinzler CLA 2011-02-09 05:47:17 EST
So can we close this?
Comment 5 Robert Munteanu CLA 2011-02-09 06:27:26 EST
Yes. I didn't close it since I don't know if there is a bug tracking the original change or it should be just set to fixed.
Comment 6 Mathias Kinzler CLA 2011-02-09 10:59:34 EST
Fix was merged into 0.11 stable as 6bfa7be26b140e222f8846c8ff561241c7c9caa9
It will be merged back into master once 0.11 is out.