TDDC88 Lab 4 Software Configuration Management

Similar documents
Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Department of Computer Science College of Engineering Boise State University

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

Source control with Subversion A user perspective

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Revision control. INF5750/ Lecture 2 (Part I)

Lab Exercise Git: A distributed version control system

A BASIC UNDERSTANDING OF VERSION CONTROL

How to version control like a pro: a roadmap to your reproducible & collaborative research

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Revision Control and GIT

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Laboratorio di Programmazione. Prof. Marco Bertini

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Common Configuration Management Tasks: How to Do Them with Subversion

SVN_Eclipse_at_home. 1. Download Eclipse. a. Go to: and select Eclipse IDE for Java Developers

Programming with Haiku

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Chapter 3. Revision Control

Version Control Systems (VCS)

Revision control systems (RCS) and. Subversion

b. Developing multiple versions of a software project in parallel

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Git Introduction CS 400. February 11, 2018

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

Version Control Systems (Part 1)

Software Development I

Version Control: Gitting Started

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

Storing and Managing Code with CVS

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Source Code Management wih git

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Version Control Systems

CSE 390 Lecture 9. Version control and Subversion (svn)

Lab Exercise 1 Using EGit and JUnit

Object Oriented Programming. Week 1 Part 2 Git and egit

Revision Control. Software Engineering SS 2007

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

CSC 2700: Scientific Computing

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Lab 08. Command Line and Git

And check out a copy of your group's source tree, where N is your one-digit group number and user is your rss username

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Tutorial 2 GitHub Tutorial

Using Git to Manage Source RTL

Task-Oriented Solutions to Over 175 Common Problems. Covers. Eclipse 3.0. Eclipse CookbookTM. Steve Holzner

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Subversion. CS 490MT/5555, Fall 2015, Yongjie Zheng

#25. Use Source Control in a Single- Developer Environment

Version Control with Git ME 461 Fall 2018

Version Control. 1 Version Control Systems. Ken Bloom. Linux User Group of Davis March 1, 2005

Submitting your Work using GIT

Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

Version Control Systems

! #Running this command from the top directory of your project will add all your changes."! $ git add."

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Version Control. CSC207 Fall 2014

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Version Control Systems: Overview

Git version control with Eclipse (EGit) Tutorial

Git tutorial. Katie Osterried C2SM. October 22, 2015

Project Management. Overview

Git for Version Control

Revision Control. An Introduction Using Git 1/15

CS108, Stanford Handout #37. Source Control CVS

Technology Background Development environment, Skeleton and Libraries

Introduction to Revision Control

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

What is Subversion and what does it do?

Version Control. Version Control

CS 320 Introduction to Software Engineering Spring February 06, 2017

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Git. A Distributed Version Control System. Carlos García Campos

2/8/18. Overview. Project Management. The First Law. What is Project Management? What Are These Changes? Software Configuration Management (SCM)

Version Control System - Git. zswu

A Brief Git Primer for CS 350

Software Tools Subversion

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011)

Version control with Git.

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Introduction to GIT. Jordi Blasco 14 Oct 2011

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU)

Subversion Repository Layout

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

Version Control for Fun and Profit

Version control with git and Rstudio. Remko Duursma

Assumptions. GIT Commands. OS Commands

Working with CVS in Eclipse

Software Revision Control for MASS. Git Installation / Configuration / Use

Lab Objective. Lab Assignment. Downloads and Installation

Source Control. Comp-206 : Introduction to Software Systems Lecture 21. Alexandre Denault Computer Science McGill University Fall 2006

Subversion FOUR. 4.1 What is Version Control? 4.2 What is Subversion? Types of Version Control SESSION

Transcription:

