Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341996 - When importing a project based on searching a given repo, import wizard fails silently.
Summary: When importing a project based on searching a given repo, import wizard fails...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 05:52 EDT by Ken Gilmer CLA
Modified: 2011-07-01 18:43 EDT (History)
2 users (show)

See Also:


Attachments
Patch to UI aspect if issue described in bugzilla. (3.59 KB, patch)
2011-04-06 05:54 EDT, Ken Gilmer CLA
no flags Details | Diff
Screenshot of new UI in failure condition. (36.67 KB, image/png)
2011-04-06 05:55 EDT, Ken Gilmer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Gilmer CLA 2011-04-06 05:52:47 EDT
Build Identifier: 20110301-1815

Repo tool generates git files that the search feature finds in the Import Git Repositories wizard.  When selecting one of these repos, the following unchecked exception is sent to the error log but the wizard is left in an invalid state.  The user is allowed to continue, not knowing there is a problem.

Exception:
org.eclipse.jgit.errors.NoWorkTreeException: Bare Repository has neither a working tree, nor an index
at org.eclipse.jgit.lib.Repository.getWorkTree(Repository.java:1043)
at org.eclipse.egit.ui.internal.clone.GitSelectWizardPage.getPath(GitSelectWizardPage.java:113)
at org.eclipse.egit.ui.internal.clone.GitImportWizard.getNextPage(GitImportWizard.java:116)
at org.eclipse.jface.wizard.WizardPage.getNextPage(WizardPage.java:172)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:887)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:426)
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.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:147)
...


Reproducible: Always

Steps to Reproduce:
1. Use Import Projects from Git, select a directory in which the repo tool was used
2. After search finds all repositories, go to next page.
3. Notice overlap of real git repos and ".repo/xxx/yyy" repos.  (I'm assuming they are invalid, but not certain)
4. Try to import one of these ".repo" git repositories.
Comment 1 Ken Gilmer CLA 2011-04-06 05:54:43 EDT
Created attachment 192626 [details]
Patch to UI aspect if issue described in bugzilla.

My first attempted contribution to egit project.  While I did read through the contribution guide, I'm probably missing something...
Comment 2 Ken Gilmer CLA 2011-04-06 05:55:33 EDT
Created attachment 192627 [details]
Screenshot of new UI in failure condition.
Comment 3 Matthias Sohn CLA 2011-04-19 05:31:44 EDT
Please upload the patch to Gerrit code review as described in [1]

[1] http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 4 Ken Gilmer CLA 2011-04-19 06:12:37 EDT
Hi Matthias,

  I followed the instructions and setup a gerrit account, agreed to the terms, configured the remotes, etc..  I tried to push for review:

$ git push review
Counting objects: 70, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (46/46), 3.29 KiB, done.
Total 46 (delta 26), reused 0 (delta 0)
To ssh://kgilmer@egit.eclipse.org:29418/egit.git
 ! [remote rejected] HEAD -> refs/for/master (you are not author kgilmer@gmail.com)
error: failed to push some refs to 'ssh://kgilmer@egit.eclipse.org:29418/egit.git'

Not sure why I'm getting that error...

$ git config --get user.email
kgilmer@gmail.com

I'm new to gerrit, please advise on what I'm doing wrong.

thx
ken
Comment 5 Matthias Sohn CLA 2011-04-19 09:29:24 EDT
See the corresponding Gerrit error explanation [1]. 

Gitweb on android is a bit slow-ish, so be patient until the page loads.

[1] https://android.git.kernel.org/?p=tools/gerrit.git;a=blob;f=Documentation/error-you-are-not-author.txt;h=47a76528fcb18ffbc5edc05557eed9964f1c72c4;hb=a9d1575535519fa37a56079f75922f4a0aeb8ade
Comment 6 Christian Halstrick CLA 2011-06-29 04:44:18 EDT
Hi Ken,

did you manage to upload the patch to gerrit? Should I help?

Ciao
  Chris
Comment 7 Ken Gilmer CLA 2011-06-30 21:17:21 EDT
Hi Chris,

  I just checked and yes this is still happening in Indigo.  I'll submit the patch via gerrit.

thx
ken
Comment 8 Ken Gilmer CLA 2011-07-01 05:21:12 EDT
Ok, it's been pushed to gerrit:

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

Although I see a merge in there...not sure how that got in there, or how to remove it.  It's been awhile since I've been working on this.  LMK if I need to do anything else to the patch.
Comment 9 Ken Gilmer CLA 2011-07-01 18:43:27 EDT
After getting Matthias Sohn's comment regarding the commit history, I started with a fresh workspace, rebuilding everything from source.  I then manually merged the relevant changes in, a few lines of code.  In testing I found that the initial error is now caught earlier in the Import wizard, in that a ".repo" repository is not visible in the dialog when using the "Add" action.  That I was able to do this in my old workspace would lead me to think it was using cached data from a previous version of the plugin and is no longer a defect in the current version.  So, I'd say this is fixed in 1.0, and marking the bug as such.  I would revoke the gerrit submission but I either can't find the option or it's not available to me.