Bug 375328 - Re-importing projects into workspace fails to connect with repository
Summary: Re-importing projects into workspace fails to connect with repository
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 10:00 EDT by Alexander Weickmann CLA
Modified: 2012-05-07 04:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Weickmann CLA 2012-03-26 10:00:44 EDT
Build Identifier: Build id: 20110916-0149

When deleting a project from the workspace that is located in a local git repository, and re-importing the project into the workspace, the connection to the repository is not established.

The actions under Team are missing. The Package Explorer does not show in brackets in which git repository the project is located.

Workaround:
1. Delete git repository
2. Clone git repository once again
3. Import project from git repository

Reproducible: Always

Steps to Reproduce:
1. Clone a git repository
2. Import a project from that git repository
3. Delete the project from your workspace (but not on your disk)
4. Import project again from that git repository
5. Open context menu of project and go to Team submenu
6. The Git team actions are missing
7. Restart Eclipse
8. The project is still not connected to the git repository
Comment 1 Alexander Weickmann CLA 2012-03-26 10:18:06 EDT
The workaround does not always work. An actual workaround is to use Share project on the projects in the workspace and connect them to the git repository (even though the projects were already imported from the git repository).
Comment 2 Matthias Sohn CLA 2012-05-02 18:41:15 EDT
- which EGit version ?
- any suspicous errors in the error log ?
- is auto-sharing enabled (Preferences > Team > Git > Projects) ?
Comment 3 Alexander Weickmann CLA 2012-05-07 04:10:41 EDT
- which EGit version ?
  1.3.0.201202151440-r

- any suspicous errors in the error log ?
  yes, actually there is a NPE, see below

- is auto-sharing enabled (Preferences > Team > Git > Projects) ?
  no, it is disabled



java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.clone.GitImportWizard$1.setVisible(GitImportWizard.java:63)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1260)
	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1226)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:150)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
	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:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	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(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: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)