Switching between branches in Eclipse

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
ecobb
Posts: 28
Joined: Tue Apr 27, 2010 9:23 am

Switching between branches in Eclipse

Post by ecobb » Tue Apr 27, 2010 1:40 pm

I'm trying to figure out how to easily switch between branches in Vault. I'm using Eclipse, and I have my project already created and imported from Branch A. I want to switch my project over to Branch B (same repository as Branch A) and have all of the files stored in the same location on my pc (overwriting Branch A files). Most of my source control experience has been In Subversion, and to do something like this with Subversion/Eclipse is dead simple. All you have to do is right click on the project root and tell it what branch you want to swap to.

So, for example, if I have the code in Branch A checked out in inetpub/wwwroot/websitecode, I want to swap to Branch B in Eclipse and have all of the code be checked out to inetpub/wwwroot/websitecode. How would I accomplish this with Vault?
My work is a game, a very serious game. - M. C. Escher

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Switching between branches in Eclipse

Post by jeremy_sg » Wed Apr 28, 2010 7:59 am

It's not that easy in Vault.

Are you on Windows? If so, bring up the GUI client. unset the working folder for Branch A, then set the working folder for Branch B to that location. Do a get on Branch B, choosing to Overwrite any modified files. You might also want to consider deleting the local contents before getting Branch B, which would make sure that any Branch A files that are not also in Branch B are deleted.
Subscribe to the Fortress/Vault blog

ecobb
Posts: 28
Joined: Tue Apr 27, 2010 9:23 am

Re: Switching between branches in Eclipse

Post by ecobb » Wed Apr 28, 2010 9:08 am

Thanks Jeremy! After doing that and coming back in to Eclipse and refreshing my project that seemed to get it.

I must say that so far I'm really disappointed in the lack of features Vault has in Eclipse. For years I've been able to just right click on a project and have access to things like "synchronize with repository", "merging" and "branching", that it feels like I'm having to take several steps back with Vault. Admittedly, I've only been playing around with it for a couple of days, but I can already tell it's going to take some getting used it, that's for sure.

I guess I just need to become more familiar with the Fortress client and give up trying to do everything in the IDE. Still, it would be nice to have access more features from inside of Eclipse (hint, hint...feature request? :D )

Thanks for your help, Jeremy!
My work is a game, a very serious game. - M. C. Escher

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Switching between branches in Eclipse

Post by Beth » Thu Apr 29, 2010 3:44 pm

I have a few feature requests open for things in Eclipse. Do you have a few top ones that you'd really like? I could enter in a few more feature requests if I had something a little more specific.
Beth Kieler
SourceGear Technical Support

ecobb
Posts: 28
Joined: Tue Apr 27, 2010 9:23 am

Re: Switching between branches in Eclipse

Post by ecobb » Fri Apr 30, 2010 3:08 pm

Thank, Beth! I really appreciate you asking. It's nice when a software company really takes note of their customer's suggestions! :D

Here are the top 5 features we would really like to see integrated into the Eclipse plugin:
  1. The ability to change between branches without having to use the Fortess GUI - i.e., browse to the branch you want to change to, select it, and have it swap out the code in your existing project's working folder with the code from the branch you selected. (like the "Switch to Another Branch/Tag/Revision" feature in Eclipse/Subclipse)
  2. Synchronize with Repository - show me everything that I need to commit, as well as everything someone else has changed that I need to download and let me pick which items to download.
  3. The ability to compare or replace a file with a previous version or one from another branch
  4. Multiple projects in Eclipse connected to multiple repositories
  5. The ability to create branches
The first three are the big ones. Some of these features may already be available, but just not obvious how to do it in Eclipse. I've only been working with Fortress for a few days, so it's likely I've missed something or just haven't figured it out yet.
My work is a game, a very serious game. - M. C. Escher

ecobb
Posts: 28
Joined: Tue Apr 27, 2010 9:23 am

Re: Switching between branches in Eclipse

Post by ecobb » Mon May 03, 2010 10:24 am

Also, if there's any way for the directories in a project to have some type of icon or indicator that indicates something in that directory has been modified, that would be a TREMENDOUS help. (i.e., SubClipse has a little black icon, VSS plugin shows the number of files checked out in parentheses, etc...) I've attached screenshots to better describe what I'm talking about.
Attachments
vss.png
Example of VSS
vss.png (49.94 KiB) Viewed 13640 times
subclipse.png
example of SubClipse icon
subclipse.png (52.69 KiB) Viewed 13640 times
My work is a game, a very serious game. - M. C. Escher

Post Reply