Importing a project - eclipse

I am new to Subversion. I'm using TortoiseSVN as my client and VisualSVN as the server. I want to implement it with fellow programmers who are working with me. Some are using NetBeans as their IDE while others are using Eclipse. My PC is the server and they are the clients.
How do they import a project made by me and make changes to it? Using TortoiseSVN they were able to browse my project, but how they import it in their IDEs and make changes to it? Will I be able to view the changes instantaneously?

Using TortoiseSVN they were able to browse my project
That means they have the url of your SVN repo.
They can load that repo to any folder of their choice.
svn checkout http://url/to/your/repo/trunk/ trunk
Or (TortoiseSVN)
From there, they need to add subversive to their eclipse:
They can import an existing project from their SVN workspace.
Once imported, you can re-connect that Eclipse project to its SVN repo:
(right click on the project, Team > Share)
Enter the relevant SVN repo metadata:

Eclipse has a plugin called "Subclipse" and another called "Subversive". They can find and install those to work with their Subversion working copy directly in Eclipse. Netbeans likely has something similar.
Or, once they have a working copy checked out by TortoiseSVN, they can just import it without any special plugins into their IDE. They would use the IDE for development, and use TortoiseSVN to manage all the Subversion aspects outside of the IDE.
You won't see any changes "instantaneously". For you to see their changes, they will first need to "commit" their changes, and then you will need to "update" to see their changes.
Since you're asking a really basic question about using Subversion, I'd suggest reading or at least skimming through important sections in the SVN book: http://svnbook.red-bean.com/

Related

How should I be putting exisiting java projects into a new svn repository to access via eclipse with subclipse?

I have VisualSVN, subclipse, eclipse indigo and tortoiseSVN setup on my laptop now. This is strictly for code on have on a local machine and SVN is setup as a localhost service instance so I have versioning for my personal development projects.
My question is, how should I be putting my projects into svn? I started doing imports through subclipse/eclipse into the repository, but do I still need tortoise now or does it even matter how I get the projects into svn? I did see that if the projects are already in eclipse it's not letting me do the import.
I'm able to submit my projects to a repository in SVN through eclipse without tortoise svn so it's not needed. To add a new project to the repository I right click on the project in eclipse and go to team and share project. Then to commit a project update to the repository I go to team and then commit. This has worked for me so far.

problems with online repository

I'm doing a project with omnet++ (which is based on Eclipse) and I wanted to create an online repository on projectlocker.com for it, so I typed:
svn import /home/paul/myProject https://pl3.projectlocker.com/myaccount/myrepository --username=myUsername
Now, by just going into my project folder, how can I store all the possible changes that I've made into my online repository?
svn commit
won't do it. I've also downloaded subclipse 1.0, but it doesn't seem to be all that helpful on this matter.
Any ideas?
Thanks!
svn export is not the right command to use in this case, you need to use svn checkout.

Importing files from Subversion into an existing project

I am trying to import files from a SVN repository into an existing Eclipse project using Subclipse. Unfortunately, I can only find a way to create a new project from a repository. I know about Tortoise SVN, but it is so much easier to remember to add files when version control is imported into the IDE. Is this possible?
Eclipse doesn't seem to offer this functionality, but you can use another svn client to achieve this effect and then subversion will recognise that these files are under version control.
You may also want to check out how to check out the contents rather than the folder itself.

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.

Viewing repository information from within Eclipse, when code was checked out using svn tortoise

I am using svn tortoise to checkout a maven project from a repository, I then open eclispe, and use the m2eclipse plugin to import a maven project. The maven projeect comes in okay, and I can build it fine.
The problem is that eclipse using subversive, isn't marking files/ resources as being in source control (even though I seem to have all the relevant .svn directories.)
I get the same behaviour if I try and check the code in using
-> import -> check out Maven Projects from SCM. ie the project imports okay, but the files aren't linked in to teh svn repository in eclipse.
Are there any suggestions as to how I might proceed, as I find the tortoise svn checkin process pretty painful.
Did you set up your project for team sharing (right click on project->Team->Share project)? If I remember correctly that should detect the existing .svn folders an enables version control inside of eclipse.
You might wanna try using Subclipse. It's the Eclipse plug-in for Subversion and is really good. I've also found that interacting with a SVN repository with Tortoise while also having Eclipse open and accessing the same repository causes problems. You should avoid it if you can.
I would highly recommend making sure that you commit using tortoise svn as I've had particularly spotty consistency with subclipse. If you do you in/out with tortoise, and then just update with subclipse you should be fine.