Link to home
Start Free TrialLog in
Avatar of lantervj
lantervjFlag for United States of America

asked on

Subclipse

I need help with Subclipse.  I installed it in my copy of Eclipse.  I don't see where I can update or commit my file. I can see my repository and do things like "view history".
Avatar of chrios
chrios
Flag of Sweden image

It's been a while since I used subclipse, but I think the functions you are looking for can be found in the "Team Synchronizing" perspective (you add it with a button in the top right part of eclipse).
Avatar of lantervj

ASKER

I see the Team perspective.  But, first things first.  How do I "checkout" or open a file to edit?
Checkouts are made in the svn-repository perspective.
Commits/adds are made from the team synchronizing perspective.


First you set up the svn repository from the svn repository perspective.
Assuming that you have a project in the svn rep. Right-click on it and select Checkout.

Work with your project as usual in the Java perspective (assuming a java project).

When you are ready to commit the changes, open the Team Synchchronizing perspective. If the window is empty, add yout svn repo using the button in the top left. It should open a list of the repos you have opened in the repository perspective. Once you have added it it will end up in the team synchronizing window. There you can right-click on the parts you want to commit/add

If you are using the "Ingoing/Outgoing mode" in the synchronizing window you will only see files that have changed.
"When you are ready to commit the changes, open the Team Synchchronizing perspective. If the window is empty, add yout svn repo using the button in the top left. It should open a list of the repos you have opened in the repository perspective. Once you have added it it will end up in the team synchronizing window. There you can right-click on the parts you want to commit/add"

I have an empty window and no button to add a repo.
I think I may have misunderstood your situation. I was under the impression that you already had a project inside the svn-repository but that seems to not be the case. Am I understenading you right that you have a project that is not in the SVN and that you want to connect to the SVN repository? If so perhaps this is of more help to you.

This is assuming that you have an svn-repository connected in the svn-repository explorer perspective, and your comments seems to suggest that is the case.

Create or select project for SVN
First we need a project to work with, if we dont have one already we crate it as usual from file->new project. Lets say we call the project TestProject.

Make a first import of your project into SVN
Switch to the SVN-repository perspective.

We now want to create a place on the svn repository where we can store our project.
Rightclick in the svn repository explorer to the left and select New->New remote folder

Give the folder a name, lets call it "MyProject" for this discussion, and then click Finish.

In the svn explorer you should now have MyProject under the svn-repository. Rightclick MyProject and select "Import"

In the Import Folder dialog, click Browse and locate the project folder for "TestProject" (it should be in your workspace folder).

In the comment field type "First import" or something like that, and then click OK.

Refresh the svn-repo explorer view and you should see more folders under "MyProject".

Checking out the project
At this point a copy of your project should be in the SVN -repository.

Before we check it out we should remove the old files from the workspace, so switch over to the java view and delete "MyProject" including its files (you may want to make a backup of the project first, just in case).

Now it's time to checkout the project. To do that, select File->New->Project...

Select SVN->Checkout Projects from SVN
Click Next
Use existing repository location
Click Next
Select "MyProject" and click Finish

Make changes and commit them
Modify the files as you want. When you want to commit the changes, switch to Team Synchronization perspective. Rightclick and select "Commit". Add a comment and click OK. If the repository is out of sync you may need to select "Update" or "Synchronize" before commiting your changes.
I added a comment that I believe can help him resolve the problem.
I'm trying to get my mind around this. But, I currently work with the files directly on the server.  When it is tested and ready to go, I move the files to the production folder.  I have a repo set up for testing.  If I use Tortoise I can commit my changes.  But it's a pain to go outside of Eclipse to do that.  I don't have projects set up.  But, I will try to follow your instructions.
There HAS to be a better way.  I got the test to work, but it's incredibly cumbersome.  
They just added a new repository for me to do some work in.  Maybe a chance to try again.
There are a  few things I would like you to clarify for me: What is in the repository now (Is it empty, does it has a eclipse project or perhaps just a source tree)?

If there's already code but not in the form of a eclipse project, then you can checkout the code as a new project. Just make sure to add the eclipse project files to SVN:ignore by using the team synchronize perspective.

You can also commit changes from the java perspective by rightclicking the filetree and using commit from the Team menu. Rightclicking the project name will let you commit all changed files at once.
I am using CFeclipse as my main perspective.  I have a new repository to work from.  I have not imported or checked out anything.  No project either.
This is direct from the SVN.Subclipse help document;
"If you do not yet have your project ready to import into the repository, create a simple project that contains a few files so that they can be stored in the repository. A simple way to achieve this is to create a sample plug-in project by selecting File > New > Project... and Plug-in Development > Plug-in Project. Give the project a name and click through to finish on the wizard.

To import a project into the repository, right click the ..."

It does NOT make sense.  Why would I import a "project" INTO a repository?
Sorry for the general delay in replies, seems like like we have a 9-10 hour time differential, so when you post your comments i'm no longer online here.
It does NOT make sense.  Why would I import a "project" INTO a repository?
I don't understand what you find strange about it. This is also from that page of the help document: "This is the process for taking a new project in your Eclipse workspace and importing it into a repository so that it can be managed by SVN".

To return to your original question, you wrote:
I need help with Subclipse.  I installed it in my copy of Eclipse.  I don't see where I can update or commit my file. I can see my repository and do things like "view history".
You need to checkout a part of the svn repository as a project before you can edit its files or add files to it. The following pictures, along with my previous comments should describe the process. You can also find info here.
svn1.png
svn2.png
svn3.png
svn4.png
1. The lead programmer uses Tortoise SVN and seems to like it.  But, I can use whatever I like. I can't seem to bring myself to go outside of my IDE to commit/update.
2. By initially following his lead, I created local repositories on my machine separate from Eclipse. Now I repositories everywhere.
3. This weekend, all code will be under SVN repositories.
4. I think I need to uncross my hands and start from scratch.
5. There currently are 4 repositories that I can work from.
6. Often I will be working on code from multiple repositories.
7. The lead programmer is using Windows 7 and IIS and a local CF server to test his code. I use Win XP and can only test one site at a time.  Therefore, I have to commit code to test it on our development version of the production sites.
8. At least one other programmer is in the same boat as me.  

It may not sound like it, but I do appreciate your patience.  Mine is running a little thin.
When I try to checkout the root of the repository as a project using the new project wizard I end up in a loop.  When I click on finish it goes back to the initial checkout dialog.
Try "Check out as a project in the workspace" instead of using the wizard.
ASKER CERTIFIED SOLUTION
Avatar of lantervj
lantervj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just dumping the question.