From: Peter Schaefer Date: Wed, 2 Jan 2019 22:35:18 +0000 (+0100) Subject: [py] fixed order X-Git-Tag: v1.0~6 X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=6e41ab0b67bc833381da4dd04603f81059658cb7;p=tex_tools.git [py] fixed order --- diff --git a/git-log-to-tikz.py b/git-log-to-tikz.py index d6b7ce2..ce948ff 100755 --- a/git-log-to-tikz.py +++ b/git-log-to-tikz.py @@ -1,4 +1,5 @@ from subprocess import check_output +from collections import OrderedDict import re # Importer fast fertig @@ -71,7 +72,7 @@ class Branch: class Repo: def __init__(self): - self._commits = {} + self._commits = OrderedDict() self._branches = [] def add_commit(self, commit): diff --git a/git1.tex b/git1.tex index d486e88..6291f25 100644 --- a/git1.tex +++ b/git1.tex @@ -2,39 +2,42 @@ \tikzstyle{commit}=[draw,circle,fill=white,inner sep=0pt,minimum size=5pt] \tikzstyle{every path}=[draw] \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, black, fill=black] (7ac7de4) at (0.0,-0.5) {}; +\node[commit, black, fill=black] (2256509) at (0.0,0) {}; +\node[right,xshift=10] (label_2256509) at (2256509.east) {\verb!2256509: [py] fixed automatic colors!}; +\node[commit, black, fill=black] (8a5d531) at (0.0,-0.5) {}; +\node[right,xshift=10] (label_8a5d531) at (8a5d531.east) {\verb!8a5d531: [py] minor fix!}; +\node[commit, black, fill=black] (7ac7de4) at (0.0,-1.0) {}; \node[right,xshift=10] (label_7ac7de4) at (7ac7de4.east) {\verb!7ac7de4: Merge branch 'master' into feature/python!}; -\node[commit, black, fill=black] (da268ea) at (0.0,-1.0) {}; +\node[commit, blue, fill=blue] (69be133) at (0.5,-1.5) {}; +\node[right,xshift=10] (label_69be133) at (69be133.east) {\verb!69be133: [py]minor bugfix!}; +\node[commit, black, fill=black] (1af283b) at (0.0,-2.0) {}; +\node[right,xshift=10] (label_1af283b) at (1af283b.east) {\verb!1af283b: [py] some comments!}; +\node[commit, black, fill=black] (da268ea) at (0.0,-2.5) {}; \node[right,xshift=10] (label_da268ea) at (da268ea.east) {\verb!da268ea: [py] Export copy finished!}; -\node[commit, black, fill=black] (3dbbd41) at (0.0,-1.5) {}; +\node[commit, black, fill=black] (3dbbd41) at (0.0,-3.0) {}; \node[right,xshift=10] (label_3dbbd41) at (3dbbd41.east) {\verb!3dbbd41: [py] commit & branch läuft!}; -\node[commit, black, fill=black] (afd6f5a) at (0.0,-2.0) {}; +\node[commit, black, fill=black] (afd6f5a) at (0.0,-3.5) {}; \node[right,xshift=10] (label_afd6f5a) at (afd6f5a.east) {\verb!afd6f5a: [py] Commit funktioniert!}; -\node[commit, black, fill=black] (9ebee64) at (0.0,-2.5) {}; +\node[commit, black, fill=black] (9ebee64) at (0.0,-4.0) {}; \node[right,xshift=10] (label_9ebee64) at (9ebee64.east) {\verb!9ebee64: [py] init & git shell!}; -\node[commit, black, fill=black] (d78896f) at (0.0,-3.0) {}; +\node[commit, black, fill=black] (e5c3cd5) at (0.0,-4.5) {}; +\node[right,xshift=10] (label_e5c3cd5) at (e5c3cd5.east) {\verb!e5c3cd5: added Ruby Skript!}; +\node[commit, black, fill=black] (d78896f) at (0.0,-5.0) {}; \node[right,xshift=10] (label_d78896f) at (d78896f.east) {\verb!d78896f: [doc] kleine änderrung!}; -\node[commit, black, fill=black] (a6f6d74) at (0.0,-3.5) {}; +\node[commit, black, fill=black] (a6f6d74) at (0.0,-5.5) {}; \node[right,xshift=10] (label_a6f6d74) at (a6f6d74.east) {\verb!a6f6d74: Grober Latex Test!}; -\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, 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[black] (8a5d531) to[out=90,in=-90] (2256509); \path[black] (7ac7de4) to[out=90,in=-90] (8a5d531); +\path[blue] (69be133) to[out=90,in=-90] (7ac7de4); +\path[black] (1af283b) to[out=90,in=-90] (7ac7de4); \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] (e5c3cd5) to[out=90,in=-90] (9ebee64); \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] (feature/python) at (label_2256509.east) {\lstinline{feature/python}}; \node[branch,right,xshift=10] (master) at (label_69be133.east) {\lstinline{master}}; \end{tikzpicture} diff --git a/text-output.pdf b/text-output.pdf index 88f8ce2..39dbc1c 100644 Binary files a/text-output.pdf and b/text-output.pdf differ