CSE 160: Introduction to Parallel Computation

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

Versioning. Jurriaan Hage homepage: Slides stolen from Eelco Dolstra.

Version Control System. -- base on Subversion 1.4

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

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

Version Control Systems (Part 1)

Software Tools Subversion

Using Subversion with LeMANS and MONACO

An Introduction to Subversion

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

Department of Computer Science College of Engineering Boise State University

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Subversion Repository Layout

Lab 08. Command Line and Git

Version Control with Git ME 461 Fall 2018

Review Version Control Concepts

Version Control Systems: Overview

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

Introduction to Revision Control

CSCI 4152/6509 Natural Language Processing. Lab 1: FCS Computing Environment

CS2720 Practical Software Development

Handout 4: Version Control Reference

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

Implement an ADT while using Subversion

Visualizing Git Workflows. A visual guide to 539 workflows

Revision control systems (RCS) and. Subversion

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

b. Developing multiple versions of a software project in parallel

9 and 11-Jan CSCI 4152/6509 Natural Language Processing Lab 1: FCS Computing Environment, SVN Tutorial. FCS Computing Environment, SVN Tutorial

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

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

Project Management. Overview

Welcome! Virtual tutorial starts at 15:00 GMT. Please leave feedback afterwards at:

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

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

Version Control Systems

Version Control. CSC207 Fall 2014

Using Git to Manage Source RTL

CS 320 Introduction to Software Engineering Spring February 06, 2017

Computer Labs: Version Control with Subversion

A Short Introduction to Subversion

TDDC88 Lab 4 Software Configuration Management

Systems Programming Advanced Software Development

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

Git tutorial. Katie Osterried C2SM. October 22, 2015

Apache Subversion Tutorial

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

SECTION 2: CODE REASONING + PROGRAMMING TOOLS. slides borrowed and adapted from Alex Mariakis and CSE 390a

Chapter 3. Revision Control

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

CSE 391 Lecture 9. Version control with Git

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

Version Control Systems (VCS)

Common Configuration Management Tasks: How to Do Them with Subversion

Version control system (VCS)


AIS Grid School 2015

Source Code Management

Version Control Systems. Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

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

Source control with Subversion A user perspective

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

Computer Labs: Version Control with Subversion

Hg Tutorial. For : COP Object oriented Programming (Using C++) Biswas Parajuli

Version control CSE 403

Software Project (Lecture 4): Git & Github

12/7/09. How is a programming language processed? Picasso Design. Collaborating with Subversion Discussion of Preparation Analyses.

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

M E R C U R I A L (The Source Control Management)

CS108, Stanford Handout #37. Source Control CVS

Revision Control and GIT

Weak Consistency and Disconnected Operation in git. Raymond Cheng

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

CSE 331 Software Design & Implementation

CS 1653: Applied Cryptography and Network Security Fall Term Project, Phase 2

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

Revision Control. Software Engineering SS 2007

Git(Lab) Tutorial and Hands-On

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes

CSC 2700: Scientific Computing

Using CVS to Manage Source RTL

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

Intro Git Advices. Using Git. Matthieu Moy. Matthieu Moy Git 2016 < 1 / 11 >

The Old World. Have you ever had to collaborate on a project by

Software Development I

Recap: Developer's Environment

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

VSO. Configuration Management

Versioning. Terms. Configuration item (CI) Version Configuration Management aggregate Configuration Baseline

Tutorial 2 GitHub Tutorial

Laboratorio di Programmazione. Prof. Marco Bertini

Home Page. Title Page. Contents. Page 1 of 17. Version Control. Go Back. Ken Bloom. Full Screen. Linux User Group of Davis March 1, Close.

What is Subversion and what does it do?

Computer Science 62 Lab 8

Managing Source Code With Subversion

You should see something like this, called the prompt :

Revision control Advanced git

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.

Transcription:

CSE 160: Introduction to Parallel Computation Discussion Section SVN Tutorial Based primarily on material provided by Ingolf Krueger Contributions made by Jing Zheng, Yashodhan Karandikar, and Scott B. Baden University of California Department of Computer Science & Engineering September 2013 CSE 160 1

Version Control (a.k.a Configuration Management) with subversion September 2013 CSE 160 2

Scenario I Work alone at a project on your laptop Delete a file accidently How can I revert to yesterday s version? Oh, no! It s on my desktop September 2013 CSE 160 3

