Setting up subclipse with existing project with multiple SVN checked-out folders - eclipse

I'm having troubles getting SVN functionality added to my PyDev project.
I've set it up as:
workdir
workdir/project_x
workdir/project_y
workdir/project_z
Each of those projext_ folders is a specific checkout folder from different SVN repositories.
The workdir itself is imported in Eclipse as a PyDev project.
I've tried with Subclipse:
Renaming project
Using the 'team/share' functionality. It says it found the .svn in each of the project folders and wants to delete them. The next step is to setup a SVN url, but I have multiple.
Anyone got a clue how to get subclipse working?
(I've setup these folder because of problem with python finding components in the other project folders.)
Running on Ubuntu (if that matters)

Eclipse team connection can only be made at the top Eclipse project level, or at least that is all Subclipse can do.
You could possibly connect workdir to a local file:// repos and then set the svn:external property to have it pull in the different projects. Subclipse would support that ok.

Related

Using a separated source folder from SVN on Eclipse

So, here in the company we work with svn, and our svn server only have the source folder. When I use NetBeans, it's everything ok because I can add source folders in project and will work fine in svn. But on eclipse if i do the checkout from command line and add that folder in my dynamic web project, I can't see the svn history and nothing, svnclipse just does not work on that folder.
Our structure of the projects it's something like this
Workspace
Project folder
Project1
Project configuration files
SourceCode
Packages
Project folder 2
Project2
SourceCode
I already try to make checkout using svnclipse, but he add alot of extra config files, he turns the folder in a project and the source folder is add as a link to another project, in this scenario the svnclipse quick diff does not work properly.
There is a way to use that folder as source and Svnclipse works on that ?
Sorry if my English is not so good
There is no easy way to do what you want. In Eclipse a source control provider can only be connected to the project itself. So options are:
Use another svn client like command line or TortoiseSVN.
Create a small SVN project with the Eclipse project configuration files that also use svn:externals to pull in your source folder from repository.
With option 2, you would checkout this small SVN project from some other repository using Subclipse in Eclipse, could even be a local file:// repository and then the svn:externals property would also cause your source folder to be checked out.

Eclipse subversion chan't checkout existing project

I had a working kepler eclipse on Ubuntu 13.04, x86_64.
Subversion svn, version 1.7.8.
I had several projects in my workspace.
The actual storage was set up on disk as:
top:
ProjA
ProjB
ProjC
where the different projects where checked out of the subversion repository separately, even though "top" was in the repository, as was top/ProjA, top/ProjB, etc.
I then moved the whole mess to a backup directory and checked out the repository fresh so that each of the project directories were proper subversion subdirectories under top, which is now checked out as a proper subversion directory.
I then copied in the .metadata, .settings, and .project files & directories into the new structure and started eclipse. I get the following message:
SVN: '0x00000000: Open Project' operation finished with error: 0x00000000: Unable connect to 'perl' project.
Please check that SVN meta-information exists and its format is supported by the current SVN plug-in version.
If so, it is possible that project working copy is relocated outside plug-in control.
At the current moment project will be automatically disconnected from source control.
0x00000000: Unable connect to 'perl' project.
Please check that SVN meta-information exists and its format is supported by the current SVN plug-in version.
If so, it is possible that project working copy is relocated outside plug-in control.
At the current moment project will be automatically disconnected from source control.
Which is expected, because the old directory structure had the svn info in each of the project directories, and now it's located higher up in the tree.
However, when I try to reconnect the project (right-click project, Team->Share Project) to the repository, the Share Project Wizard correctly finds the repository path, selects Simple Mode to connect to the correct URL, but I get the message:
Share Project
The Project "perl" already exists in repository and has some content.
To connect the local project to the specified location, the repository
folder content should be checked out. Please consider that applying
local changes can cause resource conflicts..."
Do you wish to proceed?
I click "Yes", and get:
Share project was failed.
svn: E200030: CANTOPEN
Any idea on how to proceed?
Configuration:
Team SVN Connector: SVNKit 1.7.9
Subversion svn, version 1.7.8.
I have this kind of problem. In my case, it seems projects are disconnected if there are some latency to access the file (eg network).
After some investigations, the subversive plugin is no more a production tool, and is no more supported....

Flash/Flex Builder (Eclipse) - TortoiseSVN 1.7 with Subclipse 1.8 - svn options not in IDE?

I have done a checkout of a number of Flex projects from a repository folder to a local folder C:/CodeBase/trunk.
When I import the projects into FB (or Eclipse), there are no SVN details for any of the files. No Team options, last updated, SVN icons on the files.
I am using TortoiseSVN 1.7, and Subclipse 1.8. I think the problem may be that the latest TortoiseSVN stores just a single .svn file in the root folder, CodeBase/trunk, as opposed to the old system of storing an .svn file in every folder.
Anyone know of a fix or have you come across this?
Try Team > Share Project and setup the repository details. This will make the SCM details visible to eclipse.

How to create Eclipse project with EGit clone

After spending a decade with SVN I've finally taken the plunge with Git. I have set up Git, Gitolite and GitLab on a server and have successfully added code to my local repository, committed, cloned repositories and pushed code back to repositories. So far, so good. Now enters EGit...
I have cloned a repository using the Git Repository Exploring view using the following syntax for the path:
ssh://dexter:vaultanalyser.git
(In GitLab, repositories are referred to as projects, so I assume that I am supposed to have one repository per Eclipse project? Rather than a SVN-style single parent repository that contains multiple projects?)
This imports the repository into:
/Users/mattpainter/git/vaultanalyser
I was expecting this step to automatically create an Eclipse project for me with all the source, but this isn't so. I tried fudging the target directory so it's in my workspace, but this isn't working either.
How do I get the cloned source available within Eclipse? This site implies that if you create a project with the same name as the repository, it all magically works, but this isn't the case (yes, I know the article is about Github, not GitLab, but I figured the two were close enough for the task at hand).
I've then tried creating a project in Eclipse and sharing it - but then the whole project appears as a sub-folder in the repository. If repositories are indeed analogous to projects, this isn't really what I want.
I've looked through other StackOverflow topics that look related, but I fear I'm still missing a key piece of understanding with how this is supposed to work and it's all looking remarkably convoluted thus far.
Help?
In GitLab, repositories are referred to as projects, so I assume that I am supposed to have one repository per Eclipse project?
Yes, but a GitLab "project" isn't necessarily an Eclipse one.
It doesn't have to follow an SVN structure, as illustrated in "Eclipse reference directory outside eclipse project directory but within repository".
All you need to do is to create an Eclipse project, specifying the source directory being not in the default path (Eclipse workspace), but wherever you cloned your repo (as described in "Getting started with Eclipse + EGit - confused").
That way, the eclipse project you just declared (and referenced in the Eclipse workspace) has its files (.project and .classpath) at the root of the Git repo.
And Egit can then manage that project just fine.
Or you can import it directly with Egit: "Eclipse + EGit: clone project into workspace".
As the OP nullpainter reports below:
The original issue was compounded by invalid permissions in the .git/objects folder on the server.
Running a chmod git:git -R * on the folder solved the issue
He details the right setup below.
To expand on #VonC's answer, the steps to get EGit and Eclipse to play nicely is:
Select 'Clone a Git repository' from EGit, accepting all defaults. This will create a folder in a git parent folder, somewhere outside your workspace.
Create a new Eclipse project. I'm using Java, but I assume there are similar steps for other languages. On the first dialog, untick 'Use default location' and instead select the repository folder created in step 1. Accept all defaults.
Select Team > Share Project... from your new project. Select Git, and tick the 'Use or create repository in parent folder of project'.
Now you can push your code and Eclipse dot files to your git repository from within Eclipse.
(My original issue was compounded by invalid permissions in the .git/objects folder on the server - running a chmod git:git -R * on the folder solved the issues)
I check it out with the command line - then build my projects on top of that. In fact, I end up doing most operations with command line git. EGit is useful for viewing the diffs but I find command line has more power and control. Git is mostly about giving devs lots of power and control.

Associating existing Eclipse project with existing SVN repository

I have an eclipse project on my hard disk, which is a fairly recent check out from an SVN repository. I've imported this project into my Eclipse workspace, and now want to associate it with the SVN repository.
How do I do this? The only options I seem to have under Right-click -> Team is "Share Project", which only seems to allow me to do an initial import.
Edit: Motivation - It's a largish repository, and I don't really want to have to import the whole thing over the network.
Edit 2: There are (for some reason) no .svn dirs in the project. So maybe a fresh import from svn is the only option
Team->Share project is exactly what you need to do. Select SVN from the list, then click "Next". Subclipse will notice the presence of .svn directories that will ask you to confirm that the information is correct, and associate the project with subclipse.
I just wanted to add that if you don't see Team -> Share project, it's likely you have to remove the project from the workspace before importing it back in. This is what happened to me, and I had to remove and readd it to the workspace for it to fix itself. (This happened when moving from dramatically different Eclipse versions + plugins using the same workspace.)
subclipse not showing "share project" option on project context menu in eclipse
I'm asked this question very frequently, if it's smart to use "Share project..." if a eclipse project has been disconnected from it SVN counterpart in the repository. So, I append my answer to this thread.
The SVN-Team option "Share project ..." is totally fine for projects that exist in SVN and in your Eclipse workspace, even if the Eclipse project is missing the hidden .svn configuration. You can still connect them. Eclipse SVN-implementation (Subclipse/Subversive) will verify if the provided SVN http(s) source is populated. If yes, all existing files will be copied and linked (checked out in SVN terms) to your very personal Eclipse workspace.
Word of caution:
Do a backup if you depend on you local files. The SVN implementation may vary its behaviour with every release.
If you have multiple projects encapsulated within each other, make sure you point the SVN path to the correct local path.
regards,
Feder
I came across the same issue. I checked out using Tortoise client and then tried to import the projects in Eclipse using import wizard. Eclipse did not recognize the svn location. I tried share option as mentioned in the above posts and it tried to commit these projects into SVN. But my issue was a version mismatch. I selected svn 1.8 version in eclipse (I was using 1.7 in eclipse and 1.8.8 in tortoise) and then re imported the projects. It resolved with no issues.
I am using Tortoise SVN client. You can alternativley check out the required project from SVN in some folder. You can see a .SVN folder inside the project. Copy the .SVN folder into the workspace folder. Now remove the project from eclipse and import the same again into eclipse. You can see now the project is now associated with svn
In case of SVN servers you have to creating a central repository with all projects. The contents of the repository can be uploaded with the Team/Share command; in case of the Subversive client it automatically runs a commit after the import, so you can upload your files.
This step cannot be circumvented in any way using a centralized version management system such as SVN.
Try this- Close the project then open it. It links with svn automatically,if project was checked out from valid svn path.