Setting up a Subversion Repository using UNIX and Eclipse - Prof. Susan Elliott Sim, Assignments of Computer Science

Instructions for setting up a subversion repository on unix and using eclipse as a subversion client. Students will learn how to configure their unix shell, initialize the svn repository, and connect to it from eclipse. The document also covers checking in and checking out projects, making modifications, and reverting changes.

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-nv3-1
koofers-user-nv3-1 🇺🇸

1

(1)

10 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
INF 111 / CSE 121
1/17
Homework 4: Subversion
Due Tuesday, July 14, 2009
Name : ___________________________________________________
Student Number : ___________________________________________________
Laboratory Time : ___________________________________________________
Objectives
Set up a Subversion repository on UNIX
Use Eclipse as a Subversion client
Preamble
Subversion (SVN) is a free/open-source version c ontrol system. That is, Subversion manages files
and directories, and the changes made to them, over time. This allows you to recover older
versions of your data, or examine the history of how your data changed.
Subclipse is a Subver sion plug- in for Eclipse. It aims to provide all Sub version functionality to the
Eclipse development environment. It’s an open source project as well, and available at the
project homepage , http://subclipse.tigris.org/
In this laboratory, you will create a SVN repository on UNIX. You will also install the Subclipse
plug-in. You will then access your SVN repository fr om the Eclipse workbench using Subclipse .
You will then have a working copy of the files.
Grading Checklist (30 points)
Configure the UNIX Shell
Connect to SVN Repository from Eclipse
Check in a Project
Check out a Project and revert cha nges
TA Initials: ____
By the end of the laboratory, you will need t o c omplete the tasks listed below. You will need to
do some preparation in advance to ensure that you can complete all of them in the time
available. When you have completed all of the tasks, show the TA your work to re ceive your
grade. It’s best if you complete all of the tasks and show your results to the TA all at once.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Setting up a Subversion Repository using UNIX and Eclipse - Prof. Susan Elliott Sim and more Assignments Computer Science in PDF only on Docsity!

Homework 4: Subversion

Due Tuesday, July 14 , 2009

Name : ___________________________________________________ Student Number : ___________________________________________________ Laboratory Time : ___________________________________________________ Objectives

  • Set up a Subversion repository on UNIX
  • Use Eclipse as a Subversion client Preamble Subversion (SVN) is a free/open-source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. Subclipse is a Subversion plug-in for Eclipse. It aims to provide all Subversion functionality to the Eclipse development environment. It’s an open source project as well, and available at the project homepage, http://subclipse.tigris.org/ In this laboratory, you will create a SVN repository on UNIX. You will also install the Subclipse plug-in. You will then access your SVN repository from the Eclipse workbench using Subclipse. You will then have a working copy of the files. Grading Checklist (30 points)  Configure the UNIX Shell  Connect to SVN Repository from Eclipse  Check in a Project  Check out a Project and revert changes TA Initials: ____ By the end of the laboratory, you will need to complete the tasks listed below. You will need to do some preparation in advance to ensure that you can complete all of them in the time available. When you have completed all of the tasks, show the TA your work to receive your grade. It’s best if you complete all of the tasks and show your results to the TA all at once.

Instructions for the Laboratory Task 1: Configure Your UNIX Shell For this task, you will verify that SVN is available in your UNIX environment. If SVN is not available, you will add it. SVN needs to be available so that you can create a SVN repository in your home directory and connect to it using Eclipse in later tasks. a) Log in to your UNIX account

  1. Open SecureCRT 5.
  2. Select openlab.ics.uci.edu and click Connect. If a “New Host Key” window appears, click the “Accept and Save” button. Then, it will show a “SecureCRT Window” indicating that the “Access is denied”. Click “OK”.
  3. Enter your username and click “OK”. Then, enter your password and click “OK”. You will see the Unix prompt. b) Type in the command “module list” This command will produce a list of modules, or packages of programs, that are available to you in your UNIX environment. The output should look something like the following.

If you want to know more about how modules work, visit http://www.ics.uci.edu/computing/unix/modules/ Task 2: Add a Directory for Your Subversion Repository This task involves creating a directory for your Subversion repository in your UNIX Account. a) Log in to your UNIX account. b) Create a directory called “ 111 - svnrepository” (or 121 - svnrepository, if you prefer). The command to do this is “mkdir 111 - svnrepository”. Do not place the directory in a subdirectory within your account. c) Enter that directory using the command “cd 111-svnrepository” d) Take note of the full path to this directory. Type the command “pwd” and write down the result. e) Initialize the SVN repository: Type in the command “svnadmin create --fs-type fsfs ”. Be sure to substitute the string that you wrote down in step (d) instead of .

