This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse work directories ...how ?

 
Jason Wylde
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm wondering is there an easy way to setup "work" directories when using Eclipse. I would like to basically "check out" my code to a work directory and once it''s done and tested I could check it in. This would also allow me the option to do any quick fixes and not include my changed/un-tested code in an emergency fix. I am using SVN but I don't think there is a way to do this with it.
Any suggestions would be great !


Thanks
Jason
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't use branches on svn? Is much safer
(Maybe I don't understand your problem )
 
Jason Wylde
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was unaware of branches but I'll look and see if they will work for me. Basically I want to do the following:

- Have a way so I can make changes to objects that makes it easy if I need to not include those changes in a build. For example I'm working on changes but an emergency fix is required. Well , I don't want to include my code that I've been working on because it's either not complete and/or untested. How can I resolve this ?

In other languages I would have a "working" directory ( or location , package , etc ...) where I would have the checked out version of my objects I am changing and only when I was done I would check those back in. This would allow me an easy way to build or compile my code at any time.
 
Kevin McMahon
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, branches in svn or cvs sound like a good match for this. You could develop your normal code in a branch, do fixes and continue to deploy from head, and once you are happy with the branch code, you can merge it back in to head. If the development process of the branch is quite long, you might want to periodically merge changes from the head in to the branch too. This keeps your branch "up to date" without adding your new code to the releases.

Alternatively, if a quicker solution is required, why not check the code out to another project in eclipse (called patches or something) then develop your fixes there, and develop your changes in your normal project. You can synchronise the patches project as often as you like - just don't synch the original project.
Your main project code isn't maintained in your version control software until you are ready to check the whole thing in then tho...

 
Jason Wylde
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for the ideas !!! I will look into these.
 
Jason Wylde
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to branch some code to a "branches" folder but Eclipse gives me an error saying it already exists. The folder does exist ( we have an empty "branches" folder but I'm not sure what I'm supposed to do. I tried branching to another folder and it then says that folder already exists. If I select a folder and then type a new folder name at the end Eclipse crashes.

We are using Eclipse 3.2. Any ideas ?


Thanks in advance !

 
Kevin McMahon
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Er... no, you don't "branch" in eclipse. You branch your codebase in your repository (subversion)
Eclipse can then work with either code from the head or the branch.

If that isn't making sense, read the Subversion documentation about branching, and then the subversion plugin documentation.

The other idea I referred to (having two projects in eclipse) doesn't use branching - you just have two copies of the code locally in two different eclipse projects.
 
Jason Wylde
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok , I think I got it to work in Eclipse. However , I have switched ( Team > Switch to another Branch/Tag/Revision ... ) but how do I switch back and forth between my Branch code and my Production code ?
 
Kevin McMahon
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Head -> refers to the main code stream
Branch -> refers to your branch.

Eclipse has menu to allow you to switch between branch and head.
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think is better to read first something about svn to understand what is about. You can't learn putting questions here. Too many questions to put. Is a friendly advice, don't understand that I don't want to help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic