view renames-and-merges.tex @ 346:e1ffd0b18d71

Fix unwanted en-dash
author Martin Geisler <mg@aragost.com>
date Wed, 20 Jun 2012 17:15:59 +0200
parents b100f5e05c28
children
line wrap: on
line source

\begin{frame}[fragile]{Finding Renamed Files}
  Tracking renames is important:
  \begin{itemize}
  \item you fix a bug in \ext{X.java} in version 1.0
  \item version 2.0 now uses \ext{Y.java} instead of \ext{X.java}
  \item Mercurial does the right thing with rename tracking
  \end{itemize}

  \begin{tikzpicture}[node distance=4.7mm]
    \lstset{
      language=Java,
      aboveskip=0pt,
      belowskip=0pt,
      backgroundcolor={},
      frame=none,
      moredelim=**[is][\bfseries\color{red!80!black}]{|}{|}
    }
    \tikzstyle{listing}=[text width=30.15mm, draw, fill=black!5!white, drop shadow]
    \node[listing, label=above:\ext{X.java}] (v1) at (0, 0) {
\begin{lstlisting}
public class X {
  static int
    theAnswer = 41;
}
\end{lstlisting}
};

    \node[listing, label=above:\ext{Y.java}, right=of v1, yshift=+15mm] (v2) {
\begin{lstlisting}
public class |Y| {
  static int
    theAnswer = 41;
}
\end{lstlisting}
};

    \node[listing, label=above:\ext{X.java}, right=of v1, yshift=-15mm] (fix) {
\begin{lstlisting}
public class X {
  static int
    theAnswer = |42|;
}
\end{lstlisting}
};

    \node[listing, label=above:\ext{Y.java}, right=of fix, yshift=15mm] (merge) {
\begin{lstlisting}
public class |Y| {
  static int
    theAnswer = |42|;
}
\end{lstlisting}
};

    \draw[->, short] (v1) to[bend left] node[above left] {rename} (v2);
    \draw[->, short] (v1) to[bend right] node[below left] {bugfix} (fix);
    \draw[->, short] (v2) to[bend left] (merge);
    \draw[->, short] (fix) to[bend right] (merge);
  \end{tikzpicture}
\end{frame}