versionControl/vcs.tex
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 07 Sep 2010 16:49:56 +0530
changeset 129 6e237b9442cd
parent 95 958396664d34
child 138 a201667fa696
permissions -rw-r--r--
Adding a huge question for lab exercise 4.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     2
% Version Control Systems
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     3
%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     4
% Author: FOSSEE 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     5
% Copyright (c) 2009, FOSSEE, IIT Bombay
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     7
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     8
\documentclass[14pt,compress]{beamer}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     9
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    10
\mode<presentation>
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    11
{
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    12
  \usetheme{Warsaw}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    13
  \useoutertheme{infolines}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    14
  \setbeamercovered{transparent}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    15
}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    16
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    17
\usepackage[english]{babel}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    18
\usepackage[latin1]{inputenc}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    19
%\usepackage{times}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    20
\usepackage[T1]{fontenc}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    21
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    22
% Taken from Fernando's slides.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    23
\usepackage{ae,aecompl}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    24
\usepackage{mathpazo,courier,euler}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    25
\usepackage[scaled=.95]{helvet}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    26
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    27
\definecolor{darkgreen}{rgb}{0,0.5,0}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    28
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    29
\usepackage{listings}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    30
\lstset{language=Python,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    31
    basicstyle=\ttfamily\bfseries,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    32
    commentstyle=\color{red}\itshape,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    33
  stringstyle=\color{darkgreen},
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    34
  showstringspaces=false,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    35
  keywordstyle=\color{blue}\bfseries}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    36
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    37
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    38
% Macros
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    39
\setbeamercolor{emphbar}{bg=blue!20, fg=black}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    40
\newcommand{\emphbar}[1]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    41
{\begin{beamercolorbox}[rounded=true]{emphbar} 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    42
      {#1}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    43
 \end{beamercolorbox}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    44
}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    45
\newcounter{time}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    46
\setcounter{time}{0}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    47
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    48
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    49
\newcommand{\typ}[1]{\lstinline{#1}}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    50
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    51
\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}}  }
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    52
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    53
%%% This is from Fernando's setup.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    54
% \usepackage{color}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    55
% \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    56
% % Use and configure listings package for nicely formatted code
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    57
% \usepackage{listings}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    58
% \lstset{
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    59
%    language=Python,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    60
%    basicstyle=\small\ttfamily,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    61
%    commentstyle=\ttfamily\color{blue},
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    62
%    stringstyle=\ttfamily\color{orange},
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    63
%    showstringspaces=false,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    64
%    breaklines=true,
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    65
%    postbreak = \space\dots
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    66
% }
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    67
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    68
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    69
% Title page
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    70
\title[Version Control Systems]{SEES: Version Control Systems}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    71
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    72
\author[FOSSEE] {FOSSEE}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    73
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    74
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    75
\date[]{}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    76
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    78
%\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    79
%\logo{\pgfuseimage{iitmlogo}}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    80
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    81
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    82
%% Delete this, if you do not want the table of contents to pop up at
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    83
%% the beginning of each subsection:
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    84
\AtBeginSubsection[]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    85
{
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    86
  \begin{frame}<beamer>
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    87
    \frametitle{Outline}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    88
    \tableofcontents[currentsection,currentsubsection]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    89
  \end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    90
}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    91
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    92
\AtBeginSection[]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    93
{
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    94
  \begin{frame}<beamer>
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    95
    \frametitle{Outline}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    96
    \tableofcontents[currentsection,currentsubsection]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    97
  \end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    98
}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    99
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   100
% If you wish to uncover everything in a step-wise fashion, uncomment
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   101
% the following command: 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   102
%\beamerdefaultoverlayspecification{<+->}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   103
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   104
%%\includeonlyframes{current,current1,current2,current3,current4,current5,current6}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   105
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   106
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   107
% DOCUMENT STARTS
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   108
\begin{document}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   109
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   110
\begin{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   111
  \maketitle
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   112
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   113
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   114
% CREATING TOC 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   115
\begin{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   116
  \frametitle{Outline}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   117
  \tableofcontents
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   118
  % You might wish to add the option [pausesections]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   119
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   120
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   121
%% There are some %$ used just to minimise the effect of $ sign used in lstlisting. In emacs it looks unhealthy.
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   122
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   123
% Introduction to course-need of version control, history, options available.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   124
\section{Introduction}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   125
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   126
%% Home made version control system?
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   127
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   128
  \frametitle{Home-brew}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   129
  \begin{center}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   130
    \includegraphics[height=1.8in,width=4.2in]{folder.png}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   131
  \end{center}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   132
  \begin{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   133
$ ls
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   134
a.out  id1.txt  id2.txt  identifier.cpp  id.txt  lex  pda1.cpp  pda2.cpp  pda.cpp  pda.txt  string.txt
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   135
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   136
    %%a screen-shot of folder with all crazy names.  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   137
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   138
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   139
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   140
  \frametitle{Problems with such nomenclature}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   141
  \begin{block}{}    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   142
  \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   143
  \item Difficult to relate to content of file.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   144
  \item Cant track changes done to file.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   145
  \item It wont scale.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   146
  \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   147
    \end{block}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   148
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   149
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   150
\begin{frame}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   151
  \frametitle{What is version control}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   152
  \begin{block}{From a blog post}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   153
    ``Version control (or source control) is nothing more than keeping copies of work as we make changes to it.''
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   154
  \end{block}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   155
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   156
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   157
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   158
  \frametitle{Need of Version Control}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   159
  \begin{itemize}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   160
  \item Track the history and evolution of a program.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   161
  \item To collaborate effectively on a project.
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   162
  \item \begin{color}{red}``To err is Human''\end{color} for recovery we have ...
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   163
  \end{itemize}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   164
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   165
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   166
%% Introduction to how logs are managed in VCS.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   167
%% A analogy in logs and day-to-day life?
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   168
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   169
  \frametitle{How does it work? Analogy}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   170
  It can roughly be related to Computer/Video Games.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   171
  \begin{itemize}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   172
  \item We play games in stages.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   173
  \item We pass a stage/task- \begin{color}{red}we SAVE the game.\end{color}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   174
  \item We resume playing from there onwards.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   175
  \item In-case we want to replay or revisit some particular stage, we start from position we saved earlier.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   176
  \item Even we can change the course of play henceforth.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   177
  \end{itemize}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   178
\end{frame}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   179
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   180
\begin{frame}[fragile]
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   181
  \frametitle{Better way to say:}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   182
  \begin{center}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   183
    \includegraphics[height=2.5in,width=2.5in, interpolate=true]{mario}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   184
  \end{center}  
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   185
  \emphbar{VCS provides power to save and resume from a stage.}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   186
\end{frame}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   187
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   188
\begin{frame}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   189
  \frametitle{How is it done?}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   190
  \begin{itemize}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   191
  \item It keeps track of changes you make to a file. You can improve, revisit, and amend.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   192
  \item All changes are logged/recorded, so you and others can follow the development cycle.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   193
  \end{itemize}  
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   194
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   195
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   196
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   197
%% Introduction to jargon 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   198
%% This should have some excerpts from normal systems.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   199
%% Like diffs, folders etc.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   200
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   201
%% \section{Learning the Lingo!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   202
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   203
%% \begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   204
%%   \frametitle{Common jargon: Basic setup}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   205
%%   \begin{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   206
%% $ ls slides/
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   207
%% filter.png  lena_mean.png  lena.png  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   208
%% neighbour.png  pool.aux  pool.log  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   209
%% pool.nav  pool.out  pool.pdf  pool.snm  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   210
%% pool.tex  pool.tex~  pool.toc  pool.vrb    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   211
%%   \end{lstlisting}  %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   212
%%   \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   213
%%   \item Repository(repo):\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   214
%%         The folder with all files.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   215
%%   %% \item Server:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   216
%%   %%       Machine with main inventory/repo.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   217
%%   %% \item Client:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   218
%%   %%       Local machines with copy of main repo.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   219
%%   \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   220
%% \end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   221
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   222
%% \begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   223
%%   \frametitle{Actions}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   224
%%   \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   225
%%   \item Add:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   226
%%     Creating/Copying files(cp, touch).
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   227
%%   \item Check out/Clone:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   228
%%     Creating copy of working folder.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   229
%%   \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   230
%%   \begin{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   231
%% $ cp -rv circulate/ local
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   232
%% `circulate/' -> `local'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   233
%% `circulate/sslc1.txt' -> `local/sslc1.txt'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   234
%% `circulate/pos.txt' -> `local/pos.txt'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   235
%% `circulate/pendulum.txt' -> `local/pendulum.txt'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   236
%% `circulate/lena.png' -> `local/lena.png'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   237
%% `circulate/sslc1.py' -> `local/sslc1.py'
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   238
%% `circulate/points.txt' -> `local/points.txt'    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   239
%%   \end{lstlisting}  %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   240
%% \end{frame}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   241
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   242
%% \begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   243
%%   \frametitle{Actions cont...}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   244
%%   \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   245
%%     \item Version:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   246
%%     Version number(Die Hard 4.0).\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   247
%%     Making changes to folder, changes state/version.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   248
%%     \item Head/Tip:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   249
%%     Most recent revision/stage.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   250
%%     \item Commit:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   251
%%     Saving(recording) a change.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   252
%%   \item Change log/History:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   253
%%     List of all past changes.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   254
%%   \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   255
%% \end{frame}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   256
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   257
%% \begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   258
%%   \frametitle{Actions cont...}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   259
%%   \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   260
%%   \item Branch:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   261
%%     Separate local copy for bug fixing, testing.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   262
%%   \item Diff/Change:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   263
%%     Changes made in a file in two different versions.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   264
%%   \item Merge (or patch):\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   265
%%     Appling the changes to file, to make it up-to-date.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   266
%%   \item Conflict:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   267
%%     When merging a file is not obvious.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   268
%%   \item Resolve:\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   269
%%     Fixing the conflict manually.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   270
%%   \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   271
%% \end{frame}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   272
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   273
%% % Types of Version Controls
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   274
%% %% \section{Types of VCS}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   275
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   276
%% %% \begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   277
%% %%   \frametitle{Types:}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   278
%% %%   Based on ways of managing the repo there are two types of VCS:
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   279
%% %%   \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   280
%% %%   \item Centralized VCS\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   281
%% %%     cvs, svn fall under this category.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   282
%% %%   \item Distributed VCS\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   283
%% %%     hg, bzr, git follows this methodology.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   284
%% %%   \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   285
%% %%   \emphbar{We would be covering \typ{hg}}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   286
%% %% \end{frame}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   287
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   288
\begin{frame}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   289
  \frametitle{We will cover hg?}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   290
    \includegraphics[height=.75in, interpolate=true]{mercurial}\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   291
  Because it is:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   292
  \begin{itemize}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   293
  \item Easy to learn and use.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   294
  \item Lightweight.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   295
  \item Scales excellently.
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   296
  \item Written in Python.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   297
  \end{itemize}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   298
  \inctime{15}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   299
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   300
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   301
% Initializing the repo, cloning, committing changes, pushing, pulling to repo.
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   302
\section{Getting Started}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   303
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   304
\begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   305
  \frametitle{Objective}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   306
  \begin{block}{}
95
958396664d34 Added changes suggested by Madhu.
Shantanu <shantanu@fossee.in>
parents: 91
diff changeset
   307
    We will \alert{manage} letters collaboratively using \typ{hg}.
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   308
  \end{block}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   309
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   310
  %% \pause
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   311
  %% \begin{block}{Disclaimer}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   312
  %%   Please note, objective is not to learn creative writing, but to learn \alert{hg(mercurial)} via \alert{interesting} use case.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   313
  %% \end{block}    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   314
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   315
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   316
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   317
  \frametitle{Getting comfortable:}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   318
  For checking \typ{hg} installation and its version type:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   319
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   320
    $ hg version    
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   321
  \end{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   322
  To get broad help on \typ{hg} and commands available:
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   323
  \begin{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   324
    $ man hg
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   325
    $ hg help
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   326
  \end{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   327
  To get help on particular \typ{hg} related option try:
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   328
  \begin{lstlisting}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   329
    $ hg help diff
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   330
  \end{lstlisting} %$
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   331
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   332
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   333
\begin{frame}[fragile]
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   334
  \frametitle{Getting working/existing code base}
95
958396664d34 Added changes suggested by Madhu.
Shantanu <shantanu@fossee.in>
parents: 91
diff changeset
   335
  To get an already existing code base:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   336
  \begin{lstlisting}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   337
$ hg clone 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   338
http://hg.serpentine.com/tutorial/hello 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   339
localCopyhello
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   340
  \end{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   341
\typ{localCopyhello} is copy of code-base. 
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   342
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   343
$ ls localCopyhello/
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   344
hello.c  Makefile
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   345
  \end{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   346
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   347
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   348
%%introduction to clone, repo, server, client.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   349
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   350
  \frametitle{What did we do!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   351
  \begin{block}{Explanation}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   352
    \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   353
    \item<1-> \typ{hello} is a \alert{repo}, it's a collection of files and folders. 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   354
    \item<2-> This repo is located on remote(\alert{server}) machine.    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   355
    \item<3-> We copy(\alert{clone}) repo to our local machine.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   356
    \end{itemize}    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   357
  \end{block}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   358
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   359
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   360
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   361
  \frametitle{Creating repo of existing files}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   362
  I have some files which I want to bring under version control. \typ{hg} provides \alert{\typ{init}} command for this: 
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   363
  \begin{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   364
$ ls -a circulate/
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   365
.  ..  lena.png  pendulum.txt  points.txt  pos.txt  sslc1.py  sslc1.txt
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   366
$ cd circulate/
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   367
$ hg init
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   368
$ ls -a
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   369
.  ..  .hg  lena.png  pendulum.txt  points.txt  pos.txt  sslc1.py  sslc1.txt    
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   370
  \end{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   371
  \emphbar{\typ{.hg} directory keeps log of changes made henceforth.}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   372
\end{frame}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   373
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   374
\begin{frame}[fragile]
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   375
  \frametitle{Starting fresh}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   376
  We can use \typ{init} to start a new repository also
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   377
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   378
$ mkdir letter
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   379
$ cd letter
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   380
$ touch letter.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   381
$ ls -a
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   382
.  ..  letter.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   383
$ hg init
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   384
$ ls -a
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   385
.  ..  letter.tex  .hg
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   386
  \end{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   387
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   388
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   389
\begin{frame}[fragile]
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   390
  \frametitle{Making copies: Branching}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   391
  All \typ{hg} repositories are self-contained, and independent which can be copied(cloned):
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   392
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   393
$ hg clone localCopyhello newCopy
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   394
updating working directory
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   395
2 files updated, 0 files merged, 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   396
0 files removed, 0 files unresolved
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   397
  \end{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   398
  \alert{or}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   399
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   400
$ hg clone letter letter-clone
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   401
updating working directory
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   402
0 files updated, 0 files merged, 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   403
0 files removed, 0 files unresolved 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   404
 \end{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   405
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   406
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   407
%%introduction to branch
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   408
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   409
  \frametitle{Why do we need branching?}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   410
  \begin{block}{}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   411
    \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   412
    \item To keep separate set for \alert{experimentation}.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   413
    \item Simple way to \alert{backup} all in one go!
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   414
    \item It helps in collaborative environment.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   415
    %% should we mention it at all? there is no need to know atleast here.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   416
    %% syncing and integrating in backup files and testing environment can also be mentioned.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   417
    \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   418
  \end{block}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   419
  \inctime{15}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   420
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   421
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   422
%% Should we here stress on how are distribute VCS have 
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   423
%% different approach then centralized ones? Maybe a pic
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   424
%% or some other graphical representation.
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   425
\begin{frame}[fragile]
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   426
  \frametitle{Revisiting saved points:history/logs}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   427
  In \typ{hg}, the difference between consecutive stages is termed as \alert{changeset}.\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   428
  Once we have saved stages, we need a mechanism to review and access them, for that use \alert{\typ{log}} command.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   429
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   430
$ cd localCopyhello
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   431
$ hg log    
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   432
  \end{lstlisting}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   433
\end{frame}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   434
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   435
\begin{frame}[fragile]
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   436
  \frametitle{Understanding output}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   437
  It provides following information:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   438
  \begin{itemize}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   439
  \item \alert{changeset}: Identifiers for the changeset.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   440
  \item \alert{user}: Person who created the changeset.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   441
  \item \alert{date}: Date and time of creation of changeset.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   442
  \item \alert{summary}: One line description.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   443
  \end{itemize}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   444
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   445
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   446
%% here we should have image of dotA or halo for resuming from a stage in game.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   447
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   448
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   449
  \frametitle{History/Logs cont...}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   450
  By default \typ{log} returns complete list of all changes. \\
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   451
  For selective view try:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   452
\begin{lstlisting}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   453
$ hg log -r 3
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   454
$ hg log -r 2:4
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   455
\end{lstlisting}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   456
  tip/latest changes can be seen via:
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   457
  \begin{lstlisting}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   458
$ hg tip    
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   459
  \end{lstlisting} %%$
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   460
  \inctime{5}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   461
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   462
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   463
\begin{frame}[fragile]
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   464
  \frametitle{Advancing through a stage:status}
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   465
  We often need to add/delete some files from directory(repo). The structure keeps on evolving, and tools for handling them are needed.\\
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   466
  We will use the \typ{letter} repo we created earlier.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   467
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   468
$ cd letter
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   469
$ hg log
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   470
$ hg st
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   471
? letter.tex
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   472
  \end{lstlisting} %%$
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   473
  \alert{\typ{st}} (aka status) is command to show changed files in the working directory.\\
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   474
\end{frame}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   475
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   476
%% track record is confusing for some. Duma have some doubts :(
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   477
\begin{frame}[fragile]
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   478
  \frametitle{Adding files}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   479
  "?" indicates that this file are aliens to track record.\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   480
  \alert{\typ{add}} command is available to add new files to present structure.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   481
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   482
$ hg add letter.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   483
$ hg st
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   484
A letter.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   485
  \end{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   486
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   487
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   488
\begin{frame}[fragile]
81
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   489
  \frametitle{Saving present stage: committing}
3d20090b7cbd Making changes according to need-to-know approach.
Shantanu <shantanu@fossee.in>
parents: 80
diff changeset
   490
  \emphbar{This is equivalent to completing tasks, before reaching a stage where you want to save.}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   491
  \typ{hg} uses \alert{\typ{ci}}(aka \typ{commit}) command to save changes. So after adding file, we have to commit it also:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   492
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   493
$ hg ci -u "Shantanu <shantanu@fossee.in>" 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   494
        -m "First commit."
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   495
$ hg log
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   496
changeset:   0:210664b4ed58
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   497
tag:         tip
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   498
user:        Shantanu <shantanu@fossee.in>
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   499
date:        Tue Feb 23 19:41:45 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   500
summary:     First commit.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   501
  \end{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   502
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   503
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   504
%% explanation of ci command??
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   505
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   506
  \frametitle{\typ{ci} command}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   507
  Some arguments passed to \typ{ci} command are worth noticing:
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   508
  \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   509
  \item \alert{u}: To provide name and email contact information of person making changes!\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   510
  In case you don't want to repeat that each time of committing, add info to \typ{hgrc} file.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   511
  \item<2-> \alert{m}: It is to provide one-line summary of changeset. \\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   512
    if this argument is not passed, hg takes you to editor to specify the message which is required to commit.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   513
  \end{itemize}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   514
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   515
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   516
\begin{frame}[fragile]
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   517
  \frametitle{Other operations}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   518
  \typ{hg} supports basic file-management functions like copy, remove, rename etc.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   519
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   520
$ hg cp letter.tex letter-prof.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   521
$ hg rename letter.tex letter-personal.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   522
$ hg st
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   523
A letter-personal.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   524
A letter-pro.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   525
R letter.tex
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   526
$ hg ci -u "Shantanu <shantanu@fossee.in>" 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   527
        -m "Renamed and added letters."
80
e5dcba8a6b13 More changes to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 79
diff changeset
   528
$ hg tip| grep summary 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   529
summary:     Renamed and added letters.
80
e5dcba8a6b13 More changes to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 79
diff changeset
   530
  \end{lstlisting} %$
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   531
%% Other commands which can be handy are \typ{remove}, \typ{revert} etc.
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   532
  \inctime{10}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   533
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   534
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   535
% Introduction to concepts of branches, merging patch?
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   536
\section{Sharing and Collaborating}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   537
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   538
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   539
  \frametitle{Distributing changes}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   540
  \begin{itemize}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   541
  \item All directory-structure(repo) are self-contained.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   542
  \item Changes created are local.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   543
    \begin{itemize}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   544
    \item Until we sync. previously cloned repos.
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   545
    \end{itemize}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   546
  \end{itemize}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   547
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   548
$ cd letter-clone
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   549
$ hg pull 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   550
pulling from /home/baali/letter
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   551
requesting all changes
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   552
adding changesets
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   553
adding manifests
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   554
adding file changes
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   555
added 2 changesets with 2 changes to 2 files
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   556
(run 'hg update' to get a working copy)
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   557
  \end{lstlisting} %$
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   558
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   559
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   560
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   561
  \frametitle{Pulling changesets cont...}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   562
  \alert{\typ{pull}} command doesn't update current directory, it just imports changesets. To add all these changes, use \alert{\typ{up}}:
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   563
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   564
$ ls -a
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   565
.  ..  .hg
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   566
$ hg up
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   567
2 files updated, 0 files merged, 
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   568
0 files removed, 0 files unresolved
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   569
$ ls -a
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   570
.  ..  .hg  letter-personal.tex  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   571
letter-pro.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   572
  \end{lstlisting} %% $
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   573
  \pause
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   574
  \emphbar{Why \typ{pull} and \typ{up} are needed separately?}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   575
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   576
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   577
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   578
  \frametitle{Content of letter}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   579
  Personal letter can be letter to ask a girl out!\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   580
  Using LaTeX to write letter, it would be straight forward:
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   581
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   582
  \begin{small}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   583
  \begin{block}{}
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   584
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   585
\documentclass{letter}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   586
\begin{document}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   587
\begin{letter}{}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   588
\opening{Hello Jas,}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   589
I really enjoyed meeting you in CS 101, 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   590
but would love to know you better. 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   591
How about a coffee on Thursday after class?
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   592
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   593
\closing{-Samarth}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   594
\end{letter}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   595
\end{document}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   596
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   597
  \end{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   598
  \end{block}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   599
  \end{small}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   600
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   601
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   602
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   603
  \frametitle{Sharing the changes!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   604
  \begin{lstlisting}    
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   605
$ hg st
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   606
M letter-personal.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   607
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   608
  \alert{'M'} sign indicates that \typ{hg} has noticed change in that particular file.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   609
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   610
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   611
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   612
  \frametitle{Revisiting changes}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   613
  To view changes made \typ{hg} provides \alert{\typ{diff}}:
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   614
  \begin{small}      
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   615
  \begin{lstlisting}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   616
$ hg diff
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   617
diff -r 4a2d973a92de letter-personal.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   618
--- a/letter-personal.tex	Tue Feb 23 19:50:39 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   619
+++ b/letter-personal.tex	Tue Feb 23 20:28:46 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   620
@@ -0,0 +1,11 @@
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   621
+\documentclass{letter}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   622
+\begin{document}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   623
+ 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   624
+\begin{letter}{}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   625
+\opening{Hello Jas,}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   626
+  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   627
+I really enjoyed meeting you in CS 101, 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   628
.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   629
.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   630
  \end{lstlisting} %$
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   631
  \end{small}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   632
\end{frame}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   633
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   634
\begin{frame}[fragile]
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   635
  \frametitle{Saving the changes}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   636
  We have to commit these changes.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   637
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   638
$ hg ci -u "Shantanu <shantanu@fossee.in>" 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   639
  -m "Added content to personal letter."
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   640
  \end{lstlisting} %$
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   641
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   642
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   643
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   644
  \frametitle{Syncing two repos}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   645
  To bring both the repos at same stage we have to \alert{\typ{push}} changesets
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   646
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   647
$ hg push 
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   648
pushing to /home/baali/letter
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   649
searching for changes
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   650
adding changesets
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   651
adding manifests
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   652
adding file changes
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   653
added 1 changesets with 1 changes to 1 files
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   654
  \end{lstlisting} %$
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   655
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   656
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   657
\begin{frame}[fragile]
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   658
  \frametitle{Syncing cont...}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   659
  Same as \typ{pull}, \typ{push} wont update the main directory by default.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   660
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   661
$ cd letter
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   662
$ hg tip    
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   663
$ cat letter-personal.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   664
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   665
  \alert{\typ{tip}} shows latest changeset, but content of file are not updated.\\
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   666
  We have to use \typ{up} on main branch
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   667
  \begin{lstlisting}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   668
$ hg up
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   669
1 files updated, 0 files merged, 0 files removed, 0 files unresolved    
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   670
  \end{lstlisting} %$
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   671
  \inctime{15}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   672
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   673
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   674
\begin{frame}[fragile]
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   675
  \frametitle{Merging: Scenario}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   676
  One very useful feature is merging work of different peers working on same project.\\
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   677
  We consider scenario, two person on one project, both have local copies, and one among them is main branch.\\
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   678
  \begin{center}
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   679
    \includegraphics[height=1in, interpolate=true]{scenario}
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   680
  \end{center}  
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   681
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   682
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   683
\begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   684
  \frametitle{Scenario cont...}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   685
  \begin{block}{}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   686
  \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   687
  \item To make this letter better, I ask for suggestions.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   688
  \item Friend of mine, clones this repo and edit things.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   689
  \item When he/she pushes changes, I can decide to use them or not.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   690
  \end{itemize}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   691
  \end{block}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   692
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   693
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   694
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   695
  \frametitle{Creating more clones for sharing}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   696
  I create a clone of repo which is accessible to my friend.
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   697
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   698
$ hg clone letter letter-suggestion
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   699
updating working directory
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   700
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   701
  \end{lstlisting} %$
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   702
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   703
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   704
%% here we can have introduction to concept of DVCS and CVCS?
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   705
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   706
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   707
  \frametitle{Suggestions!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   708
  He is convinced that using some colored text would be a good idea.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   709
  He just adds color to closing part.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   710
  %% a comment on how bad is this idea :P
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   711
  \begin{small}      
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   712
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   713
$ hg dif
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   714
diff -r 4a2d973a92de letter-personal.tex
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   715
--- a/letter-personal.tex	Tue Feb 23 19:50:39 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   716
+++ b/letter-personal.tex	Wed Feb 24 12:03:33 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   717
@@ -0,0 +1,12 @@
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   718
 \documentclass{letter}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   719
+\usepackage{color}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   720
 \begin{document}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   721
.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   722
-\closing{-Samarth}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   723
+\closing{\textcolor{red}{-Samarth}}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   724
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   725
  \end{small}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   726
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   727
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   728
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   729
  \frametitle{Committing the changes}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   730
  He is satisfied with his minor changes, so he commits.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   731
  \begin{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   732
$ hg ci 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   733
  -u "Vattam <vattam@fossee.in>"
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   734
  -m "Added some suggestions."   
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   735
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   736
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   737
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   738
\begin{frame}[fragile]
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   739
  \frametitle{The other good half of repo...}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   740
  It turns out, in this process, Jas is already dating, so we edit the letter for someone else from same class.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   741
  \begin{lstlisting}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   742
$ hg ci -u "Shantanu <shantanu@fossee.in>"
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   743
        -m "Changed name."
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   744
$ hg tip|grep changeset
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   745
changeset:   3:fadbd6492cc4    
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   746
  \end{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   747
  %%\emphbar{\alert{moral:} Don't wait for it!}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   748
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   749
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   750
%%\hspace*{-0.5in} 
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   751
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   752
\begin{frame}[fragile]
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   753
  \frametitle{Situation}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   754
  \begin{columns}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   755
    \column{0.5\textwidth}    
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   756
    \begin{block}{\center{main directory}}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   757
      \includegraphics[height=2in, interpolate=true]{glog-main}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   758
    \end{block}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   759
    \column{0.5\textwidth} 
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   760
    \begin{block}{\center{cloned directory}}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   761
      \includegraphics[height=2in, interpolate=true]{glog-suggestion}
83
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   762
    \end{block}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   763
  \end{columns}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   764
\end{frame}
c52c9a615356 Added suggestions from Amit and Anoop and some images.
Shantanu <shantanu@fossee.in>
parents: 81
diff changeset
   765
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   766
\begin{frame}[fragile]
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   767
  \frametitle{Merging}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   768
  \emphbar{Lets sync both these branches!}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   769
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   770
$ hg pull ../letter-suggestion
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   771
pulling from ../letter-suggestion
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   772
searching for changes
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   773
adding changesets
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   774
adding manifests
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   775
adding file changes
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   776
added 1 changesets with 1 changes to 1 files (+1 heads)
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   777
(run 'hg heads' to see heads, 'hg merge' to merge)    
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   778
  \end{lstlisting} %$
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   779
  \begin{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   780
  \item \typ{pull} can be done from a branch explicitly also.
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   781
  \pause
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   782
  \item \alert{Output is already suggesting something!}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   783
  \end{itemize}  
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   784
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   785
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   786
%% Here one can mention the point of having push and pull separate. Because of this policy, changes made are not lost.
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   787
\begin{frame}[fragile]
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   788
  \frametitle{Analyzing events in detail}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   789
  Since hg \typ{pull} don't update the files directly, our changes are still safe. \typ{hg} provides some commands to help understand such problems.
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   790
\begin{tiny}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   791
  \begin{lstlisting}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   792
$ hg heads 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   793
changeset:   4:71fd776d856b
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   794
tag:         tip
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   795
parent:      2:a5d8cb2fac01
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   796
user:        Vattam <vattam@fossee.in>
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   797
date:        Wed Feb 24 12:54:31 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   798
summary:     Added some suggestions.
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   799
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   800
changeset:   3:02b49a53063f
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   801
user:        Shantanu <Shantanu@fossee.in>
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   802
date:        Wed Feb 24 13:12:26 2010 +0530
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   803
summary:     Changed name.
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   804
  \end{lstlisting} %%$
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   805
\end{tiny}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   806
  It shows current repository heads or show branch head
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   807
\end{frame}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   808
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   809
\begin{frame}[fragile]
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   810
  \frametitle{What went wrong: Analysis}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   811
    \begin{lstlisting}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   812
$ hg glog    
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   813
  \end{lstlisting} %%$
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   814
  \begin{center}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   815
  \includegraphics[height=2in]{heads}  
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   816
  \end{center}  
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   817
  It shows history alongside an ASCII revision graph.  
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   818
\end{frame}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   819
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   820
\begin{frame}[fragile]
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   821
  \frametitle{What went wrong: Analysis cont...}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   822
  Because of different 'pasts', \typ{up} command fails.
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   823
  \begin{lstlisting}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   824
$ hg up
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   825
abort: crosses branches (use 'hg merge' 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   826
       or 'hg update -C')
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   827
  \end{lstlisting} %$
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   828
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   829
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   830
\begin{frame}[fragile]
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   831
  \frametitle{Merging}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   832
  To deal such situations \typ{hg} \alert{merge} command merge working directory with another revision.
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   833
  \begin{lstlisting}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   834
$ hg merge
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   835
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   836
(branch merge, don't forget to commit)   
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   837
  \end{lstlisting} %$
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   838
  After merging two branches, we have to commit the results to create a common head.
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   839
  \begin{lstlisting}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   840
$ hg ci -u "Shantanu <shantanu@fossee.in>" 
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   841
        -m "Merged branches."
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   842
  \end{lstlisting} %$
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   843
  \inctime{15}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   844
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   845
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   846
\begin{frame}[fragile]
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   847
  \frametitle{\typ{glog}}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   848
  \begin{center}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   849
  \includegraphics[height=2.8in]{glog-2}  
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   850
  \end{center}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   851
\end{frame}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   852
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   853
\begin{frame}[fragile]
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   854
  \frametitle{Revisiting history!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   855
  In case earlier girl is available again and you are still looking for date you can \alert{revert} back to previous letter!
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   856
  \begin{lstlisting}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   857
$ hg revert -r 2 -a
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   858
reverting letter-personal.tex    
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   859
  \end{lstlisting} %%$
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   860
  And the content changes. From here on you can further change your letter as you wish.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   861
  %% more options for revert are to explained here!
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   862
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   863
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   864
\begin{frame}[fragile]
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   865
  \frametitle{More information}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   866
  \begin{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   867
  \item \typ{merge} fails if there are conflicting changes.
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   868
    \begin{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   869
    \item Like two persons editing same file, same line and pushing it upstream.
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   870
    \end{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   871
  \item In conflicts, one have to perform \typ{merge} manually.
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   872
  \item \typ{hg} provides \alert{\typ{incoming}} command, which checks the would-be imported changes
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   873
    \begin{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   874
    \item To avoid conflicting changes before importing.
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   875
    \end{itemize}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   876
  \end{itemize}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   877
  \inctime{10}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   878
\end{frame}
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   879
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   880
%% Manual and force merge
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   881
%% hgignore
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   882
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   883
%% Reverting to previous versions!
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   884
% Steps to follow to make life easier. How to avoid/handle manual merges.
95
958396664d34 Added changes suggested by Madhu.
Shantanu <shantanu@fossee.in>
parents: 91
diff changeset
   885
\section{Work flow: DOs and DON'Ts}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   886
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   887
\begin{frame}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   888
  \frametitle{Motto behind hg}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   889
  \begin{center}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   890
  \color{red}{``Commit Early Commit Often.''}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   891
  \end{center}  
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   892
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   893
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   894
\begin{frame}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   895
  \frametitle{Work-flow}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   896
  \begin{itemize}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   897
  \item Make changes.
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   898
  \item Commit.
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   899
  \item Pull changesets.
80
e5dcba8a6b13 More changes to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 79
diff changeset
   900
  \item Merge(if required).
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   901
  \item Push.
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   902
  \end{itemize}
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   903
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   904
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   905
\begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   906
  \frametitle{Cheat Sheet}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   907
  \begin{center}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   908
  \includegraphics[height=2.8in]{mod}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   909
  \end{center}  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   910
  \inctime{15}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   911
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   912
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   913
%% Move it to end of session. Once introduction part is 
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   914
%% over. Then mentioning about options and utility.
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   915
\section{Use case and Options}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   916
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   917
\begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   918
  \frametitle{Use cases}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   919
  \emphbar{For team of people working remotely(even different computers/machines) on a project, use of version control is inevitable!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   920
  \vspace{0.15in}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   921
  \emphbar{For single person: managing projects and assignments becomes easy}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   922
  \vspace{0.15in}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   923
  \pause
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   924
  \emphbar{\color{red}{It is a good habit!}}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   925
\end{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   926
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   927
\begin{frame}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   928
  \frametitle{What are other options!}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   929
  \begin{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   930
  \item cvs (Concurrent Version System)
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   931
  \item svn (Subversion)
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   932
  \item hg (Mercurial)
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   933
  \item bzr (Bazaar)
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   934
  \item git
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   935
  \end{itemize}
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   936
  \inctime{5}
78
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   937
\end{frame}
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   938
216f6670abfd Added merging part in VCS slides.
Shantanu <shantanu@fossee.in>
parents: 77
diff changeset
   939
\begin{frame}
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   940
  \frametitle{Suggested Readings:}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   941
  \begin{itemize}
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   942
  \item \url{http://mercurial.selenic.com/guide/}
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   943
  \item \url{http://hgbook.red-bean.com/}    
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   944
  \item \url{http://karlagius.com/2009/01/09/version-control-for-the-masses/}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   945
  \item Articles related to version control available on \url{http://betterexplained.com/}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   946
  \item \url{http://en.wikipedia.org/wiki/Revision_control}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   947
  \item \url{http://wiki.alliedmods.net/Mercurial_Tutorial}
84
535151a16560 Added more screenshots, and details on merging.
Shantanu <shantanu@fossee.in>
parents: 83
diff changeset
   948
  \item Mario game images are taken from wikipedia.
77
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   949
  \end{itemize}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   950
\end{frame}
708e1f6a9a89 Created initial slides for VCS till merging.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   951
\end{document}
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   952
91
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   953
Some more suggestions from Nishanth:
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   954
revert  
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   955
resolve
6f2f2f949e32 Done more changes to version control presentation.
Shantanu <shantanu@fossee.in>
parents: 84
diff changeset
   956
79
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   957
Notes
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   958
-----
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   959
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   960
From http://mercurial.selenic.com/
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   961
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   962
Quick Start
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   963
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   964
Clone a project and push changes
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   965
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   966
$ hg clone http://selenic.com/repo/hello
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   967
$ cd hello
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   968
$ (edit files)
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   969
$ hg add (new files)
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   970
$ hg commit -m 'My changes'
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   971
$ hg push
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   972
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   973
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   974
Create a project and commit
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   975
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   976
$ hg init (project-directory)
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   977
$ cd (project-directory)
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   978
$ (add some files)
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   979
$ hg add
d6dd6541a887 Added some images to VCS slides.
Shantanu <shantanu@fossee.in>
parents: 78
diff changeset
   980
$ hg commit -m 'Initial commit'