Database & Information Systems Group University of Basel DBIS Group Talk Michael Springmann 2009-03-11 Distributed Source Code Management in Mercurial.

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

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.
Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
David Stotts UNC Computer Science (2013) with slides from a talk by Karsten Dambekalns (2005)
SubVersioN – the new Central Service at DESY by Marian Gawron.
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.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Version control Using Git 1Version control, using Git.
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.
RMG Study Group Session I: Git, Sphinx, webRMG Connie Gao 9/20/
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or.
RMG Study Group Basics of Git Nathan Yee 2/23/
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
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.
Subversion (SVN) A Revision Control System Successor to CVS Carlos Armas Hervey Allen.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
CSE 219 Computer Science III CVS
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Part 4: FCM and the UM University of Reading, December 2015.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
GIT: What, how and why ? Part 1: Basics. What do I know about git? Started using it for experiments on April 2009 Moved all voms development on git on.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
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.
Database & Information Systems Group University of Basel DBIS Group Talk Michael Springmann Distributed Source Code Management.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Version Control Systems
SVN intro (review).
LECTURE 2: Software Configuration Management
Version Control with Subversion (SVN)
Version control, using Git
CSE 303 Concepts and Tools for Software Development
Storing, Sending, and Tracking Files Recitation 2
Mercurial & TorToise-HG
Distributed Version Control with git
Source Code Management
LECTURE 3: Software Configuration Management
The Big Picture
Version Control System - Git
Version Control with Git and GitHub
Git Introduction.
Git GitHub.
Presentation transcript:

Database & Information Systems Group University of Basel DBIS Group Talk Michael Springmann Distributed Source Code Management in Mercurial

Distributed Source Code Management in Mercurial- Database & Information Systems Group Mercurial (Hg) I.DSCM implemented in Python / few C, GPL 2  Abbreviated relating to chemical symbol Hg for Mercury II.Used by:  OpenJDK, Netbeans, OpenSolaris, Mozilla, Xen, GNU Octave...  DBIS? III.Not as fast as git for many tasks  but still considered significantly faster than Subversion  rather intuitive command set for former SVN users  portable 2

Distributed Source Code Management in Mercurial- Database & Information Systems Group Basic Separation in SCM I.Working Directory  every developer has his own working directory  contains not only the essential source code and build scripts but commonly also: generated source code generated documentation compiled results, linked libraries / executables, generated packages log files of test runs (temporary) files generated by the used IDE II.Repository  provides revision control  provides possibility to exchange code with other developers 3

Distributed Source Code Management in Mercurial- Database & Information Systems Group Getting started I.No working directory without repository  Either clone existing repository every clone is a fully functional repository containing all changesets from the beginning to the current stage (in compressed, space-efficient form) every clone is a branch that can be synchronized via pulls and pushes with any other branch / (related) repository from a file perspective: copies all files in.hg-directory –except.hg/hgrc –and will perform update on working directory from copied repo  or start a new repository via init can be created in empty, existing directory can be created in any non-empty directory that is not yet controlled by Mercurial can create a new directory will generate the.hg-directory with all required files (but empty) 4

Distributed Source Code Management in Mercurial- Database & Information Systems Group hg init I.Inside an existing directory  hg init II.Outside of the directory  hg init 5

Distributed Source Code Management in Mercurial- Database & Information Systems Group Adding / removing files I.Putting files under version control  hg add [...] II.Ignoring files from Mercurial  Listing ignore patterns in.hgignore file e.g. III.Remove file that is no longer needed  in working directory of any subsequent revision (or at least shouldn’t get controlled  hg remove [...] 6 # use glob syntax.syntax: glob**/bin*.class*~# switch to regexp syntax.syntax: regexp^\.pc/AUTHOR

Distributed Source Code Management in Mercurial- Database & Information Systems Group Checking status and addremove I.Mercurial can display the status of the dir w.r.t. repo  hg status  shows added ( A ), removed ( R ), modified ( M ), missing ( ! ) and files with unkown status ( ? ) because there is no corresponding record in the repo yet. II.Shorthand to add all new (unknown files) and remove all missing files  hg addremove  will at the same time try to identify moved files  explicit move: hg rename III.All this gets only persisted in repository upon commit  hg commit [--message “ ”]  GUI frequently display status upon commit and allow add/remove at the same time they let you enter a message 7

Distributed Source Code Management in Mercurial- Database & Information Systems Group Displaying the history I.Simple textual log of commits  hg log [--patch] II.View commit history as a graph  for better illustration of branches and merges  hg glog  Graphical tools as GUI or in web browser with hg serve 8

Distributed Source Code Management in Mercurial- Database & Information Systems Group 9

Distributed Source Code Management in Mercurial- Database & Information Systems Group 10

Distributed Source Code Management in Mercurial- Database & Information Systems Group 11

Distributed Source Code Management in Mercurial- Database & Information Systems Group Distributed Repositories 12 Repo 1Repo 2 propagate changes between repos synchronizes local working copy with local repository I.Two basic kinds of communication

Distributed Source Code Management in Mercurial- Database & Information Systems Group Some basic, common commands I.Local Repository  init  [g]log  verify  heads  tip  tag  tags  branch  branches 13 other Repo  clone  pull  push  serve  incoming  outgoing  export  import  bundle  unbundle Working Dir  status  add  remove  addremove  commit  update  revert  branch  merge  resolve Shortcuts for frequent tasks like fetch pullmerge if needed commit if automatic merge successful, otherwise update for manual intervention

Distributed Source Code Management in Mercurial- Database & Information Systems Group Cloning a repository I.Cloning from a mercurial source  from local file, ssh, http(s)  hg clone [ ]  will set up a new.hg/hgrc II.Propagating changes  hg pull [--update] [ ]  hg push [ ]  hg bundle / unbundle III.Synching the working directory with changes  hg update 14 [paths]default =

Distributed Source Code Management in Mercurial- Database & Information Systems Group Merging I.Branches may co-exist in repo  as seen in graph of revisions  Merge starts only when triggered hg merge hg fetch II.Results in a list of outstanding conflicts if not resolved  hg resolve --list III.Redo unresolved merge  hg resolve IV.Commit after merge! 15

Distributed Source Code Management in Mercurial- Database & Information Systems Group 16

Distributed Source Code Management in Mercurial- Database & Information Systems Group 17

Distributed Source Code Management in Mercurial- Database & Information Systems Group 18

Distributed Source Code Management in Mercurial- Database & Information Systems Group Converting a repository I.There’s more than one way to do it!  hgsvn  hg convert example: hg convert my-on-dht-branchhttp://on.cs.unibas.ch/svn/repos/on/trunk/on-dht 19