TDDC88 Lab 4 Software Configuration Management Introduction "Version control is to programmers what the safety net is to a trapeze artist. Knowing the net is there to catch them if they fall, aerialists are free to fly. In the same way, version control enables you to take programming risks that you would never otherwise consider. If something goes wrong, you can always revert back to a known, good-working version of your code. You can experiment in a branch 1 off the main trunk without interfering with other team members. When bugs are discovered in an older version of a shipped product, you can easily check out that specific version to confirm, fix, and generate a patch for the bug. Without version control, you would have to be much more cautious, move more slowly, and generally be less productive. -Elliotte Harold, Adjunct Professor, Polytechnic University The main idea of a version control system is to contain the software project in a so called repository; from which developers can check out copies of a project and in this way create local working copies. These working copies can then be edited and eventually uploaded, or committed, back to the repository, as a new version, or revision, of the file that has been modified. If several developers simultaneously are editing working copies of the same file, the version control system must be able to deal with conflicts that might occur when the developers later try to commit their different working copies to the repository. To be sure that a developer always has the latest revision of a file he or she should update his copy from the repository frequently, and at least before commit. The most commonly used version control system for the latest 20 years has been Concurrent Versions System, or CVS. In contrast to most other version control systems CVS uses a so called non-locking repository, which allows several developers to simultaneously edit local working copies of a file. This is in contrast to a locking repository, in which only one developer at a time can gain write access to a specific file. Although it is a good system, CVS is starting to get aged and is, because of its limited ability to handle file content, not suitable for all kinds of modern software development. Because of this, in 2004, the first version of its successor Subversion, or SVN, arrived, developed by the same people responsible for CVS. 1 The normal convention is to use three root folders for a software project: branches, tags, and trunk. Branches are for experiments. Tags normally identify older, already released versions of the software. However, most of the time, you'll want to work on the main branch, which is called trunk. SVN can be used in combination with Eclipse by using the plug-in Subclipse. In this way you can perform version control in a window environment directly on the projects you are developing in Eclipse.

As an alternative to SVN, Git exists. Git was developed by Linus Torvalds in 2005 for the development of the Linux kernel. Just as SVN this is also a non-locking repository and the main difference from SVN is that Git is a distributed version control while SVN is a client-server system. Git is by default included in the standard Eclipse version. Purpose The purpose of this exercise is to give you a fundamental understanding and practical experience of how a version control system works in general, some of the things that are possible with Git and SVN. It is possible to work with Git and SVN from the terminal (by typing the commands) or from a graphical user interface (e.g. standalone clients or plugins to IDEs such as eclipse). To have a perspective on both usages you will be doing the Git part of this lab mostly from the command line and the SVN part by using the Subclipse SVN plugin to eclipse IDE. 1. Git These tasks are for demonstrating some features and problems that may occur using version control and the features in Git. To make life a bit easier we will in the later part of the exercise pretend that we are monitoring two different developers, named Peter and Sally, who are working for the same company. This company has recently bought a project called HelloWorld. However, the product manager of the company would like to make some changes to HelloWorld and has put both Peter and Sally to work on the project. Of course, since Peter and Sally do not exist you will have to carry out the tasks for them. When you have finished the tasks you should report to the lab assistant and give an oral explanation and a demonstration of what you have done and what you learned from it. Be prepared to answer questions about details about your solution. Note: Using several workspaces can be a bit confusing. Therefore, it is very important that you read what you should do, before you do it! In the worst case you will have to re-do the lab from start if you just miss a single instruction. Task 1. Setting up a Git repository and importing a project In this first task you will create a Git repository and import the HelloWorld project to the repository. However, since this is something that developers usually don t have to bother about, we will not pay it that much attention, but only go through the task.

Open a terminal and run the following commands: git config --global user.name "<first name> <surname>" Change <first name> to your name and <surname> to your surname git config --global user.email <liu-id>@student.liu.se Change <liu-id> to your liu-id mkdir p ~/TDDC88/git_lab cd ~/TDDC88/git_lab mkdir remote cd remote git init --bare HelloWorld.git This will create an empty git repository HelloWorld placed in the folder git_lab/remote placed in your home folder. The ~ is short for your home folder /home/<liu-id>/. *This folder corresponds to a remote repository where everyone has access to. Usually reachable through a network (e.g. internet). mkdir ~/TDDC88/git_lab/tmp cd ~/TDDC88/git_lab/tmp This will create and navigate to a temporary folder. git clone ~/TDDC88/git_lab/remote/HelloWorld.git This clones the repository we just created into a folder HelloWorld in the current directory. You should now have a copy of the repository in the current folder (tmp). The project is still empty. (NOTE: If you receive fatal error by running git add -A that says: it is not a git repository, than run the command cd HelloWorld ). cp r /home/tddc88/labs/helloworld./ git add A git commit m "Added HelloWorld files to repository." git push origin master This will be explained later, but it will in short we copied new files into the project. Added them to version tracking with Git. Committed the new changes. Then pushed our changes to the remote origin (which is located at git_lab/remote) so that everyone else can see them. cd ~/TDDC88/git_lab rm -rfd tmp Remove the temporary folder. We don t need it anymore. Task 2. Checking out working copies to two different workspaces In this task we will set up two new workspaces, one for Peter and one for Sally, and check out one working copy from the Git repository to each of the workspaces. You will from now on need two terminal sessions running at the same time. Use eclipse to modify and run the code.

Using two different eclipse and terminal sessions can be confusing since it might not be easy to tell which one belongs to who. So we will use the Workspace Switcher. The workspace switcher will keep the two desktops separate. In simple terms it would be as if you had two computers side by side (although it really is not! files, system resources are still shared). To install the workspace switcher: 1. right-click on the taskbar at the bottom of the desktop. 2. In the window that pops up. Scroll down and select workspace switcher Now you should see the workspace switcher at the task bar. By default, it has 4 Workspaces. 3. To make identifying simpler we will let the Switcher show the workspace names. Right click on the switcher panel and choose preferences. Then mark Show workspace names in switcher. Click Close. From now on Workspace 2 will be assumed Peter s and Workspace 3 will be Sally s. Workspace 1 will have every window you have already opened so we will leave that as it

is. Use it as you want. Pay attention to which workspace you are working on when you work as one of them. Now we are ready to start working as Peter. Switch to Workspace 2. Open a terminal and run the following commands: mkdir ~/TDDC88/git_lab/peter cd ~/TDDC88/git_lab/peter Create and navigate to peters folder git clone ~/TDDC88/git_lab/remote/HelloWorld.git Clone a working copy of the repository to peter. You should now have a folder named HelloWorld in the current folder (which is peter). This is your clone. It is Sally s turn now. Switch to Workspace 3. open a new terminal and do the same for sally: mkdir ~/TDDC88/git_lab/sally cd ~/TDDC88/git_lab/sally git clone ~/TDDC88/git_lab/remote/HelloWorld.git Back to Peter. Switch to Workspace 2. Open eclipse. Choose /home/<liu-id>/tddc88/git_lab/peter as your workspace. Click File New Project Select Java Project and click Next. As project name type HelloWorld after that everything should be grayed out so just press Finish. You will get a question about the Java perspective which you can select yes in. Switch to Sally s workspace and do the same for Sally. Use /home/<liu-id>/tddc88/git_lab/sally as your workspace this time.

Task 3. Modify-Commit-Conflict that can be automatically resolved Both Peter and Sally will now begin their modifications of HelloWorld. Their first assignment is to add some comments in the file HelloWorldFrame.java. Although, it is the only file in the project, the CEO still wants to clarify that it is the main file. 1) Sally starts by adding a comment at the top of the file HelloWorldFrame.java, clarifying that this is the main file; //This is the main file. Be sure that you are in Sally s workspace, add this comment and save the file! 2) Sally then checks if there has been a new revision to the repository and performs an update. To do this run git pull (Note: If you opened eclipse using terminal, than you should open new Terminal and run 'cd ~/TDDC88/git_lab/sally/HelloWorld' before running git pull command) in sally s terminal. Has anything happened since the latest revision? (Note: In some cases, if you receive message that this is not a git folder, you need to go in HelloWorld folder by writing 'cd HelloWorld' command on terminal) 3) Switch to Peter s workspace. 4) Peter, who is lagging behind somewhat, adds a comment right above the main method; //This is the main method. Add this to his working copy of the file and save it. Peter also checks for new revisions. (Note: If you opened eclipse using terminal, than you should open new Terminal and run 'cd ~/TDDC88/git_lab/peter/HelloWorld' before running git pull command) Do this! Has anything happened? Why/why not? 5) Switch to Sally s workspace. 6) Sally now feels pretty satisfied and decides to commit her working copy to the repository. Do this for her using the following commands: git status To check for unstaged changes, HelloWorld/HelloWorld/src/helloworld/HelloWorldFrame.java Should be marked in red. If you have unstaged.class files don t add those. git add <file path> This command puts the file in the staging area. Change <file path> to the unstaged file i.e. HelloWorld/HelloWorld/src/helloworld/HelloWorldFrame.java git commit -m Enter your/any commit message here This commits the changes. git pull git push This updates the server with your changes. git log -2 This shows the last 2 commits. 7) What is the git log output after the push? 8) What is the staging area for? 9) Why should you do a git pull before pushing?

10) Switch to Peter s workspace. 11) Peter also feels it is time to make a commit. Therefore, commit the file to the repository using the same procedure as above (i.e. number 6 above). Remember to enter a commit comment. What happened? Tip. If you find yourself in JOVE for solving a merge use the commands in the following order to save and exit (don t write the commas): ctrl+x, s, ctrl+x, ctrl+c, 12) Would it have been possible to solve the problem just as easily if Peter had added a comment at the top of the file as well? 13) Which is the three latest commit messages after Peter successfully has committed the file? Task 4. Modify-Commit-Conflict that must be manually resolved The product manager has also asked Peter to change the color of the Hello World - message from blue to green when pressing the button (tip: this can be done by locating the line jlabel.setforeground(new Color(0,0,255)); in main file). However, due to a misunderstanding Sally thought she was assigned to do this, she also thought the color should be red instead of blue. (Tip: for red it should be (255,0,0,) in the instruction and for green it should be (0,255,0) in the instruction) 1) Switch to Sally s workspace. 2) Make a pull for Sally (i.e. git pull) so that she has the latest revision. Locate the section in the file containing the information of the color, and enter the code for red. Save the file and run the application to make sure the text turns red instead of blue. Then make a commit with a suitable commit comment and push it to the server. 3) Switch to Peter s workspace. 4) Without first making an update with pull, help Peter change the color to green (changing color has been explained in task 4). Save the file and test the application! When you are done, try to commit and push the file (number 6 in Task 3 but do not run git pull command). If it does not work, you must solve the conflict in it and commit the merge! Tip: now run 'git pull' command in terminal and go to Peters's Eclipse and look for rows looking like these and replace it with what it should be: <<<<<<< HEAD // This is your local version ======= // This is the conflictiong change from the server >>>>>>> 9c421ebb4def402d2204d05301aec9b1b07e148a after updating the java file, run the following commands: git status git add <file path> git commit -m Enter your/any commit message here git push What happens? Can this problem be solved like before? Why/why not?

Task 5. Roll-back to an earlier revision The CEO of the company, who has been under a lot of stress lately, suddenly realizes that it is probably best to go with the blue color after all. The product manager is notified about this and asks Sally to fix it. 1) Switch to Sally s workspace and make sure she has the latest version by running git pull. 2) Sally, being a practical developer, thinks the best way to fix this is to make a so called roll-back to an earlier revision instead of changing the code. Help her with this. In this task you can choose to do it in eclipse or in the terminal. 3) In the terminal run git log and find a suitable commit that you want to check. On the commit you want to check copy the string following commit looking something like this 775b4b53e2de4d85f794c5932af3e5f133ffde07. (press q to exit from git log terminal) Then run : git diff HEAD 775b4b53e2de4d85f794c5932af3e5f133ffde07 This command will show what will be changed if we roll back or revert that commit. When you find the commit you want to revert run: git revert 775b4b53e2de4d85f794c5932af3e5f133ffde07 git pull git push Tip. If you find yourself in JOVE for solving a merge use the commands in the following order to save and exit (don t write the commas): ctrl+x, s, ctrl+x, ctrl+c, In Eclipse Right-click on the file and select Team Show in history. Right-click on a change and choose Compare with Workspace If it is the commit you want to revert right click it again and choose Revert commit. When the revert is done right click on the project and choose Team Push to upstream. 3) What does the log say now, why?

