Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defRCS$#1: #2 ${expandafterdefcsname RCS#1endcsname{#2}}
- RCS$Revision: 1.13 $ % or any RCS keyword
- RCS$Date: 2010/04/02 18:20:00 $
- ...
- date{Revision RCSRevision, RCSDate}
- hg.id: .hg
- hg log -r'p1()' --template '\def\HgNode{{node|short}}n\def\HgDate{{date|rfc3339date}}n\def\HgAuthor{{author|person}}n' >$@
- git diff --color-words
- SVN_INFO=svn.info.tex
- svninfo:
- $(shell svn info > $(SVN_INFO) )
- section{SVN info}
- {scriptsize verbatiminput{svn.info.tex}}
- IfFileExists{svn.info.tex}
- {
- .....
- }
- DIFF_INFO=diff.info.tex
- DIFF_REV=40
- diffinfo:
- $(shell svn diff --revision $(DIFF_REV) $(NAME).tex > $(DIFF_INFO) )
- IfFileExists{diff.info.tex}
- {
- newpage
- begin{landscape}
- section{Diff}
- {scriptsize verbatiminput{diff.info.tex}}
- end{landscape}
- }
- $ cat .gitattributes
- *.tex diff=tex
- defHgNode{2f2q4e1000e9}
- defHgDate{2014-02-26T18:00:43+00:00}
- defHgStatus{M tex/experiment.tex \
- M tex/introduction.tex}
- newcommand{hginfo}{%
- ifoptionfinal{}{%
- input{.hginfo}
- {%
- centering % Doesn't center, but skips parindent, for some reason.
- begin{tikzpicture}[every node/.style={draw, dashed, align=left}]
- node (draft) [green, label={[gray]below left:ifdef{HgStatus}{HgStatus}{}}] {HG draft revision: texttt{HgNode/HgDate}};
- end{tikzpicture}
- }
- }
- }
- usepackage{ifdraft}
- usepackage{tikz}
- usepackage{includes/hginfo}
- % Print fancy HG repository info in draft mode using TikZ and PythonTeX.
- newcommand{hginfo}{%
- ifoptionfinal{}{%
- pyc[hg]{import sys; sys.path[-1] += '/scripts'; import hginfo; hg = hginfo.get_hg_info()}
- {%
- centering % Doesn't center, but skips parindent, for some reason.
- begin{tikzpicture}[every node/.style={draw, dashed, align=left}]
- node (draft) [green, label={[gray]below left:{py[hg]{hg['status']}}}] {HG draft revision: texttt{py[hg]{hg['node']}/py[hg]{hg['date']}}};
- end{tikzpicture}
- }
- }
- }
- usepackage[runall]{pythontex}
- usepackage{includes/hginfopy}
- hginfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement