
Creating a CVS Repo on Remus | Using CVS and Eclipse together | Subversion | Back to Freestuff Home
This is where a blurb describing what CVS is goes...
This page will have pictures and niceties soon, right now it's up fast and incomplete for the CS112 and CS113 students to use.
If you need to learn more about CVS and what it is and what it does then google "CVS" and start reading pages (like you should do with everything you don't understand, there are no more excuses for being clueless people -- HINT: you can skip the pages about the pharmacy ;-> )
That and go to Wikipedia and start reading some more...
Here's a free CVS book for you too... Online CVS Book
Creating a CVS Repository on Remus
If you have a remus account you can have your very own CVS repository (If you don't have a remus account you should... Go here to create one for yourself if you are in CS112 or CS113)
It's easy to create one. Use SSH (Don't have an SSH client? Go read up on SSH and then come back...) to login to your remus account.
Once there all you have to do to create a cvs repository is to issue the following command:
cvs -d /ug/users/<your userid>/<the name of your repository> init
So, as an example, if I login as userid larz and want to create a repo named myjavarepo I would type this at the command line:
cvs -d /ug/users/larz/myjavarepo init
and Bingo. If you do an "ls -al" you'll see you have a directory called myjavarepo and if you cd to it you'll see a directory called CVSROOT. If you see this you will know that all has gone well. Now, don't tinker around in there. when you use the CVS repo the program calling it will do all the work for you. Now that you have a CVS repository you'll want to use it, no? Read on...
Using CVS and Eclipse together
One of the reasons everyone likes eclipse so much is because it plays so well with others. CVS use is no different. Eclipse has CVS use built in and even has its own "CVS perspective". if you are a long time eclipse user you know what a perspective is, but for those of you who are just beginning I'll clue you in. A perspective is just what it sounds like, a way of looking at things through a certain viewpoint with certain things in mind that you might not care about if you were looking at things from another angle. Vague enough? Let's get specific.
If I look at a project from a Java perspective I want to see code and output and resources and all of the things java related in my project. Indeed, the default Java perspective give you all of this. But what if I wanted to look at my project from another point of view? In eclipse, go to the upper right hand of the screen and you will see a little app icon with a plus sign on it next to a button that says "Java". This is where you set your perspective. Click the app icon for a new perspective and look at all the choices you have by clicking "Other..."
There are a lot of different ways to look at a project, huh? Right now we are interested in setting things up for CVS so go ahead and open up a perspective for "CVS repository exploring" and press OK.Now you are looking at things from the perspective of someone wanting to setup or use CVS. Now we'll go ahead and tell eclipse where our remus CVS repository is so we can use it to store our work.
If you look in the upper left hand corner you'll see a window with a plus sign very similar to the app icon we just used for changing perspective. This is the "New" button and we want to create a new location so go ahead and hit it.
You'll see the selection wizard and a whole slew of things you could create. We want to click the plus sign next to CVS to open up all the options and then click on "CVS Repository Location" and hit next...
Now is the most important part. You're brought to the "Add CVS Repository" Dailog Box and you have to give it six different pieces of info... Be careful and take your time... They are...
1. Host... that's easy, it's "remus.rutgers.edu"
2. Repository path... It wants an absolute path, like when you created it. Like this "/ug/users/<your userid>/<your repo name>/
3. User.... Put in your Remus userid....
4. Password... Give it your remus password. Don't worry about looky-loos, it will be masked as you input it.
5. MAKE SURE THE CONNECTION TYPE IS : EXTSSH This is important, hence the caps...
6. Click the box that tells eclipse to save your password. It's secure enough and will save you lots of headaches.
Then hit finish.... you may see the beginnings of the remus login process... then, in the repo list will pop something like this
:extshh:larz@remus.rutgers.edu:/ug/users/larz/myjavarepo
If you click the plus you'll see some CVSish things like Branches and Versions and all of that is left for you to discover yourselves...
We're not done yet!!
We have now successfully created a CVS repository location in eclipse that will allow us to use our Remus CVS repository to save and share our work. But how?
Here's how. Switch back to the java perspective. Hopefully you have a project ready to go. If not then create one and do a quick "Hello World" prog. Ok good...
Now, right-click on the PROJECT, not the java file, the PROJECT'S name. See that list. Go and hover your mouse over the word "Team", when the menu pops up click "Share Project"
Select CVS repository when asked how to share... hit next
Select your Remus CVS Repo... hit next
Use the project name as the module name in your repo.... hit next
Now you'll see what's going to be saved... hit finish...
BANG! Now you get the Commit window. A commit is just the CVS asking "Are you sure you want to do this?" Type "This is my first commit" in the box and hit finish...
You did it.
If you go back to the CVS perspective and refresh your branches you'll see your project there. Now you can share your work (by giving someone with group access the rights to look at the CVS you can setup a workgroup for everyone...) and have a safe offsite server that's running 24/7 and doing backups where you can keep your work (remus is pretty handy eh?)
Don't try to save something too huge, you still have quota to think about, but now you'll have a place for your code. You can create as many CVS repos as you want for any number of projects or classes, not just cs112 or cs113.
We'll get to this later.....
If you have any questions, suggestions, or corrections please let me know...

© 2008 Rutgers University