2.SVN To demonstrate some problems that may occur using version control and the features of SVN, you will in this lab work with three different workspaces in Eclipse, of which two simultaneously. To make life a bit easier we will in the later part of the exercise pretend that we are monitoring two different developers, named Peter and Sally, who are working for the same company. This company has recently bought a project called HelloWorld. However, the product manager of the company would like to make some changes to HelloWorld and has put both Peter and Sally to work on the project. Of course, since Peter and Sally do not exist you will have to carry out the tasks for them. When you have finished the tasks you should report to the lab assistant and give an oral explanation and a demonstration of what you have done and what you learned from it. Be prepared to answer questions about details in your code. Note: Using several workspaces can be a bit confusing. Therefore, it is very important that you read what you should do, before you do it! In the worst case you will have to re-do the lab from start if you just miss a single instruction. Task 1. Setting up a SVN repository and importing a project In this first task you will create a SVN repository and import the HelloWorld project to the repository. However, since this is something that developers usually don t have to bother about, we will not pay it that much attention, but only go through the task. Open a terminal and run the following command (Tip: If svnadmin command failed, create directories separately and then run the svnadmin command): svnadmin create /home/<username>/tddc88/svn_lab/repo This will create an empty SVN repository in the folder repo placed in the folder svn_lab placed in your home folder. NOTE: If you have errors during directory creation, first create all directories with 'mkdir -p /home/<username>/tddc88/svn_lab/repo' then run svnadmin create command. 1) Start Eclipse and import the HelloWorld project. It is located in /home/tddc88/labs/helloworld by choosing the File-menu and then Import... General Existing Projects into Workspace Click Next. 2) Click the radio button Select root directory: and fill in /home/tddc88/labs/helloworld Click the check-box Copy projects into workspace when importing. Click Finish. 3) Right-click on the Hello World project and select Team Share Project SVN and click Next. 4) Select the option Create a new repository location Click Next. 5) Fill in file:///home/<username>/tddc88/svn_lab/repo

in Location URL text box, where username is your liu-id. * This is a URI. Just like http://... The extra slash on file:/// corresponds to the root folder in unix-like systems which is denoted by /. Click Next. 6) Click Finish 7) Right-click on Hello World project, Team Commit (enter message and ) and click ok 8) Close Eclipse Task 2. Checking out working copies to two different workspaces In this task we will set up two new workspaces, one for Peter and one for Sally, and check out one working copy from the SVN repository to each of the workspaces. You will from now on have two Eclipse sessions running at the same time. Since this can be somewhat confusing, a good idea to use the Workspace Switcher. To install the workspace switcher: right-click on the star-menu in the right corner. 1. In the window that pops up. Scroll down and select work space switcher 2. To make identifying simpler we will let the Switcher show the workspace names. Right click on the switcher panel and choose preferences. Then mark Show workspace names in switcher. Click Close.

From now on Workspace 2 will be assumed Peter s and Workspace 3 will be Sally s. Workspace 1 will have every window you have already opened so we will leave that as it is. Use it as you want. Pay attention to which workspace you are working on when you work as one of them. (Note: you may need to create a folder for sally and peter as before) Now we are ready to start working as Peter. Switch to Workspace 2. 3. Start Eclipse again but use the workspace (if peter is not there, you can create a folder) /home/<liu-id>/tddc88/svn_lab/peter 4. To check out Peter s working copy of HelloWorld, right click in the Project Explorer and select New->Project. Extend SVN and select Checkout Projects from SVN and click Next. 5. Select Create a new repository location, click Next. 6. Type in the url for the HelloWorld project contained in the SVN repository: file:///home/<username>/tddc88/svn_lab/repo/helloworld click Next. Click Next.

