IDE Tutorials CSE 219 Fall 2005 |
CSE 219 HomePage
Netbeans CVS
Support for cvs over ssh in netbeans does not seem to exist in any reasonable manner.
So for now you can use the command prompt for cvs commits and updates. This tutorial
will hopefully be updated (time permitting) with howto use cvs from netbeans if you
have a local repository.
UPDATE!!!
Mark Furmanik was kind enough to figure out how to use cvs with netbeans 4 and write a tutorial about it. It involves a few steps but he put the tutorial up at http://www.ic.sunysb.edu/Stu/mfurmani/NetbeansCVS/index.html and you can look over it if you like.
http://www.netbeans.org/
 |
 |
|
Since we are going to use cvs by hand the first step is to log
into the server with your cvs repository. In our case this is
ug.cs.sunysb.edu. Connect to this through ssh. Type bash to start
the bash shell. This will make your life easier.
|

 |
 |
|
We now have to create our repository. If you already have one
then you can skip the mkdir part and fill in the rest of the
steps with your directory. cvs will look at the environment
variable CVSROOT to find where the repository is. so follow
the steps in the image filling in the directory you chose
as your cvs root in plave of my directories. If you do not
want to set the CVSROOT variable every time you do this
you can open the .bashrc file in your home directory with a text
exitor and place the lines under mkdir into tht file excluding
the echo. This will automatically set the variable for you
every time you log in.
|

 |
 |
|
This step tells cvs to put all the important files that are
needed to use a cvs repository into our cvsroot. NOTE!!!! only
do this step once. If you do it again you will destroy your
repository with no hope of getting it back.
|

 |
 |
|
Now we want to navigate to the folder where our source is
contained that we wish to put into cvs. This can be any
directory. However be careful not to try to import a directory
that already had CVS data directories in it
|

 |
 |
|
Now that we are in the directory we want to import our source.
to do this we use the command cvs import. The command in the
image has several required fields. The -m option tells cvs
to use this message for the import while cse310hw1 is the name
of the module/directory in our repository he code will be
imported into. the next 2 variables are tags to mark the initial
import these can be anything you want but must be different.
|

 |
 |
|
The idea of cvs is that we can keep a seperate copy of the code
to work on and then commit our changes when we are done. This
directory is called the working directory. Lets create a working
directory in our home directory as shown in the image and then
cd into the directory.
|

 |
 |
|
At this point we want to check out our source code that we put
into the repository. To do this we use the cvs checkout command.
checkout your code by using the command shown in the image with
cse310hw1 being replaced by the name of your module. Once you
have made changes to your code you can commit them back into
the repository with the cvs commit command. If you want you
can specify the message for the commit the same way you did
for the import. If you think your sources are out of date in
your directory you can use cvs update to grab the latest
versions.
|

 |
 |
|
If you have any questions or a way to make the tutorials
better please speak with me or email me at
dquigley at ic dot sunysb dot edu
|
(c) David Quigley