Problems of Individual Non-Version Controlled Software If you save your work over what you had before, any prior work is gone forever No ability to revert back to a prior version of a particular file (the one without the error!) No ability to freeze one version for safekeeping and continue to work on a new version No ability to recover from hard-disk failure Does not provide the flexibility to work anywhere. What if you are working on a desktop at school/the office, and want to continue to work at your home desktop? September 2013 CSE 160 4

Scenario II Assume now, you are developing in a small team. The team uses a regularly backed-up file-sharing mechanism (such as a shared network drive). What can go wrong? Bob September 2013 CSE 160 5

Problems of Team Non-Version Controlled Software The last one who saves wins Work gets artificially sequentialized Still no ability to revert back to a prior version of a particular file Still difficult to freeze one version for deployment and continue to work on a new version What if you are working on a desktop at school/the office, and want to continue to work at your home desktop but have no access to the file share? September 2013 CSE 160 6

Solution: Version Management with Dedicated Repository Introduce a Version Management Repository that holds the master copy of all artifacts (code, tests, build files, graphics, ) of your project September 2013 CSE 160 7

Solution: Version Management with Dedicated Repository If needs access to the code, she checks out a local copy check out September 2013 CSE 160 8

Solution: Version Management with Dedicated Repository Now commits (publishes her edited files) svn commit m Changed return statement commit September 2013 CSE 160 9

Let s see how to use svn for our assignment code development! September 2013 CSE 160 10

Lab Assignment Repository Each student has a svn account can be used to access the group repository e.g. alice, bob Each group has a repository directory on BANG e.g. G-alice-bob Email TA if you need to change your partner before each assignment release. Course policy: No group may change once an assignment starts! September 2013 CSE 160 11

Checkout Starter Code Starter code is in /SVN/A1/Provided svn co --username alice \\ svn://ccom-bang-login.ucsd.edu/svn/a1/provided!./provided:! check out September 2013 CSE 160 12

Checkout Your Group SVN Directory Your group ID will be sent to your ucsd.edu email after your group registers through the Google form (check Moodle for the form s link ) svn co --username alice svn://ccom-banglogin.ucsd.edu/svn/a1/turnin/g-alice-bob Turnin!./Turnin:! check out September 2013 CSE 160 13

