Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. defRCS$#1: #2 ${expandafterdefcsname RCS#1endcsname{#2}}
  2. RCS$Revision: 1.13 $ % or any RCS keyword
  3. RCS$Date: 2010/04/02 18:20:00 $
  4. ...
  5. date{Revision RCSRevision, RCSDate}
  6.  
  7. hg.id: .hg
  8. hg log -r'p1()' --template '\def\HgNode{{node|short}}n\def\HgDate{{date|rfc3339date}}n\def\HgAuthor{{author|person}}n' >$@
  9.  
  10. git diff --color-words
  11.  
  12. SVN_INFO=svn.info.tex
  13. svninfo:
  14. $(shell svn info > $(SVN_INFO) )
  15.  
  16. section{SVN info}
  17. {scriptsize verbatiminput{svn.info.tex}}
  18.  
  19. IfFileExists{svn.info.tex}
  20. {
  21. .....
  22. }
  23.  
  24. DIFF_INFO=diff.info.tex
  25. DIFF_REV=40
  26. diffinfo:
  27. $(shell svn diff --revision $(DIFF_REV) $(NAME).tex > $(DIFF_INFO) )
  28.  
  29. IfFileExists{diff.info.tex}
  30. {
  31. newpage
  32. begin{landscape}
  33. section{Diff}
  34. {scriptsize verbatiminput{diff.info.tex}}
  35. end{landscape}
  36. }
  37.  
  38. $ cat .gitattributes
  39. *.tex diff=tex
  40.  
  41. defHgNode{2f2q4e1000e9}
  42. defHgDate{2014-02-26T18:00:43+00:00}
  43. defHgStatus{M tex/experiment.tex \
  44. M tex/introduction.tex}
  45.  
  46. newcommand{hginfo}{%
  47. ifoptionfinal{}{%
  48. input{.hginfo}
  49. {%
  50. centering % Doesn't center, but skips parindent, for some reason.
  51. begin{tikzpicture}[every node/.style={draw, dashed, align=left}]
  52. node (draft) [green, label={[gray]below left:ifdef{HgStatus}{HgStatus}{}}] {HG draft revision: texttt{HgNode/HgDate}};
  53. end{tikzpicture}
  54. }
  55. }
  56. }
  57.  
  58. usepackage{ifdraft}
  59. usepackage{tikz}
  60. usepackage{includes/hginfo}
  61.  
  62. % Print fancy HG repository info in draft mode using TikZ and PythonTeX.
  63. newcommand{hginfo}{%
  64. ifoptionfinal{}{%
  65. pyc[hg]{import sys; sys.path[-1] += '/scripts'; import hginfo; hg = hginfo.get_hg_info()}
  66. {%
  67. centering % Doesn't center, but skips parindent, for some reason.
  68. begin{tikzpicture}[every node/.style={draw, dashed, align=left}]
  69. node (draft) [green, label={[gray]below left:{py[hg]{hg['status']}}}] {HG draft revision: texttt{py[hg]{hg['node']}/py[hg]{hg['date']}}};
  70. end{tikzpicture}
  71. }
  72. }
  73. }
  74.  
  75. usepackage[runall]{pythontex}
  76. usepackage{includes/hginfopy}
  77.  
  78. hginfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement