Object-Oriented Software Engineering Using UNIX groups and Subversion Estimated Time: 30-40 minutes “Unix is user-friendly. It's just very selective about.

Slides:



Advertisements
Similar presentations
Week 2 DUE This Week: Safety Form and Model Release DUE Next Week: Project Timelines and Website Notebooks Lab Access SharePoint Usage Subversion Software.
Advertisements

TortoiseSVN By Group 1 Team B. Installing TortoiseSVN.
Intro to Version Control Have you ever …? Had an application crash and lose ALL of your work Made changes to a file for the worse and wished you could.
Version Control System (Sub)Version Control (SVN).
Version Control CS440 – Introduction to Software Engineering © 2014 – John Bell Based on slides prepared by Jason Leigh for CS 340 University.
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Git/Unix Lab March Version Control ●Keep track of changes to a project ●Serves as a backup ●Revert to previous version ●Work on the same files concurrently.
2/6/2008Prof. Hilfinger CS164 Lecture 71 Version Control Lecture 7.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
Linux+ Guide to Linux Certification, Second Edition
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
By Steven Campbell and Erik Boone.  Sharing projects by putting them into a central repository.  Checking out copies of projects from the repository.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
Version Control with Subversion Quick Reference of Subversion.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Linux+ Guide to Linux Certification, Second Edition
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
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.” The programmer.
Object-Oriented Software Engineering Using UNIX groups and CVS Estimated Time: minutes.
Version control Using Git Version control, using Git1.
Drexel University Software Engineering Research Group Git for SE101 1.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
(Sub)Version Control. 2 Keep large teams working on the same code Back up your work so you don't lose it all Compare changes to previous versions Revert.
SVN in Eclipse Presented by David Eisler 10/09/2014.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
Publishing Your Web Pages Ann Emmanuel SIUE Web Administrator
Chapter 3 Some additional notes… File permissions A file has three types of permissions (read, write and execute). Available to three categories of users.
Refactoring and Synchronization with the StarTeam Plug-in for Eclipse  Jim Wogulis  Principal Architect, Borland Software Corporation.
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Version Control and SVN ECE 297. Why Do We Need Version Control?
SECTION 1: CODE REASONING + VERSION CONTROL slides borrowed and adapted from Alex Mariakis and CSE 390a Justin Bare & Deric Pang.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
BIF703 File Permissions. As you recall from our previous notes, that Unix/Linux recognizes everything as a file: Regular files to store data, programs,
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
DIGITAL REPOSITORIES CGDD Job Description… Senior Tools Programmer – pulled August 4 th, 2011 from Gamasutra.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Problem Solving With C++ SVN ( Version Control ) April 2016.
Subversion Subversion is a brand of version control software that is frequently used to store the code and documentation of a project so as to permit.
Discussion #11 11/21/16.
Version Control with Subversion
SVN intro (review).
Chapter 3 Maintaining Security
Discussion 11 Final Project / Git.
Version Control overview
CSE 303 Concepts and Tools for Software Development
Concurrent Version Control
BIF703 File Permissions.
Version Control System
slides borrowed and adapted from Alex Mariakis and CSE 390a
Compilers, Make and SubVersion
Subversion Basics Guide
Git CS Fall 2018.
Using GitHub for Papyrus Models Jessie Jewitt – OAM Technology Consulting/ ARM Inc. January 29th, 2018.
Presentation transcript:

Object-Oriented Software Engineering Using UNIX groups and Subversion Estimated Time: minutes “Unix is user-friendly. It's just very selective about who its friends are.”(Magi’s favourite quote )

Unix Groups You should now have been placed in a Unix group on the GAUL system Everyone in your project group (team) should be in the same Unix group This means that you can share files with your group members without letting members of other groups see them You will want to do this for the final code submission directory We will look at several commands groups – for seeing what Unix groups you are in chgrp – for assigning the group ownership of a file chmod – for permitting group members to access a file

UWO Computer Science Department3 Your Unix Groups To find what Unix groups you are in, issue the command groups You should see a group name with the string CS2212 in it E.g CS2212-YXX where Y is your section number: 1or 2 and XX is your group number: 07 for group 7 This is the Unix group that all the members of your project group are in You should also see a group name indicating that you are in an undergrad course (e.g. 2ndyr or undrgrad) This is your default group, but does not matter for CS 2212 purposes

UWO Computer Science Department4 Giving a File to Your Group Permitting a file to your Unix group has two stages: Change the group ownership of the file Permit it “to group” Every file has two owners: A user (i.e. you, for your files) A Unix group By default, your default Unix group is the group owner of your files To change the Unix group of a file or files, issue the command chgrp group file, where group is the Unix group you want to change it to file is the name of the file Example: to give ownership of QueueTypes.h to group CS212-YXX: chgrp CS2212-YXX QueueTypes.h You can do more than one file this way: e.g. chgrp CS2212-YXX *.c *.o

UWO Computer Science Department5 Checking Group Ownership To see what group a file belongs to: Issue the command “ls –lg file” This will list the group owner after the user owner Example: cartier issues command “ls –lg QueueTypes.h” System responds with something like: -rw cartier CS2212-YXX 258 Oct 17 09:59 QueueType.h CS2212-YXX is the group owner A file can only have one group owner; to change it, just use the chgrp command again with a different group name To restore default group ownership to a file, just make a copy of it and delete the original But using only the chgrp command is still not sufficient to let other members of your group to see the file It is necessary to permit the file by changing the access mode of the file

