chrono028 / mercurialeclipse

Automatically exported from code.google.com/p/mercurialeclipse
Other
0 stars 0 forks source link

Import doesn't add project to the workspace #52

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Import -> Clone Existing Mercurial Repository
2. Select a repository
3. Finish

What is the expected output? What do you see instead?
I expect that after the clone the project would be added to the workspace and 
available in the project explorer. This doesn't happen. E.g. the repository is 
cloned into the right directory but not added. So an additional step is need to 
run "import -> General -> Existing projects into workspace".

What version of the product are you using? On what operating system?
- Windows 7 build 7601
- Eclipse Juno SR2 20130225-0426
- CDT 8.1.2.201302132326
- MercurialEclipse 2.1.0.201304290948

Original issue reported on code.google.com by ronald.k...@gmail.com on 7 May 2013 at 9:36

GoogleCodeExporter commented 8 years ago
The problem occurs to me with the following:

Existing eclipse project file in repository with a different name than the 
repository; for example:

Project name in project file is: "general". Repository name is 
"customer_general". When cloning this repository in a directory 
"customer_general", the repository name what is the default it won't be added 
to the workspace. When cloning the repository in a directory called "general" 
it's added to the workspace.

Issue is the same as 48:

!ENTRY com.vectrace.MercurialEclipse 4 0 2013-05-07 11:49:51.199
!MESSAGE Couldn't rename hgroot to project dir
!STACK 0
java.lang.IllegalStateException: Couldn't rename hgroot to project dir
    at com.vectrace.MercurialEclipse.wizards.ProjectsImportPage.createExistingProject(ProjectsImportPage.java:851)
    at com.vectrace.MercurialEclipse.wizards.ProjectsImportPage.access$17(ProjectsImportPage.java:826)
    at com.vectrace.MercurialEclipse.wizards.ProjectsImportPage$10.execute(ProjectsImportPage.java:769)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Original comment by ronald.k...@gmail.com on 7 May 2013 at 9:58

GoogleCodeExporter commented 8 years ago
I'm having the same issue reported by ronald...

Original comment by jameshue...@gmail.com on 19 Oct 2013 at 8:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I also have the same problem.
Anyway, I cannot find any good solution or reason for this, but fortunately 
there is a workaround. 

You can clone the project from the existing mercurial repository into the 
directory other than workspace, and then import the project by clicking "File 
-> Import -> General -> Existing Projects into Workspace".

Unfortunately, it does not work when you clone the android project from the 
repository. I can find the temporary solution from the stackoverflow 
(http://stackoverflow.com/questions/5072874/how-to-properly-clone-an-android-pro
ject-using-eclipse-and-mercurial)
In this case, you should create android project by clicking "File -> New -> 
Others -> Android -> Android Project from Existing Code". The cloned android 
project should be located somewhere else, which means not in the workspace 
directory.

If there is any good explanations or permanent solutions for this problem, 
please comment them.

Original comment by hwa...@gmail.com on 6 Jun 2014 at 8:28

GoogleCodeExporter commented 8 years ago
Thanks Hwa. Your info about importing Existing project after importing Clone 
Mercurial saved a lot of time. 
It was interesting that this only happened on the first Mercurial project that 
I added to same workspace.  I added a number of others and did not have to 
import Existing after the first one.  I did this on Luna.

Original comment by bob.sher...@gmail.com on 5 Jun 2015 at 2:15

GoogleCodeExporter commented 8 years ago
I spoke/wrote too soon.  The latest project I imported/cloned had to be 
imported with General/existing function.  So it seems some mercurial projects 
showed when imported/cloned and other required import general/existing.

Original comment by bob.sher...@gmail.com on 5 Jun 2015 at 2:24