253
|
1 \begin{frame}[fragile]{Finding Renamed Files} |
|
2 Tracking renames is important: |
|
3 \begin{itemize} |
|
4 \item you fix a bug in \ext{X.java} in version 1.0 |
255
|
5 \item version 2.0 now uses \ext{Y.java} instead of \ext{X.java} |
253
|
6 \item Mercurial does the right thing with rename tracking |
|
7 \end{itemize} |
|
8 |
|
9 \begin{tikzpicture}[node distance=4.7mm] |
|
10 \lstset{ |
|
11 language=Java, |
|
12 aboveskip=0pt, |
|
13 belowskip=0pt, |
|
14 backgroundcolor={}, |
|
15 frame=none, |
|
16 moredelim=**[is][\bfseries\color{red!80!black}]{|}{|} |
|
17 } |
|
18 \tikzstyle{listing}=[text width=30.15mm, draw, fill=black!5!white, drop shadow] |
|
19 \node[listing, label=above:\ext{X.java}] (v1) at (0, 0) { |
|
20 \begin{lstlisting} |
|
21 public class X { |
|
22 static int |
|
23 theAnswer = 41; |
|
24 } |
|
25 \end{lstlisting} |
|
26 }; |
|
27 |
|
28 \node[listing, label=above:\ext{Y.java}, right=of v1, yshift=+15mm] (v2) { |
|
29 \begin{lstlisting} |
|
30 public class |Y| { |
|
31 static int |
|
32 theAnswer = 41; |
|
33 } |
|
34 \end{lstlisting} |
|
35 }; |
|
36 |
|
37 \node[listing, label=above:\ext{X.java}, right=of v1, yshift=-15mm] (fix) { |
|
38 \begin{lstlisting} |
|
39 public class X { |
|
40 static int |
|
41 theAnswer = |42|; |
|
42 } |
|
43 \end{lstlisting} |
|
44 }; |
|
45 |
|
46 \node[listing, label=above:\ext{Y.java}, right=of fix, yshift=15mm] (merge) { |
|
47 \begin{lstlisting} |
|
48 public class |Y| { |
|
49 static int |
|
50 theAnswer = |42|; |
|
51 } |
|
52 \end{lstlisting} |
|
53 }; |
|
54 |
|
55 \draw[->, short] (v1) to[bend left] node[above left] {rename} (v2); |
|
56 \draw[->, short] (v1) to[bend right] node[below left] {bugfix} (fix); |
|
57 \draw[->, short] (v2) to[bend left] (merge); |
|
58 \draw[->, short] (fix) to[bend right] (merge); |
|
59 \end{tikzpicture} |
|
60 \end{frame} |