Import Starter Code To Your Group SVN Directory Add the code in Provided to your own repository $ cp Provided/* Turnin $ cd Turnin $ svn add * $ svn ci m import the starter code Comments are very important. Lack of meaningful comments may hurt your grade./turnin:! commit September 2013 CSE 160 14

and Bob s Collaboration Bob also checks out a local copy into his local folder svn co --username bob svn://ccom-banglogin.ucsd.edu/svn/a1/turnin/g-alice-bob Turnin!./Turnin:!./Turnin:! check out Bob September 2013 CSE 160 15

and Bob s Collaberation Bob and individually make changes to their own local copy int fun(int x){!!int y = x*x + 5;!!return y + 10;! }! int fun(int x){!!int y = x*x + 5;!!return y + 2000;! }! Bob September 2013 CSE 160 16

and Bob s Collaberation Now commits (publishes her edited files) svn commit m Changed return statement commit Bob September 2013 CSE 160 17

Solution: Version Management with Dedicated Repository Scenario 2: Bob updates Conflict! svn update! C! Updated to revision 233.! update conflict Bob September 2013 CSE 160 18

Bob looks at the file to find and resolve the conflict int fun(int x){!!!!int y = x*x + 5;! <<<<<<<.mine!!!!return y + 2000;! =======!!!!return y + 10;! >>>>>>>.r233! }! I better chat with about this September 2013 CSE 160 19

Bob makes decisions to resolve the conflicts int fun(int x){!!!!int y = x*x + 5;!!!!return y + 2000;! }! Looks better already September 2013 CSE 160 20

Solution: Version Management with Dedicated Repository Bob indicates that he has resolved the conflict svn resolved! Resolved conflicted state of '! resolved Bob September 2013 CSE 160 21

Solution: Version Management with Dedicated Repository Once he has resolved all conflicts, Bob commits again. This time he succeeds! svn commit! commit succeeds Bob September 2013 CSE 160 22

Solution: Version Management with Dedicated Repository updates at the beginning of her next work increment and the cycle repeats. svn update! update Bob September 2013 CSE 160 23

Summary Check-out the provided code: svn co --username YOUR_AD svn://ccom-banglogin.ucsd.edu/svn/a1/provided Checkout your development repository directory svn co svn://ccom-bang-login.ucsd.edu/svn/a1/ Turnin/YOUR_GROUP Turnin Add the provided code to your development repository. This needs to be done once, by one team member only cp Provided/* Turnin/ cd./turnin svn add * svn commit -m "import the provided code" September 2013 CSE 160 24

Workflow After Checkout and Import Update Make changes Update Always update before beginning work and before committing changes Resolve conflicts Commit September 2013 CSE 160 25

Some Common Mistakes The starter code import should be done at the beginning only Checkout should be done at the beginning only Use svn update to get the latest version in the repository Commit only after you compile and test locally Don t pollute the repository with non-working code Mess up your co-worker s copy if he/she updates Don t forget to commit!! September 2013 CSE 160 26

Some other SVN Commands Revert local changes svn revert Deleting a file svn delete temp.cpp svn commit m Deleting trial.cpp since the trial code has been incorporated into Rename a file svn mv sort.cpp quicksort.cpp svn commit m Renaming sort.cpp to quicksort.cpp to indicate the sorting method being used Don t forget comments!! September 2013 CSE 160 27

Other Features of subversion Create Branches Isolate changes to separate lines of development Example: one branch is the currently deployed version for maintenance, another branch is the current development version Can merge branches Create Tags Similar to a branch Useful to take a snapshot of the code and save it aside in case we need to retrieve it later if something goes wrong September 2013 CSE 160 28

Use of SVN in assignments You MUST use SVN for submitting your assignments in CSE 160 No other source code control system is allowed Include meaningful comments in both the code and the SVN logs. Lack of meaningful comments may affect your grade Do NOT give out your SVN password to anyone September 2013 CSE 160 29

Documentation We are using svn 1.6.11 svn help lists all commands svn help <command> provides detailed documentation for a specific command Beyond Linux From Scratch Editor's Manual See chapter 3 for command summary http://www.linuxfromscratch.org/blfs/edguide/ chapter03.html Version control with SVN (446 pp, definitive source) http://svnbook.red-bean.com/ September 2013 CSE 160 30

Thank you! Any questions? September 2013 CSE 160 31

Backup Slides September 2013 CSE 160 32

Solution: Version Management with Dedicated Repository Introduce a Version Management Repository that holds the master copy of all artifacts (code, tests, build files, graphics, ) of your project September 2013 CSE 160 33

Solution: Version Management with Dedicated Repository If needs access to the code, she checks out a local copy check out September 2013 CSE 160 34

Solution: Version Management with Dedicated Repository If Bob also needs access to the code, he also checks out a local copy check out Bob September 2013 CSE 160 35

Solution: Version Management with Dedicated Repository Bob and individually make changes to their own local copy Bob September 2013 CSE 160 36

Solution: Version Management with Dedicated Repository When is done with her edits, she commits her local copy to the repository. Her changes are automatically merged into the master copy of the file in the repository. commit Bob September 2013 CSE 160 37

Scenario Now Bob is done with his edits, he also wants to commit. What can happen?? commit Bob September 2013 CSE 160 38

Solution: Version Management with Dedicated Repository Scenario 1: and Bob have edited in different areas of the file No conflict! Bob s changes will be merged into the master copy. commit succeds Bob September 2013 CSE 160 39

Solution: Version Management with Dedicated Repository Scenario 2: and Bob have edited in the same areas of the file Conflict! Bob s changes will NOT be merged into the master copy. commit fails Bob September 2013 CSE 160 40

Solution: Version Management with Dedicated Repository To resolve the conflict, Bob first updates his local copy. update Bob September 2013 CSE 160 41

Solution: Version Management with Dedicated Repository He gets notifications of the conflicts inside the affected files. He makes decisions to resolve the conflicts. update Bob September 2013 CSE 160 42

Solution: Version Management with Dedicated Repository Once he has resolved all conflicts, Bob commits again. This time he succeeds! commit succeeds Bob September 2013 CSE 160 43

Solution: Version Management with Dedicated Repository updates at the beginning of her next work increment. update Bob September 2013 CSE 160 44

SVN Workflow Update Make changes Update Always update before beginning work and before committing changes Resolve conflicts Commit September 2013 CSE 160 45