UWO Computer Science Department6 Permitting Your Group Access To let the members of a Unix group see a file owned by that Unix group, issue the command chmod g+rw file This permits the group (g) to have read access (+r) to file It also permits the group (g) to execute (x) file it is already executable You can do this on multiple files too Example: cartier issues command chmod g+rx QueueTypes.h Then cartier issues command ls –lg QueueTypes.h System should give something like: -rw-r cartier CS2212-YXX 258 Oct 17 09:59 QueueType.h The second r in –rw-r----- indicates that the group now has access People outside the Unix group (“others”) do not have read access unless you also say chmod o+rx file

UWO Computer Science Department7 Permitting Access to Directories Note: to give access to a file in a directory, you have to chgrp and chmod the directory too! Option –R on chgrp and chmod will do it recursively on all members of the directory Example: from home directory cartier says chgrp –R CS2212-YXX project chmod –R g+rx project Directory project and everything in it now accessible to group CS2212-YXX For more details on how to permit files other different ways, see man chmod

UWO Computer Science Department8 Summary User cartier does: groups System response with: 2ndyr CS2212-YXX cartier now does: chgrp –R CS2212-YXX project chmod –R g+rx project cd project ls –lg QueueTypes.h System responds with something like: -rw-r cartier CS2212-YXX 251 Oct 17 09:59 QueueTypes.h User bolivar (in the same group) does: groups System responds with: 3rdyr CS2212-YXX bolivar now does: cd ~cartier/project User bolivar will now be able to read QueueTypes.h

UWO Computer Science Department9 Code Repositories Repository for code is used when coding with other team members, where you share the code. Your whole team has access to the repository. Some common ones: Subversion (SVN), CVS, Git Why do we need repositories? —So we don’t overwrite each others changes —To roll back changes —To have a history of who did what —So we always have a working copy

UWO Computer Science Department -JAMIE ANDREWS CS Revision Control: The Problem Take a software project where: There are several files with several people working on those files You want one final version of everything Possible Problems Different people having different versions of files Inconsistent changes by different people Changes getting lost

UWO Computer Science Department -JAMIE ANDREWS CS Example 1: Conflicting Changes 1.Bob has master copy of the files Person.java and Address.java 2.Alice and Chris get copies of both files 3.Alice changes Person.java and Chris changes Address.java (everything still works for them) 4.Alice copies Person.java back to Bobs area, Chris copies Address.java back to Bobs area 5.Bob tries but can’t compile the program anymore 6.Now there is no working master copy!

UWO Computer Science Department -JAMIE ANDREWS CS Example 2: Changes Getting Lost 1.Alice and Chris both change Person.java 2.Chris sends his copy to Bob 3.Later, Alice sends her changes to Bob 4.Finally, Chris gets Alices changes from Bob 5.Now no one has Chris’s original changes!

Git Hub We are going to use GitHub to hold the repo in a “cloud” - UWO Computer Science Department13

UWO Computer Science Department14 Minimizing Problems ALWAYS FOLLOW THESE STEPS: — Start fresh  Before starting any work, update all the files in your workspace with the latest updates (In Eclipse you right click on the project in Subversion Repository View and select Checkout) —Run your unit tests  Make sure they all pass, if the system is broken before you start and you start making changes, you won’t know if your changes broke it, or there were previous problems —Make changes  Do all your editing in your local workspace. Debug until everything works —Run the unit tests again  Make sure your changes didn’t break any of the other components that you weren’t even working on. —Synchronize  When you are ready to commit, synchronize. Check incoming changes and add them to your files. Resolve changes. Rerun your unit tests to make sure everything is still correct. THEN COMMIT YOUR CHANGES!

UWO Computer Science Department15 Terminology Check Out  checks out all the files in the project Update  gets the latest version from the repository and inserts it into your stuff (you should always do this first) Sync with repository  Shows the modifications between the latest version in the repository and the changes you have made Commit  takes your current file and writes it to the repository (so this will be the new master copy)

UWO Computer Science Department16 When you Sync with Repository, you will see something like this: This shows the changes, resolve the changes and then sync again, then commit when you have no changes.

UWO Computer Science Department17 Step 1: Create a Repository Have one person create an initial repository on Gaul: In unix, create a directory that will be the repository Change the permissions on that directory so your group can access it. Go to that directory and type pwd to find the absolute path Create the Subversion repository as follows: svnadmin create Repo Build the repository in Eclipse (build a project, add some files, then go to the Subversion perspective to attach your files to the repository) Have your group members attach to your repository in Eclipse

UWO Computer Science Department18 Step 2: Change the permission on the directories Make sure that the user who creates the repository on Gaul changes the permission and groups on the appropriate directories NOTE: I read that you have to do a chmod like this: chmod g+rws (set the setgid bit – default group id- now files created in the directory will have the same group as the directory NOT the default group)

UWO Computer Science Department19 Step 3: Share Projects Note: A file is flagged as either ASCII or Binary, this is important when Subversion displays the line-by-line changes. In most cases, text files should be ASCII To share the project: Right click on the project in Navigator view (Window > Show View > Navigator (MIGHT NOW BE CALLED PROJECT EXPLORER) and select Team, then select Share Project. Just leave the name the same as the project name. Commit the files in the project to the repository

UWO Computer Science Department20 Step 4: Bring in Another User Another user wants to use files in the repository, so he/she would: Open the Subversion Perspective Right click in the window and select new > Repository Location Type in the same machine (gaul) and absolute path, but his/her own userid and password Then expand the repository location, then expand HEAD and you should see the project. Right click on the project and choose Checkout As Project, select Navigator view and now the other user sees the project.