Task3: Verify that the Subclipse Plug-in uses SVNKit a) Go to Window - > Preferences. Expand Team and click SVN. Select “SVNKit (Pure Java)” in the SVN interface information. Click “Apply” and “OK.” Task 4: Connect to Your SVN Repository from Eclipse a) In Eclipse, go to the SVN Perspective: Select Window - > Open Perspective - > Other - > SVN Repository Exploring. b) Create a new Repository Location: In the SVN Repositories tab, right-click and select New -

Repository Location. c) Indicate the location of the repository. Type in “svn+ssh://openlab.ics.uci.edu/”. Be sure to substitute the string that you wrote down in step 2d instead of .

f) You should see the repository you just created. g) Right-click on the repository and select New - > New remote folder. h) In the New remote folder window, create the folder “LunarLander” and press “Finish.” i) Create the following sub folders inside "LunarLander": "trunk", "branches," and "tags". In the New remote folder window, make sure that you select "LunarLander" as the parent folder.

j) Right-click on the repository and select “Refresh.” You should see the following structure. For additional help on setting up a SVN repository, see the online help in Eclipse.

  1. In the Enter Folder Name Window, select “Use specified folder name:” and click “Select.” Select the “trunk” folder and click OK.
  2. Check the project name in the folder name. It should be “LunarLander/trunk/” Click “Next.”
  1. You will get a confirmation that the folder already exists in the repository and it will be checked out in your workspace. Select "Yes" to continue
  2. You might also receive a dialog asking to open a "Team Synchronization" perspective. Select "No"
  3. Right-click on the project (Lunar Lander) and select the Team - > Commit… menu item.
  4. Edit the commit comment to “This is my first Commit” and make sure that all files are checked.
  5. Click OK to commit the files to the repository.
  1. You will see the “Checkout from SVN” Window. Click “Finish.” (Note: If you do not want to overwrite your project in your workspace, change the name of the Project.)
  2. A “Confirm Overwrite” dialog box will appear if you use the same project name. Click “Ok”
  3. Go to the Java Perspective (Window - > Open Perspective - > Java). Make a minor change to the GUIEnvironment.java file: Change lines 23 and 24. Before changing:

int wRec=70;

int hRec=70;

After changing:

int wRec= 80 ;

int hRec= 80 ;

  1. Save the file you changed (GUIEnvironment.java).

c) Check In the modified project and verify your changes

  1. Select the project you are working on (inf111_JUnit).
  2. Right-click on the project and select the Team - >Commit… menu item
  3. A “Commit to” dialog box will appear. Write a comment “I changed the value of wRec and hRec properties” and click “OK” (note that only the modified file is going to be uploaded to the repository).
  4. Go to the SVN Repositories perspective and select the project you are working on
  5. Right-click on the repository and select “Refresh”. Find the file you modified (GUIEnvironment.java) and you will see the changes you made in this file. You will also see that this file has a different number version from the other files.
  6. Check In the modified project and verify your changes d) Make another change and revert the change
  7. Make a minor change again to the GUIEnvironment.java file: Change line 26 and 27. Before changing:

boolean hit=false;

boolean landed=false;

After changing:

boolean hit= true ;

boolean landed= true ;

Save the file.

  1. Revert the changes by selecting Team - > Revert

To: FileOutputStream fileos;

She receives errors and reverts the changes.

i) Enter the appropriate current version numbers of the file "edu.uci.ics.inf111.dvdvendor.lib.Persistent.java" in the repository and each user’s working copy, after the event. ii) Provide a description indicating if the Subversion operations are successful, and how conflicts are resolved. Also, if there is a discrepancy between the version numbers you saw in the screenshot and the one you expected, give a brief explanation of this discrepancy. iii) Submit a screenshot showing the revision number of files in the package "edu.uci.ics.inf111.dvdvendor.lib " at the end of each event

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot1:

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot2:

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot3:

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot4:

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot5:

Event Repository Sukanya’s

Working Copy

Rosalva’s

Working Copy

Susan’s

Working Copy

Description:

Screenshot6: