Commit 4e6119e4 authored by Lukas Nagel's avatar Lukas Nagel
Browse files

develop example graphic

parent cdcc1ffd
......@@ -11,7 +11,10 @@ presentation=\
presentation/presentation.pdf
versionsgraphen=\
grafiken/example-graph.pdf \
grafiken/example-graph-step00.pdf \
grafiken/example-graph-step01.pdf \
grafiken/example-graph-step02.pdf \
grafiken/example-graph-step03.pdf \
grafiken/example-graph-hl-branch.pdf \
grafiken/example-graph-hl-merge.pdf \
grafiken/ex1-graph.pdf \
......@@ -90,6 +93,7 @@ example/example.tar.gz: $(example)
tar -acf $@ $^
grafiken/github-actions-step*.pdf: grafiken/github-actions.tex
grafiken/example-graph-step*.pdf: grafiken/example-graph.tex
# Generic Recipes
......
\input{example-graph}
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\commit[hide, above right=of \pepcommit]{\sortcommit}{lightred}{};
\commit[hide, right=of \sortcommit]{\refactorcommit}{lightred}{};
\commit[right=of \pepcommit]{\proofcommit}{lightblue}{\pepcommit};
\commit[right=of \proofcommit, xshift=1.2cm]{\mergecommit}{lightblue}{\proofcommit};
\Xbranch{master}{\mergecommit}
\Xbranch[remote, above right=of \refactorcommit]{alice/master}{\refactorcommit}
\Xmessage{\rootcommit}{initial}
\Xmessage{\pepcommit}{pep8}
\Xmessage[above=of \sortcommit]{\sortcommit}{presort}
\Xmessage[above=of \refactorcommit]{\refactorcommit}{refactor}
\Xmessage{\mergecommit}{merge alice/master into master}
\Xmessage{\proofcommit}{create proof}
\XHEAD{master}
\node[hide, expl, below left=0.3cm of presort]
(expl message) {commit Beschreibung};
\node[hide, expl, above=0.3cm of \rootcommit, xshift=-0.8cm]
(expl root) {root commit};
\node[hide, expl, above=0.3cm of \pepcommit, xshift=-0.8cm]
(expl commit) {commit};
\node[hide, expl, above right=0.3cm of alice/master]
(expl remote) {remote branch};
\node[hide, expl, above right=0.3cm of master]
(expl branch) {local branch};
\node[hide, expl, above right=0.3cm of \mergecommit]
(expl merge) {merge commit};
\draw[hide, expledge] (expl message) edge[in=180, out=90] (presort);
\draw[hide, expledge] (expl commit) edge[in=135, out=270] (\pepcommit);
\draw[hide, expledge] (expl root) edge[in=135, out=270] (\rootcommit);
\draw[hide, expledge] (expl branch) edge[in=0, out=270] (master);
\draw[hide, expledge] (expl remote) edge[in=0, out=270] (alice/master);
\draw[hide, expledge] (expl merge) edge[in=0, out=270] (\mergecommit);
\end{tikzpicture}
\end{document}
\input{example-graph}
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\commit[hide, above right=of \pepcommit]{\sortcommit}{lightred}{};
\commit[hide, right=of \sortcommit]{\refactorcommit}{lightred}{};
\commit[right=of \pepcommit]{\proofcommit}{lightblue}{\pepcommit};
\commit[right=of \proofcommit, xshift=1.2cm]{\mergecommit}{lightblue}{\proofcommit};
\Xbranch{master}{\mergecommit}
\Xbranch[remote, above right=of \refactorcommit]{alice/master}{\refactorcommit}
\message{\rootcommit}{initial}
\message{\pepcommit}{pep8}
\Xmessage[above=of \sortcommit]{\sortcommit}{presort}
\Xmessage[above=of \refactorcommit]{\refactorcommit}{refactor}
\Xmessage{\mergecommit}{merge alice/master into master}
\message{\proofcommit}{create proof}
\XHEAD{master}
\node[hide, expl, below left=0.3cm of presort]
(expl message) {commit Beschreibung};
\node[expl, above=0.3cm of \rootcommit, xshift=-0.8cm]
(expl root) {root commit};
\node[expl, above=0.3cm of \pepcommit, xshift=-0.8cm]
(expl commit) {commit};
\node[hide, expl, above right=0.3cm of alice/master]
(expl remote) {remote branch};
\node[hide, expl, above right=0.3cm of master]
(expl branch) {local branch};
\node[hide, expl, above right=0.3cm of \mergecommit]
(expl merge) {merge commit};
\draw[hide, expledge] (expl message) edge[in=180, out=90] (presort);
\draw[expledge] (expl commit) edge[in=135, out=270] (\pepcommit);
\draw[expledge] (expl root) edge[in=135, out=270] (\rootcommit);
\draw[hide, expledge] (expl branch) edge[in=0, out=270] (master);
\draw[hide, expledge] (expl remote) edge[in=0, out=270] (alice/master);
\draw[hide, expledge] (expl merge) edge[in=0, out=270] (\mergecommit);
\end{tikzpicture}
\end{document}
\input{example-graph}
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\commit[above right=of \pepcommit]{\sortcommit}{lightred}{\pepcommit};
\commit[right=of \sortcommit]{\refactorcommit}{lightred}{\sortcommit};
\commit[right=of \pepcommit]{\proofcommit}{lightblue}{\pepcommit};
\commit[right=of \proofcommit, xshift=1.2cm]{\mergecommit}{lightblue}{\proofcommit,\refactorcommit};
\Xbranch{master}{\mergecommit}
\Xbranch[remote, above right=of \refactorcommit]{alice/master}{\refactorcommit}
\message{\rootcommit}{initial}
\message{\pepcommit}{pep8}
\message[above=of \sortcommit]{\sortcommit}{presort}
\message[above=of \refactorcommit]{\refactorcommit}{refactor}
\message{\mergecommit}{merge alice/master into master}
\message{\proofcommit}{create proof}
\XHEAD{master}
\node[expl, below left=0.3cm of presort]
(expl message) {commit Beschreibung};
\node[expl, above=0.3cm of \rootcommit, xshift=-0.8cm]
(expl root) {root commit};
\node[expl, above=0.3cm of \pepcommit, xshift=-0.8cm]
(expl commit) {commit};
\node[hide, expl, above right=0.3cm of alice/master]
(expl remote) {remote branch};
\node[hide, expl, above right=0.3cm of master]
(expl branch) {local branch};
\node[expl, above right=0.3cm of \mergecommit]
(expl merge) {merge commit};
\draw[expledge] (expl message) edge[in=180, out=90] (presort);
\draw[expledge] (expl commit) edge[in=135, out=270] (\pepcommit);
\draw[expledge] (expl root) edge[in=135, out=270] (\rootcommit);
\draw[hide, expledge] (expl branch) edge[in=0, out=270] (master);
\draw[hide, expledge] (expl remote) edge[in=0, out=270] (alice/master);
\draw[expledge] (expl merge) edge[in=0, out=270] (\mergecommit);
\end{tikzpicture}
\end{document}
\input{example-graph}
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\commit[above right=of \pepcommit]{\sortcommit}{lightred}{\pepcommit};
\commit[right=of \sortcommit]{\refactorcommit}{lightred}{\sortcommit};
\commit[right=of \pepcommit]{\proofcommit}{lightblue}{\pepcommit};
\commit[right=of \proofcommit, xshift=1.2cm]{\mergecommit}{lightblue}{\proofcommit,\refactorcommit};
\branch{master}{\mergecommit}
\branch[remote, above right=of \refactorcommit]{alice/master}{\refactorcommit}
\message{\rootcommit}{initial}
\message{\pepcommit}{pep8}
\message[above=of \sortcommit]{\sortcommit}{presort}
\message[above=of \refactorcommit]{\refactorcommit}{refactor}
\message{\mergecommit}{merge alice/master into master}
\message{\proofcommit}{create proof}
\HEAD{master}
\node[expl, below left=0.3cm of presort]
(expl message) {commit Beschreibung};
\node[expl, above=0.3cm of \rootcommit, xshift=-0.8cm]
(expl root) {root commit};
\node[expl, above=0.3cm of \pepcommit, xshift=-0.8cm]
(expl commit) {commit};
\node[expl, above right=0.3cm of alice/master]
(expl remote) {remote branch};
\node[expl, above right=0.3cm of master]
(expl branch) {local branch};
\node[expl, above right=0.3cm of \mergecommit]
(expl merge) {merge commit};
\draw[expledge] (expl message) edge[in=180, out=90] (presort);
\draw[expledge] (expl commit) edge[in=135, out=270] (\pepcommit);
\draw[expledge] (expl root) edge[in=135, out=270] (\rootcommit);
\draw[expledge] (expl branch) edge[in=0, out=270] (master);
\draw[expledge] (expl remote) edge[in=0, out=270] (alice/master);
\draw[expledge] (expl merge) edge[in=0, out=270] (\mergecommit);
\end{tikzpicture}
\end{document}
......@@ -16,47 +16,3 @@
[ draw=lightgreen!50!black
, dotted
]
\begin{document}
\begin{tikzpicture}[versionsgraph]
\commit{\rootcommit}{lightblue}{};
\commit[right=of \rootcommit]{\pepcommit}{lightblue}{\rootcommit};
\commit[above right=of \pepcommit]{\sortcommit}{lightred}{\pepcommit};
\commit[right=of \sortcommit]{\refactorcommit}{lightred}{\sortcommit};
\commit[right=of \pepcommit]{\proofcommit}{lightblue}{\pepcommit};
\commit[right=of \proofcommit, xshift=1.2cm]{\mergecommit}{lightblue}{\proofcommit,\refactorcommit};
\branch{master}{\mergecommit}
\branch[remote, above right=of \refactorcommit]{alice/master}{\refactorcommit}
\message{\rootcommit}{initial}
\message{\pepcommit}{pep8}
\message[above=of \sortcommit]{\sortcommit}{presort}
\message[above=of \refactorcommit]{\refactorcommit}{refactor}
\message{\mergecommit}{merge alice/master into master}
\message{\proofcommit}{create proof}
\HEAD{master}
\node[expl, below left=0.3cm of presort]
(expl message) {commit Beschreibung};
\node[expl, above=0.3cm of \rootcommit, xshift=-0.8cm]
(expl root) {root commit};
\node[expl, above=0.3cm of \pepcommit, xshift=-0.8cm]
(expl commit) {commit};
\node[expl, above right=0.3cm of alice/master]
(expl remote) {remote branch};
\node[expl, above right=0.3cm of master]
(expl branch) {local branch};
\node[expl, above right=0.3cm of \mergecommit]
(expl merge) {merge commit};
\draw[expledge] (expl message) edge[in=180, out=90] (presort);
\draw[expledge] (expl commit) edge[in=135, out=270] (\pepcommit);
\draw[expledge] (expl root) edge[in=135, out=270] (\rootcommit);
\draw[expledge] (expl branch) edge[in=0, out=270] (master);
\draw[expledge] (expl remote) edge[in=0, out=270] (alice/master);
\draw[expledge] (expl merge) edge[in=0, out=270] (\mergecommit);
\end{tikzpicture}
\end{document}
......@@ -36,15 +36,27 @@
\node[branch,above=0.5cm of #3, #1] (#2) {#2};
\draw[branchpointer] (#2) -- (#3);
}
\newcommand\Xbranch[3][]{
\node[hide, branch,above=0.5cm of #3, #1] (#2) {#2};
\draw[hide, branchpointer] (#2) -- (#3);
}
\newcommand\HEAD[2][]{
\node[HEAD, above=.2cm of #2, #1] (HEAD) {HEAD};
\draw[branchpointer] (HEAD) -- (#2);
}
\newcommand\XHEAD[2][]{
\node[hide, HEAD, above=.2cm of #2, #1] (HEAD) {HEAD};
\draw[hide, branchpointer] (HEAD) -- (#2);
}
\renewcommand\message[3][]{
\node[message, below=of #2, #1] (#3) {#3};
\draw[branchpointer] (#3) -- (#2);
}
\newcommand\Xmessage[3][]{
\node[hide, message, below=of #2, #1] (#3) {#3};
\draw[hide, branchpointer] (#3) -- (#2);
}
\usetikzlibrary{positioning}
......
......@@ -105,15 +105,18 @@
\frametitle{\subsecname}
Die Menge aller \code{commit}s, ergibt die Versionsgeschichte als \code{DAG}
\begin{itemize}
\item Mehrere Vorgänger bzw. Nachfolger: \code{Zweig}e (\code{branches})
\item Zeiger auf commits: Spitze des \code{branches}
\item \code{HEAD}: Symbolische Referenzen auf aktuellen Zweig
\item Zeiger wird mit jedem commit vorwärts bewegt
\item<3-> Mehrere Vorgänger bzw. Nachfolger: \code{Zweig}e (\code{branches})
\item<4> Zeiger auf commits: Spitze des \code{branches}
\item<4> \code{HEAD}: Symbolische Referenzen auf aktuellen Zweig
\item<4> Zeiger wird mit jedem commit vorwärts bewegt
\end{itemize}
\center
\begin{image}
\img{../grafiken/example-graph}
\end{image}
\begin{images}[0.7]
\only<1>{\img{../grafiken/example-graph-step00}}%
\only<2>{\img{../grafiken/example-graph-step01}}%
\only<3>{\img{../grafiken/example-graph-step02}}%
\only<4>{\img{../grafiken/example-graph-step03}}%
\end{images}
\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