Check-off Lab 4: Version Control in MyEclipse using CVS
Objective
My objective with this lab is to teach you how to use the revision control system CVS in MyEclipse. When I did this course two years
ago, I taught the students how to use the command-line cvs program. Fortunately, MyEclipse does most of the work for you,
and I think you will find that it is fairly easy to use from CVS MyEclipse.
Background
In reality, you can't do everything from MyEclipse (at any rate, I don't know how to do everything). In particular, you would need
to use the command-line cvs program in order to create what is called a repository. In practice, your sysadmin
would probably do that for you; in this course, I am functioning as your sysadmin, since I have set up separate repositories for each
of the programming groups. I don't mean to make the repository-making process mysterious, since it isn't that hard to do; I just choose
not to spend the time here needed to learn that. If you are really interested, you can check out the
CVS lab from two years ago. I also had Dan Oachs
from GTS set up unix user groups for each programming group. Following are those groups:
- mcs270-s10-1: karl pdieraue pmcdougl gschmidt
- mcs270-s10-2: karl bbickel ghinwood kwatson2
- mcs270-s10-3: karl bbarnard srethwis cruegg
- mcs270-s10-4: karl pjohnso7 tjohnso9 kschaplo
- mcs270-s10-5: karl ahelgela bstewar2 myearnea
Links
I'm including these links for completeness, even though you will not need them. Another good reference is the book Pragmatic Version Control Using CVS by David Thomas and Andrew Hunt, which is in the monitor's room. Also, Also, if you go to MyEclipse "Help > Help Contents" and select "Workbench User Guide > Getting started > Team CVS tutorial", you will find a nice summary of this process.
Tasks
You should do this lab in your programming groups. It would be best if there were at least two computers with MyEclipse in each group, since you are going to learn how to share projects. Since I want to be practical about this, you will share the Movies project of Project lab 3. So, whoever has the most-recent version of that code should start the tasks listed below.
- In the following, when I refer to "groupk", k will be 1, 2, 3, 4, or 5, corresponding to the use group of your group (see list above).
- I've decided that I am going to do this along with you, so please wait for me, don't go ahead on your own.
-
The person who will be sharing their version of Movies should launch MyEclipse in the workspace containing the Movies project.
This person should rename their Movies project Moviesk, where k is the corresponding number from 1 to 5 for their group.
In the Windows tab, select "Open Perspective > Other...", and then choose "CVS Repository Exploring". Right-click on the open
space in the CVS Repositories panel on the left and choose "New > Repository Location". Then fill in the fields as follows:
Host: ssh.gac.edu Repository path: /Net/gac/home/k/a/karl/usr/cvs/mcs270/s10/groupk (Note: change k appropriately) user: your username password: your email password Connection type: extssh Use default port: checked Use port: unchecked Validate connection on finish: checked Save password ...: unchecked - After you have set everything as above, click finish. You should then see a new entry in the CVS repository panel on the right.
-
Now change back to the Java perspective. Right-click on the Movies project and select "Team > Share Project...".
In the window that pops up, select CVS (if it isn't already selected) and then click "Next >". In the next window,
select the repository you just added and click "Next >". In the next window, be sure "Use project name as module name"
is checked, and then click "Next >". I believe this is the point where it will create the repository. It will probably
aske you about the files with extensions .data and .sql. You should specify the as ASCII files. Before finishing,
it will ask you for a comment. Do something simple, lik "Initial form of the Movies project from MCS270, authored by ...",
then click finish.
Check-off: Show me that you have gotten to this point. - Now one or both of the other team members should add the same repository as described above. Before getting the project that was just shared, delete your copy of the Movies completely from your workspace. (It would probably be wise to first copy it elsewhere on your computer.)
-
Next, go to the Java perspective, right-click on the open space in the Package Explorer, and select "Import..." In the
pop-up window, select "CVS > Projects from CVS" and click "Next >". Then select your repository and click "Next...".
Then check "Use and existing module (this will allow ...)" and select the Movies project that your partner had shared.
After you finish this, you should see the project in your work space.
Check-off: Show me that you have gotten to this point. - Now make some small change to one of the files in the project. You should notice that there is an ">" by that file in the Project Explorer; this means that the file is different from the repository. C
-
Check-off: Show me that you have gotten to this point.