Version Control

Total Page:16

File Type:pdf, Size:1020Kb

Version Control Version Control CS 370 SE Practicum, Cengiz Günay (Some slides courtesy of Eugene Agichtein and the Internets) CS 370, Günay (Emory) Version Control Spring 2014 1 / 15 Project milestone: 4/10 functional prototype opens for testing Other news: May collect some experienced entrepreneurs/venture capitalists to see your projects at the end of semester Today: Version control Centralized: Subversion Distributed: GIT Agenda Make-up lecture: Diagrams useful for your project designs Watch it and do survey by Thursday 3/27 CS 370, Günay (Emory) Version Control Spring 2014 2 / 15 Other news: May collect some experienced entrepreneurs/venture capitalists to see your projects at the end of semester Today: Version control Centralized: Subversion Distributed: GIT Agenda Make-up lecture: Diagrams useful for your project designs Watch it and do survey by Thursday 3/27 Project milestone: 4/10 functional prototype opens for testing CS 370, Günay (Emory) Version Control Spring 2014 2 / 15 Today: Version control Centralized: Subversion Distributed: GIT Agenda Make-up lecture: Diagrams useful for your project designs Watch it and do survey by Thursday 3/27 Project milestone: 4/10 functional prototype opens for testing Other news: May collect some experienced entrepreneurs/venture capitalists to see your projects at the end of semester CS 370, Günay (Emory) Version Control Spring 2014 2 / 15 Agenda Make-up lecture: Diagrams useful for your project designs Watch it and do survey by Thursday 3/27 Project milestone: 4/10 functional prototype opens for testing Other news: May collect some experienced entrepreneurs/venture capitalists to see your projects at the end of semester Today: Version control Centralized: Subversion Distributed: GIT CS 370, Günay (Emory) Version Control Spring 2014 2 / 15 Advantages: I Track changes, keep logs of past development I Automatic backups/safety net I Concurrent versions: XP vs. Win8 I Allows teamwork Why Version Control? It's a must in today's computing industry I Mt. Gox, a company that don't use VC and lost almost a billion dollars. I Other painful stories without VC You can even version control documents, class les, nancial les, . Also called source control, code management, concurrent versioning, revision control, . CS 370, Günay (Emory) Version Control Spring 2014 3 / 15 Why Version Control? It's a must in today's computing industry I Mt. Gox, a company that don't use VC and lost almost a billion dollars. I Other painful stories without VC You can even version control documents, class les, nancial les, . Also called source control, code management, concurrent versioning, revision control, . Advantages: I Track changes, keep logs of past development I Automatic backups/safety net I Concurrent versions: XP vs. Win8 I Allows teamwork CS 370, Günay (Emory) Version Control Spring 2014 3 / 15 Teamwork on the same codebase: How? Seriously, how? CS 370, Günay (Emory) Version Control Spring 2014 4 / 15 Teamwork on the same codebase: How? Seriously, how? No control? Overwrite chaos! CS 370, Günay (Emory) Version Control Spring 2014 4 / 15 Teamwork on the same codebase: How? Seriously, how? Locking CS 370, Günay (Emory) Version Control Spring 2014 4 / 15 Teamwork on the same codebase: How? Seriously, how? Merging CS 370, Günay (Emory) Version Control Spring 2014 4 / 15 Merging example Each commit/check-in increments version What is Subversion? • A centralized version control system Repository • Not the newest form of configuration management, but easy to use and popular – Founded in 2000 – Successor to widely used CVS • Aka SVN Slide 6 Centralized version control: Subversion (SVN) Documentation http://svnbook.red-bean.com/ Common SVN usage scenario: 1 svn checkout gets working copy from repo 2 Make local changes in working copy 3 svn update gets latest changes from repo to sync 4 svn commit (or checkin) sends your changes to repo Example: How to nd a bug 1 You have been messing with the code 2 Suddenly you realized you broke the program 3 How do you nd when was the bug introduced? 4 Hint: Can go back with svn update -rX Investigating the past svn diff shows your changes from last repo version svn diff -cX shows changes in version X svn log [filename] shows all commit logs 4 Hint: Can go back with svn update -rX Investigating the past svn diff shows your changes from last repo version svn diff -cX shows changes in version X svn log [filename] shows all commit logs Example: How to nd a bug 1 You have been messing with the code 2 Suddenly you realized you broke the program 3 How do you nd when was the bug introduced? Investigating the past svn diff shows your changes from last repo version svn diff -cX shows changes in version X svn log [filename] shows all commit logs Example: How to nd a bug 1 You have been messing with the code 2 Suddenly you realized you broke the program 3 How do you nd when was the bug introduced? 4 Hint: Can go back with svn update -rX Advanced concepts: tags, branches, and merging svn tag <name> [-rX] marks a version 1 (e.g., release) Trunks svn copy clones current version as branch 2 Branches svn merge reintegrates branch to main trunk 3 4 Merges T1 Tags 5 6 7 8 9 Discontinued T2 development branch 10 CS 370, Günay (Emory) Version Control Spring 2014 9 / 15 Advanced concepts: tags, branches, and merging svn tag <name> [-rX] marks a version 1 (e.g., release) Trunks svn copy clones current version as branch 2 Branches svn merge reintegrates branch to main trunk 3 What is it good for? 4 Merges Tags for beta test releases, main releases, patches T1 Branches for experimental development Tags 5 See the SVN book for more info 6 7 8 9 Discontinued T2 development branch 10 CS 370, Günay (Emory) Version Control Spring 2014 9 / 15 Obvious: it's centralized! Needs network for: 1 making commits 2 getting updates 3 inspecting revision history (logs, di, etc) What if you're coding on a plane? I Enter distributed version control Limitations of centralized version control Tell me! CS 370, Günay (Emory) Version Control Spring 2014 10 / 15 I Enter distributed version control Limitations of centralized version control Tell me! Obvious: it's centralized! Needs network for: 1 making commits 2 getting updates 3 inspecting revision history (logs, di, etc) What if you're coding on a plane? CS 370, Günay (Emory) Version Control Spring 2014 10 / 15 Limitations of centralized version control Tell me! Obvious: it's centralized! Needs network for: 1 making commits 2 getting updates 3 inspecting revision history (logs, di, etc) What if you're coding on a plane? I Enter distributed version control CS 370, Günay (Emory) Version Control Spring 2014 10 / 15 Can do all VC operations locally now! Thus you need to clone a repo Get your own repo! Get your own repo! Can do all VC operations locally now! Thus you need to clone a repo Remote operations (new concepts): Pull: Get all changesets from origin repo Push: Send your changesets to origin Still has origin repo to communicate between team members In Git, pull can be divided into fetch+merge (like SVN branch merge) So what is local and what is remote? Local operations (same as previous): update/commit tag/branch log/di Still has origin repo to communicate between team members In Git, pull can be divided into fetch+merge (like SVN branch merge) So what is local and what is remote? Local operations (same as previous): update/commit tag/branch log/di Remote operations (new concepts): Pull: Get all changesets from origin repo Push: Send your changesets to origin So what is local and what is remote? Local operations (same as previous): update/commit tag/branch log/di Remote operations (new concepts): Pull: Get all changesets from origin repo Push: Send your changesets to origin Still has origin repo to communicate between team members In Git, pull can be divided into fetch+merge (like SVN branch merge) We will use Github We have educational account with private repositories Open accounts on GitHub and send us your account ids! Example GitHub project Git documentation: http://git-scm.com/documentation History of version control software Revision Control System (RCS): Provided ci, co (checkin, checkout) commands under UNIX. Create revisions for each le invidually Concurrent Version System (CVS): Like RCS, but systemic for directories Collects revision les into repos Subversion (SVN): Allows renaming directories easily Revisions not in les, but kept in database GIT: Because somebody called Linus Torvald a git Developed to keep track of changes in Linux kernel Others: Microsoft SourceSafe, Mercurial, . CS 370, Günay (Emory) Version Control Spring 2014 15 / 15.
Recommended publications
  • Pragmatic Version Control Using Subversion
    What readers are saying about Pragmatic Version Control using Subversion I expected a lot, but you surprised me with even more. Hav- ing used CVS for years I hesitated to try Subversion until now, although I knew it would solve many of the shortcom- ings of CVS. After reading your book, my excuses to stay with CVS disappeared. Oh, and coming from the Pragmatic Bookshelf this book is fun to read too. Thanks Mike. Steffen Gemkow Managing Director, ObjectFab GmbH I’m a long-time user of CVS and I’ve been skeptical of Sub- version, wondering if it would ever be “ready for prime time.” Until now. Thanks to Mike Mason for writing a clear, con- cise, gentle introduction to this new tool. After reading this book, I’m actually excited about the possibilities for version control that Subversion brings to the table. David Rupp Senior Software Engineer, Great-West Life & Annuity This was exactly the Subversion book I was waiting for. As a long-time Perforce and CVS user and administrator, and in my role as an agile tools coach, I wanted a compact book that told me just what I needed to know. This is it. Within a couple of hours I was up and running against remote Subversion servers, and setting up my own local servers too. Mike uses a lot of command-line examples to guide the reader, and as a Windows user I was worried at first. My fears were unfounded though—Mike’s examples were so clear that I think I’ll stick to using the command line from now on! I thoroughly recommend this book to anyone getting started using or administering Subversion.
    [Show full text]
  • Everything You Need to Know About Openjdk's Move to Git and Github
    Menu Topics Archives Downloads Subscribe Everything you need to know JAVA 17 about OpenJDK’s move to Git and GitHub Everything you need to know Blame or thank BitKeeper about OpenJDK’s move to Git Why not Mercurial? and GitHub Why Git? Why GitHub? Why the move, and why now? The move from Mercurial to Git Getting the source code and provided an opportunity to consolidate building the OpenJDK the source code repositories. Conclusion by Ian Darwin Dig deeper May 14, 2021 Download a PDF of this article Have you ever built your own Java Development Kit from source? Most end users of the JDK will not need to build their own JDK from the Oracle source code. I’ve needed to do that only a few times when I was running on the OpenBSD UNIX-like system, which is not one of the three supported platforms. Sure, you might want to build your own JDK to try out a new feature that you think should be added to Java. You might choose to build from source to be sure you are running a more trustworthy binary. Having the complete source code readily available, and now in a more commonly used download format, means it is easier than ever to build your own JDK. Yes, it’s a better-documented, easily configured process than in the past. But it’s still a bit confusing. The source code for the OpenJDK recently moved from the Mercurial version control system (VCS) to the Git VCS and the GitHub repository system, and that’s probably a good thing.
    [Show full text]
  • Code Review Guide
    CODE REVIEW GUIDE 2.0 RELEASE Project leaders: Larry Conklin and Gary Robinson Creative Commons (CC) Attribution Free Version at: https://www.owasp.org 1 F I 1 Forward - Eoin Keary Introduction How to use the Code Review Guide 7 8 10 2 Secure Code Review 11 Framework Specific Configuration: Jetty 16 2.1 Why does code have vulnerabilities? 12 Framework Specific Configuration: JBoss AS 17 2.2 What is secure code review? 13 Framework Specific Configuration: Oracle WebLogic 18 2.3 What is the difference between code review and secure code review? 13 Programmatic Configuration: JEE 18 2.4 Determining the scale of a secure source code review? 14 Microsoft IIS 20 2.5 We can’t hack ourselves secure 15 Framework Specific Configuration: Microsoft IIS 40 2.6 Coupling source code review and penetration testing 19 Programmatic Configuration: Microsoft IIS 43 2.7 Implicit advantages of code review to development practices 20 2.8 Technical aspects of secure code review 21 2.9 Code reviews and regulatory compliance 22 5 A1 3 Injection 51 Injection 52 Blind SQL Injection 53 Methodology 25 Parameterized SQL Queries 53 3.1 Factors to Consider when Developing a Code Review Process 25 Safe String Concatenation? 53 3.2 Integrating Code Reviews in the S-SDLC 26 Using Flexible Parameterized Statements 54 3.3 When to Code Review 27 PHP SQL Injection 55 3.4 Security Code Review for Agile and Waterfall Development 28 JAVA SQL Injection 56 3.5 A Risk Based Approach to Code Review 29 .NET Sql Injection 56 3.6 Code Review Preparation 31 Parameter collections 57 3.7 Code Review Discovery and Gathering the Information 32 3.8 Static Code Analysis 35 3.9 Application Threat Modeling 39 4.3.2.
    [Show full text]
  • Review Paper on Centralized and Distributed Version Control System
    © MAY 2019 | IRE Journals | Volume 2 Issue 11 | ISSN: 2456-8880 Review Paper on Centralized and Distributed Version Control System. AMRUTA SUDHIR VATARE1, PRATIBHA ADKAR2 1,2MCA Department Modern College of Engineering Pune, India Abstract- Version Control System is also called Software developers working in the team are Source Code Management System. First Version continually writing new source code and changing Control System is developed in the early 1970’s when existing source code. The code for a project, app or the Source Code Control System (SCCS) was released. Version Control System is a category of the software component is typically organized in a folder software tools that helps a software team manage structure or “file tree”. One developer in a team may changes to source code to over time. Version Control be working on a new feature while another developer Software keeps track of every modification to the fixes an unrelated bug by changing code, each code in a special kind of database. If mistake is made, developer may make their changes in several parts of developers can track back the clock and compare the file tree. earlier version of code to help fix the mistake while minimizing disruption to all team members. In this research paper we included the details information Version Control helps teams solves these kinds of about the version controls system and their problems, tracking every individual change by each architecture types, advantages of VCS, disadvantages of VCS, and applications of VCS. contributor and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another Index Terms- Importance of Version Control System, developer working at the same time.
    [Show full text]
  • Engaging Developers in Open Source Software Projects: Harnessing Social
    Iowa State University Capstones, Theses and Graduate Theses and Dissertations Dissertations 2015 Engaging developers in open source software projects: harnessing social and technical data mining to improve software development Patrick Eric Carlson Iowa State University Follow this and additional works at: https://lib.dr.iastate.edu/etd Part of the Computer Engineering Commons, Computer Sciences Commons, and the Library and Information Science Commons Recommended Citation Carlson, Patrick Eric, "Engaging developers in open source software projects: harnessing social and technical data mining to improve software development" (2015). Graduate Theses and Dissertations. 14663. https://lib.dr.iastate.edu/etd/14663 This Dissertation is brought to you for free and open access by the Iowa State University Capstones, Theses and Dissertations at Iowa State University Digital Repository. It has been accepted for inclusion in Graduate Theses and Dissertations by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. Engaging developers in open source software projects: Harnessing social and technical data mining to improve software development by Patrick Eric Carlson A dissertation submitted to the graduate faculty in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Major: Human-Computer Interaction Program of Study Committee: Judy M. Vance, Major Professor Tien Nguyen James Oliver Jon Kelly Stephen Gilbert Iowa State University Ames, Iowa 2015 Copyright c Patrick Eric Carlson, 2015. All rights reserved. ii DEDICATION This is dedicated to my parents who have always supported me. iii TABLE OF CONTENTS Page LIST OF TABLES . vi LIST OF FIGURES . vii ACKNOWLEDGEMENTS . ix ABSTRACT . x CHAPTER 1.
    [Show full text]
  • Distributed Version Control Systems (DVCS) & Mercurial
    Distributed Version Control Systems (DVCS) & Mercurial Lan Dang SCaLE 13x 2015-02-22 http://bit.ly/1EiNMao About the Talk ● Prepared originally for SGVLUG monthly meeting about a year ago ● Product of intense research for new task at work ● Structured so people of all skill levels could learn something ● Slides meant to serve as a reference ● Google Drive location: http://bit.ly/1EiNMao Overview ● Version Control Systems ● DVCS Concepts ● Mercurial basics ● git vs Mercurial ● Mercurial under the hood ● Case Studies ● References My background ● Subversion -- very basic knowledge ● git -- for small single-user projects ● Mercurial -- limited experience as user, moderate experience as administrator ● Focused on use on Linux/Unix; no experience on Windows or with tools like TortoiseHg About Version Control Systems Version control systems (VCS) gives you the power to ● time travel ● more easily collaborate with others ● track changes and known good states Eric Raymond defines VCS as a tool that gives you the capabilities of reversibility, concurrency, and annotation http://www.catb.org/esr/writings/version- control/version-control.html History of Version Control According to Eric Raymond, and summarized by Eric Sink: there are three generations of VCS From Chapter 1 of "Source Control By Example" by Eric Sink: http://www.ericsink.com/vcbe/html/history_of_version_control.html Source Control Taxonomy Lifted from Scott Chacon's "Getting Git" screencast: http://vimeo. com/14629850 (look at time 5:06) DVCS at work "Centralized vs Distributed Version
    [Show full text]
  • Git, SVN, and Mercurial Code Hosting and Collaboration for Scalable Devops
    PRODUCT BRIEF Git, SVN, and Mercurial Code Hosting and Collaboration for Scalable DevOps Helix TeamHub is a code hosting and collaboration solution that can be utilized in either a cloud-hosted or self-hosted configuration. It can be used independently of Helix Core (cloud-hosted or self-hosted) or you can store your Git assets natively inside of Helix Core (self-hosted only). In addition to supporting numerous version control systems (i.e., Git, SVN, and Mercurial), Helix TeamHub lets you manage Maven, WebDAV, and Ivy artifact repositories and Docker container registries – all under one intuitive, web-based platform. Helix TeamHub also provides several tools to help you manage your projects with ease, such as a Kanban board for Agile issue tracking, Git / Mercurial-powered Wikis for storing all your project-specific documents, and the Helix TeamHub Command-Line Client to execute Git commands across repos. MULTI-REPO OPERATIONS WITH GIT Simplify the process of managing projects containing multiple Git repos through the use of the Helix TeamHub Command-Line Client (hth-cli). This tool lets you execute Git commands across repos (ex: push changes sitting in multiple repos with a single command) and can be used in either a cloud-hosted or self-hosted set up. Some limitations apply to cloud-hosted use. Seamlessly manage dependencies across your codebase with multi-repo code reviews when using our Helix TeamHub Enterprise (self-hosted) offering with Helix Core. Initiate these multi-repo code reviews directly from the hth-cli. HIGH PERFORMANCE CI/CD WITH GIT With Helix TeamHub Enterprise (self-hosted), you can store Git repos natively in Helix Core to enable high-performance builds for CI/CD.
    [Show full text]
  • Version Control with Subversion Revision 10061
    Version Control with Subversion Revision 10061 by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato Version Control with Subversion: Revision 10061 by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato Published (TBA) Copyright © 2002, 2003, 2004 Ben Collins-SussmanBrian W. FitzpatrickC. Michael Pilato This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Table of Contents Foreword...................................................................................................................................... Preface......................................................................................................................................... Audience ..............................................................................................................................13 How to Read this Book ........................................................................................................... 13 Conventions Used in This Book ................................................................................................ 14 TypographicConventions ................................................................................................14 Icons ...........................................................................................................................14 Organization of This
    [Show full text]
  • Alan Seiden Richard Schoen
    The Zen of PHP without Zend Server Alan Seiden Richard Schoen Alan Seiden Principal, Seiden Group Mentors CIOs & development teams Deliver modern technical solutions Open Source Advocate Co-developer of PHP Toolkit for IBM i Founder of Club Seiden community Host/Sponsor, CIO Summit Richard Schoen Owner, MobiGoGo Former owner, RJS Software Systems Innovator in IBM i solutions (30+ years) Member of Seiden Group Sr Solutions Consultant - Pegasystems Builder Developer of iForgit IBM i git client IBM i, Windows, Linux Developer Mobile App Developer www.mobigogo.net RPG, CL, C#, VB, Node, PHP, Python, Java, HTML, CSS, etc. [email protected] Open Source Experts Develop web and mobile applications Support Community PHP Troubleshoot the toughest issues Train developers in open source & IBM i PHP APIs Git Node.js Db2 Python seidengroup.com Why PHP? Web apps and APIs w PHP has been pivotal in bringing web applications to IBM i w Open source applications: CMSes, eCommerce w Mantis Bug Tracker was an oldie but goodie w Award-winning applications across all industries w Continue to access your Db2 data, RPG code, and more w PHP Toolkit helped compatibility and integration w Web services and APIs w First taste of calling external APIs from IBM i w Credit card payments… Salesforce… many more w Converting green screens to web w Community and conference sites w Blogs w Wordpress.. beyond blogs.. Star Wars site, more! Use PHP from RPG, CL, etc. w PHP can be called from CL and RPG too! w Often software development kits (SDKs) were written in PHP w Easy to get started w Still control flow from traditional RPG w Use new PHP power to access APIs and other functionality, create spreadsheets, graphics, etc.
    [Show full text]
  • Programming with Haiku
    Programming with Haiku Lesson 4 Written by DarkWyrm All material © 2010 DarkWyrm Source Control: What is It? In my early days as a developer on the Haiku project I had troubles on occasion because I had to use a source control manager (SCM). I didn't understand it and I didn't want to take the time to learn about it from some tutorial online. I wanted to be able to write code with as few hurdles as possible. How I wish that I'd understood source control then. Source control, also known as revision control or version control, is a tool or set of tools which facilitates development on a single codebase by many people at once. This is done by recording the changes that are made by each person and ensuring that one person's changes cannot be applied at the same time as another's. Most also provide for working on a separate copy of the main sources, called a branch. Using an SCM forces your workflow to have some structure, which is actually a good thing for those who have a hard time getting organized, provided that they are willing to work with it. Day-to-day coding involves checking out others' updates and checking in your own. On occasion, a change must be undone, called reverting a change. Sometimes a feature is large enough that it necessitates working over the course of several check-ins, called commits. In these cases, a branch is created so that the development of the feature benefits from source control without disturbing others' work.
    [Show full text]
  • Developers Guide Reference for Developers and Community Members
    Developers Guide Reference for developers and community members MantisBT Development Team <[email protected]> Developers Guide: Reference for developers and community members by MantisBT Development Team Abstract This book is targeted at MantisBT developers, contributors and plugin authors. It documents the development process and provides reference information regarding the MantisBT core, including the database schema as well as the plugin system including an events reference. Copyright © 2016 MantisBT team. This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at http://www.gnu.org/licenses/fdl.txt). Table of Contents 1. Contributing to MantisBT ................................................................................................. 1 Initial Setup ............................................................................................................... 1 Cloning the Repository ................................................................................................ 1 Determining the Clone URL ................................................................................. 1 Initializing the Clone ........................................................................................... 2 Adding remotes .................................................................................................. 2 Checking out branches ........................................................................................
    [Show full text]
  • Scmbug: Policy-Based Integration of Software Configuration
    Scmbug: Policy-based Integration of Software Configuration Management with Bug-tracking Kristis Makris Kyung Dong Ryu Department of Computer Science IBM T.J. Watson Research Center and Engineering 1101 Kitchawan Rd Arizona State University Yorktown Heights, NY 10598 Tempe, AZ, 85287 [email protected] [email protected] Abstract and enhancement requests. Those who do not use a bug-tracking system tend to rely on shared lists, Software configuration management(SCM) and email, spreadsheets and/or Post-It notes to moni- bug-tracking are key components of a successful tor the status of defects. This procedure is usually software engineering project. Existing systems error-prone and tends to cause those bugs judged integrating the two have failed to meet the needs least significant by developers to be dropped or of the ASU scalable computing lab, powered by ignored[10]. open-source software. An improved solution to By examining a log of software changes from the integration problem, designed to accomodate an SCM tool, it is uncertain why the changes oc- both free and commercial systems alike, is pre- curred. By examining a defect report, it is un- sented. certain what changed in software in response to Scmbug offers a policy-based mechanism of the defect. Integration of SCM with bug-tracking capturing and handling integration of SCM ties the reason why a feature/defect was devel- events, such as committing software change- oped/fixed with what software changes occurred sets and labeling software releases, with a in the SCM system to accomplish this. Marry- bug-tracking system. Synchronous verification ing the SCM and bug-tracking systems improves checks and the flexibilty to match multiple devel- the traceability of software changesets, quality of opment models separate this approach from re- documentation in defect reports, and quality of lated work.
    [Show full text]