7. Select file:///home/<username>/tddc88/svn_lab/repo/helloworld Click Next. Click Next. Click Finish. 8. Now you can test run the program by for example go into the project files. HelloWorld Source helloworld and right-click on HelloWorldFrame.java and Select Run as Java application 9. What revision of the file HelloWorldFrame.java do you have? 10. Now, repeat the steps starting from step 4 above for Sally. Remember that you should not close the current Eclipse session! Use the Workspace Switcher on the desktop! And use /home/<liu-id>/tddc88/svn_lab/sally as your workspace. Task 3. Modify-Commit-Conflict that can be automatically resolved Both Peter and Sally will now begin their modifications of HelloWorld. Their first assignment is to add some comments in the file HelloWorldFrame.java. Although, it is the only file in the project, the CEO still wants to clarify that it is the main file. 1) Sally starts by adding a comment at the top of the file HelloWorldFrame.java, clarifying that this is the main file; //This is the main file. Be sure that you are in Sally s workspace, add this comment and save the file! 2) Sally then checks if there has been a new revision to the repository and performs an update. To do this select Team->Update to HEAD. Has anything happened since the latest revision? 3) Switch to Peter s workspace. 4) Peter, who is lagging behind somewhat, adds a comment right above the main method; //This is the main method. Add this to his working copy of the file and save it. Peter also checks for new revisions. Do this! Has anything happened? Why/why not? 5) Switch to Sally s workspace. 6) Sally now feels pretty satisfied and decides to commit her working copy to the repository, do this for her (TEAM->COMMIT)! Remember to add a commit comment and be sure to write Sally in the comment text field. What revision is Sally working with after the commit? 7) Switch to Peter s workspace. 8) Peter also feels it is time to make a commit. Therefore, commit the file to the repository. Remember to enter a commit comment. What happened? Help Peter solve the problem and commit again! 9) Would it have been possible to solve the problem just as easily if Peter had added a comment at the top of the file as well? 10) Which is the latest version of the file after Peter successfully has committed the file?

Task 4. Modify-Commit-Conflict that must be manually resolved The product manager has also asked Peter to change the color of the Hello World - message from blue to green when pressing the button. However, due to a misunderstanding Sally thought she was assigned to do this, she also thought the color should be red instead of blue. 1) Switch to Sally s workspace. 2) Make an update for Sally so that she has the latest revision (TEAM UPDATE To HEAD). Locate the section in the file containing the information of the color, and enter the code for red. Save the file and run the application to make sure the text turns red instead of blue. Then make a commit with a suitable commit comment (TEAM->COMMIT). 3) Switch to Peter s workspace. 4) Without first making an update, help Peter change the color to green. Save the file and test the application! When you are done, try to commit the file. If it does not work, you must update it! What happens? Can this problem be solved like before? Why/why not? 5) Peter has now noticed that he is not the only one working on the file. Help him to detect how the history of the file has changed by selecting Team->Show in History. 6) After confirming Sally s mistake from the History, help Peter fix the problem, by deleting code appropriate parts of the code. Make sure the Hello World - message now turns green. Save the file and confirm the manual change by selecting Team->Mark Resolved. Finally, commit the file. Task 5. Roll-back to an earlier revision The CEO of the company, who has been under a lot of stress lately, suddenly realizes that it is probably best to go with the blue color after all. The product manager is notified about this and asks Sally to fix it. 1) Switch to Sally s workspace and make sure she has the latest version. 2) Sally, being a practical developer, thinks the best way to fix this is to make a so called roll-back to an earlier revision instead of changing the code. Help her with this by using Compare With->Revision. Right-click on a suitable revision and select Get contents and save. Finally, make a new commit so that the latest revision of the application is the one with the blue Hello World -message. 3) Which is the final revision of the file? Examination When you are done and understand all steps in part A contact your assistant during a lab occasion. Be ready to answer questions concerning what you did when demonstrating. You don't need to hand in anything. References and resources: Version control with Subversion http://svnbook.redbean.com/

Tigris.org, Open Source, Subversion http://subversion.tigris.org/ Introducing Subversion http://www-128.ibm.com/developerworks/java/library/j-subversion/index.html