child._children[self._hash] = self
def export_to_tikz(self, ypos):
- print("\\node[commit, " + "blue" + ", fill=" + "blue" + "] (" + self._hash + ") at (" + str(.5 * self._node_pos) + "," + str(ypos) + ") {};")
+ print("\\node[commit, " + colors[self._node_pos] + ", fill=" + colors[self._node_pos] + "] (" + self._hash + ") at (" + str(.5 * self._node_pos) + "," + str(ypos) + ") {};")
print("\\node[right,xshift=10] (label_" + self._hash + ") at (" + self._hash + ".east) {\\verb!" + self._hash + ": " + self._message + "!};")
#for child in self._children.itervalues():
# print("\\path[" + "blue" +"] (" + self._hash + ") to[out=90,in=-90] (" + child._hash + ");")
for commit in self._commits.values():
for child in commit._children.values():
- print("\\path[" + "blue" +"] (" + commit._hash + ") to[out=90,in=-90] (" + child._hash + ");")
+ print("\\path[" + colors[commit._node_pos] +"] (" + commit._hash + ") to[out=90,in=-90] (" + child._hash + ");")
for branch in self._branches:
print("\\node[branch,right,xshift=10] (" + branch._name + ") at (label_" + branch._hash + ".east) {\\lstinline{" + branch._name +"}};")
\tikzstyle{branch}=[draw,rectangle,rounded corners=3,fill=white,inner sep=2pt,minimum size=5pt]
\node[commit, blue, fill=blue] (69be133) at (0.5,0) {};
\node[right,xshift=10] (label_69be133) at (69be133.east) {\verb!69be133: [py]minor bugfix!};
-\node[commit, blue, fill=blue] (7ac7de4) at (0.0,-0.5) {};
+\node[commit, black, fill=black] (7ac7de4) at (0.0,-0.5) {};
\node[right,xshift=10] (label_7ac7de4) at (7ac7de4.east) {\verb!7ac7de4: Merge branch 'master' into feature/python!};
-\node[commit, blue, fill=blue] (da268ea) at (0.0,-1.0) {};
+\node[commit, black, fill=black] (da268ea) at (0.0,-1.0) {};
\node[right,xshift=10] (label_da268ea) at (da268ea.east) {\verb!da268ea: [py] Export copy finished!};
-\node[commit, blue, fill=blue] (3dbbd41) at (0.0,-1.5) {};
+\node[commit, black, fill=black] (3dbbd41) at (0.0,-1.5) {};
\node[right,xshift=10] (label_3dbbd41) at (3dbbd41.east) {\verb!3dbbd41: [py] commit & branch läuft!};
-\node[commit, blue, fill=blue] (afd6f5a) at (0.0,-2.0) {};
+\node[commit, black, fill=black] (afd6f5a) at (0.0,-2.0) {};
\node[right,xshift=10] (label_afd6f5a) at (afd6f5a.east) {\verb!afd6f5a: [py] Commit funktioniert!};
-\node[commit, blue, fill=blue] (9ebee64) at (0.0,-2.5) {};
+\node[commit, black, fill=black] (9ebee64) at (0.0,-2.5) {};
\node[right,xshift=10] (label_9ebee64) at (9ebee64.east) {\verb!9ebee64: [py] init & git shell!};
-\node[commit, blue, fill=blue] (d78896f) at (0.0,-3.0) {};
+\node[commit, black, fill=black] (d78896f) at (0.0,-3.0) {};
\node[right,xshift=10] (label_d78896f) at (d78896f.east) {\verb!d78896f: [doc] kleine änderrung!};
-\node[commit, blue, fill=blue] (a6f6d74) at (0.0,-3.5) {};
+\node[commit, black, fill=black] (a6f6d74) at (0.0,-3.5) {};
\node[right,xshift=10] (label_a6f6d74) at (a6f6d74.east) {\verb!a6f6d74: Grober Latex Test!};
-\node[commit, blue, fill=blue] (e5c3cd5) at (0.0,-4.0) {};
+\node[commit, black, fill=black] (e5c3cd5) at (0.0,-4.0) {};
\node[right,xshift=10] (label_e5c3cd5) at (e5c3cd5.east) {\verb!e5c3cd5: added Ruby Skript!};
-\node[commit, blue, fill=blue] (1af283b) at (0.0,-4.5) {};
+\node[commit, black, fill=black] (8a5d531) at (0.0,-4.5) {};
+\node[right,xshift=10] (label_8a5d531) at (8a5d531.east) {\verb!8a5d531: [py] minor fix!};
+\node[commit, black, fill=black] (1af283b) at (0.0,-5.0) {};
\node[right,xshift=10] (label_1af283b) at (1af283b.east) {\verb!1af283b: [py] some comments!};
\path[blue] (69be133) to[out=90,in=-90] (7ac7de4);
-\path[blue] (da268ea) to[out=90,in=-90] (69be133);
-\path[blue] (da268ea) to[out=90,in=-90] (1af283b);
-\path[blue] (3dbbd41) to[out=90,in=-90] (da268ea);
-\path[blue] (afd6f5a) to[out=90,in=-90] (3dbbd41);
-\path[blue] (9ebee64) to[out=90,in=-90] (afd6f5a);
-\path[blue] (d78896f) to[out=90,in=-90] (e5c3cd5);
-\path[blue] (a6f6d74) to[out=90,in=-90] (d78896f);
-\path[blue] (e5c3cd5) to[out=90,in=-90] (9ebee64);
-\path[blue] (1af283b) to[out=90,in=-90] (7ac7de4);
-\node[branch,right,xshift=10] (feature/python) at (label_7ac7de4.east) {\lstinline{feature/python}};
+\path[black] (7ac7de4) to[out=90,in=-90] (8a5d531);
+\path[black] (da268ea) to[out=90,in=-90] (69be133);
+\path[black] (da268ea) to[out=90,in=-90] (1af283b);
+\path[black] (3dbbd41) to[out=90,in=-90] (da268ea);
+\path[black] (afd6f5a) to[out=90,in=-90] (3dbbd41);
+\path[black] (9ebee64) to[out=90,in=-90] (afd6f5a);
+\path[black] (d78896f) to[out=90,in=-90] (e5c3cd5);
+\path[black] (a6f6d74) to[out=90,in=-90] (d78896f);
+\path[black] (e5c3cd5) to[out=90,in=-90] (9ebee64);
+\path[black] (1af283b) to[out=90,in=-90] (7ac7de4);
+\node[branch,right,xshift=10] (feature/python) at (label_8a5d531.east) {\lstinline{feature/python}};
\node[branch,right,xshift=10] (master) at (label_69be133.east) {\lstinline{master}};
\end{tikzpicture}