Eclipse-Related pages:
EclipseCVSWindows EclipseCvs EclipseCVSSupport Eclipse EclipseFAQ
CVS-Related pages:
UsingCVS
How do I get new directories from CVS to be updated in my local area?
First let me state I normally right click on the directory and do "Team->Synchronize With Repository" then update or commit my changes. But this doesn't get new directories. So here is how you do it.
Right click on the directory and do "Compare with->Latest from HEAD" Now you will see all the differences including new directories show on your screen. Now right click at the top layer or on the new directory and say "Copy over from Right to Left" (I know this is an odd statement), but pretty much saying copy the HEAD stuff(Right) into my Local area(Left). tada you should have your new directories.
How do I view branches?
- Go to your CVS Perspective
- Right click on the project you're interested in (should be "astrogrid")
- Select "Configure branches and versions..." from the pop-up menu.
- Select a file that you're interested in from the "Browse files for tags" pane.
- A checkbox list of all available branches and versions will show in the "New tags found in selected files pane."
- Check the branch/version tags you're interested in or all of them.
- Press the "Add checked tags" button. This should add the selected branches to the Branches heading.
- From that point on you have a branches and versions that you can do for merging/working on/viewing
How do I branch my project?
- Right click on the directory you want to branch. Ex: registry, myspace, etc...
- Do Team->Branch and give it a Branch name might pay attention to the Version name it gives it as well.
- Read the warning, because when you do this it does change this directory to have this new branch tag.
- Warning/Advise: Normally I think it is good to setup a seperate Eclipse project for your branched projects. Just so you don't get confused with the projects and your HEAD branched projects. Meaning do a "Checkout Project" from CVS view as a seperate Eclipse project and then branch it.
How do I merge branches or versions?
Okay their are a few ways of doing this.
- First in your directory related to the HEAD branch right click on the directory and do a Team->Merge
- If you see nothing but blank screen on your versions and tags then click on "Configure Tags" and follow question #4 starting on point 4.
- Now click on the version or Branch that you originally merged from. Look at Question 5 point 2.
- Hit the Next button now select the branch or version you wish to merge with.
- Hit the Finish button it will give you a box where you can Right click on directories or files and tell it to "Update repository" to update the main branch normally "HEAD" somtimes you need to do "Override and Update" if their is a merge conflict.
If you do the above approach it is highly recommended to throw away your branch and create a brand new branch off the HEAD.
- To do this checkout from HEAD as you did before (read branching from the question above). Then branch it.
Remember to throw away your branches and create new branches afte r your tasks otherwise you will get all kinds of merge conflicts because your merging from the original version that you branch from. And normally it is scary to see a bunch of merge conflicts. Their is a another approach with versions.
- First right before you do a merge tag the HEAD branch something like this Itn05{date}_HB (HB=Head Branch)
- Now tag your branched project as well something like Itn05{date}_RB (RB=Registry Branch)
- Now follow the same merge points as above except use your ..._HB as your start version and use your ..._RB as what you want to merge with.
- Now you shouldn't see merge conflicts unless somebody actually edited the HEAD branch. So it looks a little more pleasing to look at.
How do I monitor what CVS is doing?
I like to see what the CVS actions to check that what Eclipse is doing is what
I expect it to be doing. There seem to be two ways, depeneding on which version of Eclipse you are running:
- Window -> Show View -> Other -> CVS -> CVS Console.
or
- Window -> Preferences -> Team -> CVS -> Console. Place a check in the box "Show CVS Console when there is output"
OH MY GOD EVERYTHING IS MESSED UP WHAT DO I DO?
- Simple right click on the directory and do Replace With->Another Branch or Version And choose your branch name or they gave you Replace With->Latest from HEAD as a convenience. Or you can even choose a version if you want.
Couple of warnings:
- Replace With does warn you if you have local changes it will overwrite, so be careful if you have done some coding on particular files it will overwrite them. So it might be advisable to copy those files over to a seperate directory.
- One slight warning. I personally like to use Replace With a lot it is very good to get all the latest stuff for a directory/project. But one warning if you lets say do a Replace With and choose a different branch ..._RB on your directory dealing with HEAD branch thinking it will update your HEAD branch your wrong. It will cause that directory to change it's branch name in properties, it will no longer be HEAD.
Add more questions here if you have any and they will be answered
--
KevinBenson - 02 Feb 2004