On Tue, 22 Jan 2008, Markus Bernhardt wrote:
\def\SVNVERSION{svnversion -n > svnversion.tex}
\ifeof18 \installprogram{\SVNVERSION}% \else \executesystemcommand{\SVNVERSION}% \fi
Looks ok to me. Coming back to calculating the maximum of versions, this is possible to do inside TeX. Here is a short proof of concept. We need a two pass mechanism since revisions could be defined after they need to be used. \unprotect \def\REVISION#1 {\doifdefinedelse{!!REVISION} {\ifdim#1pt > \dimexpr1pt*\!!REVISION \edef\!!REVISION{#1} \fi} {\edef\!!REVISION{#1}}} \definetwopasslist{REVISION} % Execute this in the beginning of document \def\initializeREVISION {\gettwopassdata{REVISION} \iftwopassdatafound \xdef\getREVISION{\twopassdata} \else \def\getREVISION{Not Found} \fi \global\let\initializeREVISION\relax} % Execute this at the end of document \def\saveREVISION {\savetwopassdata {REVISION} {\getREVISION} {\!!REVISION}} \appendtoks \initializeREVISION \to \everystarttext \appendtoks \saveREVISION \to \everystoptext \protect \starttext File 1:\REVISION{10} \getREVISION File 2:\REVISION{4} \getREVISION File 3:\REVISION{14} \getREVISION \stoptext Now this just needs to be plugged into the command to get revision information from svn tags. Aditya