Commit 5a1d1925 authored by Lukas Nagel's avatar Lukas Nagel
Browse files

add graphic for example1

parent e5236600
\documentclass{standalone}
\input{theme}
\input{versiongraph}
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\branch{master}{\rootcommit}
\HEAD{master}
\message{\rootcommit}{initial}
\end{tikzpicture}
\end{document}
......@@ -6,10 +6,10 @@
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\trackcommit}{lightblue}{\rootcommit};
\branch[above right]{master}{\trackcommit}
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\branch{master}{\pepcommit}
\HEAD{master}
\message{\rootcommit}{initial}
\message{\trackcommit}{pep8}
\message{\pepcommit}{pep8}
\end{tikzpicture}
\end{document}
......@@ -11,3 +11,4 @@
\definecolor{lightgreen}{rgb}{0.7, 0.9, 0.7}
\definecolor{lightred}{rgb}{0.9, 0.7, 0.7}
\definecolor{lightyellow}{rgb}{0.9, 0.9, 0.7}
\definecolor{lightorange}{rgb}{0.9, 0.7, 0.5}
......@@ -5,7 +5,11 @@
\usetikzlibrary{arrows}
\def\rootcommit{4200}
\def\trackcommit{4201}
\def\pepcommit{4201}
\def\sortcommit{4202}
\def\refactorcommit{4203}
\def\proofcommit{4204}
\def\mergecommit{4205}
\newcommand\hash[2][0]{
\directlua{
......@@ -24,23 +28,21 @@
\newcommand\commit[4][]{
\node[commit=#3,#1] (#2) {\hash[#2]{7}};
\draw[parent]
\foreach \parent in {#4}
{(#2) -> (\parent)}
;
{\draw[parent] (#2) -> (\parent);}
}
\newcommand\branch[3][above]{
\node[branch,#1=.5cm of #3] (#2) {#2};
\newcommand\branch[3][]{
\node[branch,above=0.5cm of #3, #1] (#2) {#2};
\draw[branchpointer] (#2) -- (#3);
}
\newcommand\HEAD[2][above]{
\node[HEAD, #1=.2cm of #2] (HEAD) {HEAD};
\newcommand\HEAD[2][]{
\node[HEAD, above=.2cm of #2, #1] (HEAD) {HEAD};
\draw[branchpointer] (HEAD) -- (#2);
}
\renewcommand\message[3][above]{
\node[message, #1=.2cm of #2] (#3) {#3};
\renewcommand\message[3][]{
\node[message, below=of #2, #1] (#3) {#3};
\draw[branchpointer] (#3) -- (#2);
}
......@@ -62,6 +64,7 @@
[ rectangle
, rounded corners=2pt
, fill=lightgreen
, node distance=0.5cm
]
\tikzstyle{message}=%
[rectangle
......@@ -69,6 +72,7 @@
, dashed
, draw
, font=\scriptsize
, node distance=0.3cm
]
\tikzstyle{branchpointer}=%
[ draw
......@@ -91,4 +95,32 @@
, align=center
, inner sep=0
, font=\tt\scriptsize
, node distance=1cm
]
\def\cA{13370}
\def\cB{13371}
\def\cC{13372}
\def\cD{13373}
\def\cE{13374}
\def\cF{13375}
\def\cG{13376}
\def\cH{13377}
\def\cI{13378}
\def\cJ{13379}
\def\cK{13380}
\def\cL{13381}
\def\cM{13382}
\def\cN{13383}
\def\cO{13384}
\def\cP{13385}
\def\cQ{13386}
\def\cR{13387}
\def\cS{13388}
\def\cT{13389}
\def\cU{13390}
\def\cV{13391}
\def\cW{13392}
\def\cX{13393}
\def\cY{13394}
\def\cZ{13395}
......@@ -197,19 +197,14 @@
\begin{Beispiel}
\begin{commandline}
\cmd{vim} algo.py & \cmt{nach pep8 formatieren} \\
\cmd{git status} & \cmt{Ausgabe gekürtz} \\
\out{Änderungen, die nicht zum Commit vorgemerkt sind:} \\
\out{~~~~geändert: algo.py} \\
\cmd{git add} algo.py & \cmt{Änderung in index} \\
\cmd{git status} & \cmt{Ausgabe gekürtz} \\
\out{Zum Commit vorgemerkte Änderungen:} \\
\out{~~~~geändert: algo.py} \\
\cmd{git commit -m} \str{pep8} & \cmt{Änderungen commiten} \\
\uncover<2>{\cmd{git commit -m} \str{pep8} & \cmt{Änderungen commiten} \\}
\end{commandline}
\end{Beispiel}
\center
\begin{figure}
\includegraphics{../grafiken/ex1-graph}
\only<1>{\includegraphics{../grafiken/ex1-graph-precommit}}
\only<2>{\includegraphics{../grafiken/ex1-graph}}
\end{figure}
\end{frame}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment