diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-22 19:02:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-22 19:02:28 +0000 |
commit | f416cde919529b4cc1dbde7a502981b7665cb0cf (patch) | |
tree | bdf6c00d65fabbfd3cd0dcd8914946a696a1e91a /Master | |
parent | 5c1ac0551ac7f6c96e8b09c1ba7b1f2ecb2e864d (diff) |
svn-multi 2.2 (20oct09)
git-svn-id: svn://tug.org/texlive/trunk@16125 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/svn-multi/README | 88 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/svn-multi/example.pdf | bin | 41492 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/svn-multi/svn-multi-pl.pdf | bin | 0 -> 147314 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/svn-multi/svn-multi.pdf | bin | 1244990 -> 1264427 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/Makefile | 114 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/example_chap1.tex (renamed from Master/texmf-dist/doc/latex/svn-multi/example_chap1.tex) | 0 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/example_main.tex (renamed from Master/texmf-dist/doc/latex/svn-multi/example_main.tex) | 0 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/group_example.tex (renamed from Master/texmf-dist/doc/latex/svn-multi/group_example.tex) | 0 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/svn-multi.dtx | 145 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty | 87 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svnkw.sty | 38 |
11 files changed, 237 insertions, 235 deletions
diff --git a/Master/texmf-dist/doc/latex/svn-multi/README b/Master/texmf-dist/doc/latex/svn-multi/README deleted file mode 100644 index e50ba810df2..00000000000 --- a/Master/texmf-dist/doc/latex/svn-multi/README +++ /dev/null @@ -1,88 +0,0 @@ --------------------------------------------------------------- - svn-multi (was svnkw) - version 2.1, Mar 27th, 2009 --------------------------------------------------------------- - -This package lets you typeset keywords of the version -control system Subversion inside your LaTeX files anywhere -you like. Unlike the very similar package 'svn' the usage of -multiple files for one LaTeX document is well supported. - -Copyright (C) 2006-2009 Martin Scharrer -E-mail: martin@scharrer-online.de -WWW: http://www.scharrer-online.de/latex/svn-multi/ - -This work may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.3c -of this license or (at your option) any later version. -The latest version of this license is in - http://www.latex-project.org/lppl.txt -and version 1.3c or later is part of all distributions of LaTeX -version 2008/05/04 or later. - -This work has the LPPL maintenance status `maintained'. - -The Current Maintainer of this work is Martin Scharrer. - -This work consists of the files svn-multi.dtx, svn-multi-pl.dtx, svn-multi.ins -and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl. - - -Tiny example: -~~~~~~~~~~~~~ -Put the following Subversion keyword at the start of all your LaTeX files of -your document: - -\svnidlong -{$HeadURL$} -{$LastChangedDate$} -{$LastChangedRevision$} -{$LastChangedBy$} - -or - -\svnid{$Id$} - -or both. -Attach the subversion property svn:keyword with a value of -'URL Date Revision Author', 'Id' or both, respectively, to all LaTeX files. -Subversion will expand this keywords the next time the files are committed and -then the SVN information can be typeset using - \svnauthor, \svnrev, \svndate, \svnhour, ... -which will hold the information of the latest comitted file -anywhere in your multi-file LaTeX document. - -Also per-file macros exist: - \svnfileauthor, \svnfilerev, ... -which hold the keyword values of the current file. - - -INSTALL: -~~~~~~~~ -From the .dtx file (if you don't get the .sty files directly): -================== -Unpack the zip file and run 'make'. -You also can do it manually: - [pdf]latex svn-multi.ins # for the style file and perl script - [pdf]latex svn-multi.dtx # for the documentation -2x[pdf]latex example-main # for the example - -For the large keyword group example document: - [pdf]latex group-example - perl svn-multi.pl group-example -2x[pdf]latex group-example - -Place the two .sty files - svn-multi.sty # Package - svnkw.sty # Wrapper for backward compatibility -into your TEXMF tree, e.g. in - $TEXMF/tex/latex/svn-multi - -Make the perl script svn-multi.pl executable: - chmod +x svn-multi.pl -and place it in an directory in your $PATH, e.g. under Unix/Linux in - /usr/bin/svn-multi.pl or - /usr/local/bin/svn-multi.pl or - $HOME/bin/svn-multi.pl -Consider to rename or link it to 'svn-multi'. - diff --git a/Master/texmf-dist/doc/latex/svn-multi/example.pdf b/Master/texmf-dist/doc/latex/svn-multi/example.pdf Binary files differdeleted file mode 100644 index 6fe01903295..00000000000 --- a/Master/texmf-dist/doc/latex/svn-multi/example.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/svn-multi/svn-multi-pl.pdf b/Master/texmf-dist/doc/latex/svn-multi/svn-multi-pl.pdf Binary files differnew file mode 100644 index 00000000000..efe8ea20895 --- /dev/null +++ b/Master/texmf-dist/doc/latex/svn-multi/svn-multi-pl.pdf diff --git a/Master/texmf-dist/doc/latex/svn-multi/svn-multi.pdf b/Master/texmf-dist/doc/latex/svn-multi/svn-multi.pdf Binary files differindex 39cd32e9996..38e58319ba4 100644 --- a/Master/texmf-dist/doc/latex/svn-multi/svn-multi.pdf +++ b/Master/texmf-dist/doc/latex/svn-multi/svn-multi.pdf diff --git a/Master/texmf-dist/source/latex/svn-multi/Makefile b/Master/texmf-dist/source/latex/svn-multi/Makefile index 719834dda14..e5964b0c68a 100644 --- a/Master/texmf-dist/source/latex/svn-multi/Makefile +++ b/Master/texmf-dist/source/latex/svn-multi/Makefile @@ -1,57 +1,70 @@ -# $Id: Makefile 628 2007-07-10 20:32:06Z martin $ +# $Id: Makefile 1052 2009-05-03 12:24:53Z martin $ + +PACKAGE = svn-multi +PACKAGE_STY = ${PACKAGE}.sty +PACKAGE_DTX = ${PACKAGE}.dtx ${PACKAGE}-pl.dtx +PACKAGE_SCR = ${PACKAGE}.pl +PACKAGE_DOC = $(PACKAGE_DTX:.dtx=.pdf) +PACKAGE_SRC = ${PACKAGE_DTX} ${PACKAGE}.ins Makefile example_chap1.tex example_main.tex group_example.tex +PACKFILES = ${PACKAGE_SRC} ${PACKAGE_DOC} README + +TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svn *.svx *.svt *.toc *.ilg *.gls *.hd *.exa *.exb *.fdb_latexmk +INSGENERATED = ${PACKAGE_STY} svnkw.sty svn-multi.pl +GENERATED = ${INSGENERATED} ${PACKAGE}.pdf svn-multi-pl.pdf example.pdf group_example.pdf group_example_*.tex ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf +ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip +TDSZIPFILE = ${PACKAGE}.tds.zip -PACKAGE=svn-multi -PACKFILES = ${PACKAGE}.dtx ${PACKAGE}.ins ${PACKAGE}.pdf svn-multi-pl.dtx example_main.tex \ - example_chap1.tex example.pdf Makefile README group_example.tex -TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svn *.svx *.svt *.toc *.ilg *.gls *.hd TESTDIR = tests TESTS = $(patsubst %.tex,%,$(subst ${TESTDIR}/,,$(wildcard ${TESTDIR}/test?.tex ${TESTDIR}/test??.tex))) # look for all test*.tex file names and remove the '.tex' TESTARGS = -output-directory ${TESTDIR} -INSGENERATED = ${PACKAGE}.sty svnkw.sty svn-multi.pl -GENERATED = ${INSGENERATED} ${PACKAGE}.pdf svn-multi-pl.pdf example.pdf group_example.pdf group_example_*.tex ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf -ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip LATEX_OPTIONS = -interaction=batchmode LATEX = pdflatex ${LATEX_OPTIONS} +TEXMFDIR = ${HOME}/texmf + RED = \033[01;31m GREEN = \033[01;32m WHITE = \033[00m -.PHONY: all doc package clean fullclean example testclean ${TESTS} +CP = cp -v +MV = mv -v +RMDIR = rm -rf +MKDIR = mkdir -p + +.PHONY: all doc package clean fullclean example testclean ${TESTS} tds ${CHECK_LOG} + +############################################################################### all: package doc example new: fullclean all -doc: ${PACKAGE}.pdf svn-multi-pl.pdf +doc: ${PACKAGE_DOC} -package: ${PACKAGE}.sty ${PACKAGE}.pl +package: ${PACKAGE_STY} ${PACKAGE_SCR} %.pdf: %.dtx ${LATEX} $*.dtx - ${LATEX} $*.dtx -makeindex -s gind.ist -o $*.ind $*.idx -makeindex -s gglo.ist -o $*.gls $*.glo ${LATEX} $*.dtx ${LATEX} $*.dtx -%.pdf: %.eps - epstopdf $< - -%.eps: %.dia - dia -t eps -e $@ $< - ${PACKAGE}.pdf: ${PACKAGE}.sty -${INSGENERATED}: *.dtx ${PACKAGE}.ins +${INSGENERATED}: ${PACKAGE_DTX} ${PACKAGE}.ins yes | latex ${PACKAGE}.ins @-chmod +x *.pl clean: rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) -fullclean: - rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) ${GENERATED} *~ *.backup +fullclean: clean + rm -f ${GENERATED} *~ *.backup + rm -f ${PACKAGE}*.zip + rm -rf tds/ + +############################################################################### example: example.pdf gexample @@ -66,30 +79,30 @@ gexample: group_example.pdf group_example.pdf: group_example.tex svn-multi.sty ${RM} $(addprefix group_example, ${TEXAUX}) group_example_*.tex ${LATEX} $< - ${LATEX} $< perl svn-multi.pl group_example ${LATEX} $< ${LATEX} $< ${LATEX} $< -zip: fullclean package doc example tests ${ZIPFILE} -${PACKAGE}.zip: zip +############################################################################### + +zip: ${PACKFILES} + @${MAKE} --no-print-directory ${ZIPFILE} -zip: ZIPVERSION=$(shell grep 'Package: svn-multi ' svn-multi.log | \ - sed -e 's/.*Package: svn-multi ....\/..\/..\s\+\(v\S\+\).*/\1/') +zip: ZIPVERSION=$(shell grep "Package: ${PACKAGE} " ${PACKAGE}.log | \ + sed -e "s/.*Package: ${PACKAGE} ....\/..\/..\s\+\(v\S\+\).*/\1/") -${ZIPFILE}: ${PACKFILES} - grep -q '\* Checksum passed \*' svn-multi.log - grep -q '\* Checksum passed \*' svn-multi-pl.log +${PACKAGE}%.zip: ${PACKFILES} + grep -L '\* Checksum passed \*' ${PACKAGE_DTX:.dtx=.log} | wc -l | grep -q '^0$$' -pdfopt ${PACKAGE}.pdf opt_${PACKAGE}.pdf && mv opt_${PACKAGE}.pdf ${PACKAGE}.pdf - zip ${ZIPFILE} ${PACKFILES} + ${RM} $@ + zip $@ ${PACKFILES} @echo - @echo "ZIP file ${ZIPFILE} created!" + @echo "ZIP file $@ created!" -tar.gz: ${PACKAGE}.tar.gz +release: fullclean package doc example tests ${ZIPFILE} -${PACKAGE}.tar.gz: - tar -czf $@ ${PACKFILES} +############################################################################### # Make sure TeX finds the input files in TESTDIR tests ${TESTS}: export TEXINPUTS:=${TEXINPUTS}:${TESTDIR} @@ -112,4 +125,37 @@ ${TESTS}: % : ${TESTDIR}/%.tex package testclean then /bin/echo -e "${GREEN}$@ succeeded${WHITE}" >&2; \ else /bin/echo -e "${RED}$@ failed!!!!!!${WHITE}" >&2; fi +############################################################################### + +tds: .tds + +.tds: ${PACKAGE_STY} ${PACKAGE_DOC} ${PACKAGE_SRC} + @grep -q '\* Checksum passed \*' ${PACKAGE}.log + ${RMDIR} tds + ${MKDIR} tds/ + ${MKDIR} tds/tex/ tds/tex/latex/ tds/tex/latex/${PACKAGE}/ + ${MKDIR} tds/doc/ tds/doc/latex/ tds/doc/latex/${PACKAGE}/ + ${MKDIR} tds/source/ tds/source/latex/ tds/source/latex/${PACKAGE}/ + test -n "${PACKAGE_SCR}" && ${MKDIR} tds/scripts/ tds/scripts/${PACKAGE}/ + ${CP} ${PACKAGE_STY} tds/tex/latex/${PACKAGE}/ + ${CP} ${PACKAGE_DOC} tds/doc/latex/${PACKAGE}/ + ${CP} ${PACKAGE_SRC} tds/source/latex/${PACKAGE}/ + test -n "${PACKAGE_SCR}" && ${CP} ${PACKAGE_SCR} tds/scripts/${PACKAGE}/ + @touch $@ + +tdszip: ${TDSZIPFILE} + +${TDSZIPFILE}: .tds + ${RM} ${TDSZIPFILE} + cd tds && zip -r ../${TDSZIPFILE} . + +############################################################################### + +install: .tds + test -d "${TEXMFDIR}" && ${CP} -a tds/* "${TEXMFDIR}/" && texhash ${TEXMFDIR} + +uninstall: + test -d "${TEXMFDIR}" && ${RM} -rv "${TEXMFDIR}/tex/latex/${PACKAGE}" \ + "${TEXMFDIR}/doc/latex/${PACKAGE}" "${TEXMFDIR}/source/latex/${PACKAGE}" \ + "${TEXMFDIR}/scripts/${PACKAGE}" && texhash ${TEXMFDIR} diff --git a/Master/texmf-dist/doc/latex/svn-multi/example_chap1.tex b/Master/texmf-dist/source/latex/svn-multi/example_chap1.tex index 24ac0bc313b..24ac0bc313b 100644 --- a/Master/texmf-dist/doc/latex/svn-multi/example_chap1.tex +++ b/Master/texmf-dist/source/latex/svn-multi/example_chap1.tex diff --git a/Master/texmf-dist/doc/latex/svn-multi/example_main.tex b/Master/texmf-dist/source/latex/svn-multi/example_main.tex index ef4ebce0f33..ef4ebce0f33 100644 --- a/Master/texmf-dist/doc/latex/svn-multi/example_main.tex +++ b/Master/texmf-dist/source/latex/svn-multi/example_main.tex diff --git a/Master/texmf-dist/doc/latex/svn-multi/group_example.tex b/Master/texmf-dist/source/latex/svn-multi/group_example.tex index 692687d4f97..692687d4f97 100644 --- a/Master/texmf-dist/doc/latex/svn-multi/group_example.tex +++ b/Master/texmf-dist/source/latex/svn-multi/group_example.tex diff --git a/Master/texmf-dist/source/latex/svn-multi/svn-multi.dtx b/Master/texmf-dist/source/latex/svn-multi/svn-multi.dtx index bfbd61432aa..192804000a8 100644 --- a/Master/texmf-dist/source/latex/svn-multi/svn-multi.dtx +++ b/Master/texmf-dist/source/latex/svn-multi/svn-multi.dtx @@ -24,27 +24,30 @@ % \fi % \iffalse %<*package|driver> -% $Id: svn-multi.dtx 845 2009-04-21 12:03:08Z martin $ +% $Id: svn-multi.dtx 1448 2009-10-19 21:28:41Z martin $ % -\def\svnmulti@version {v2.1a} -\def\svnmulti@rev $#1: #2 ${\def\svnmulti@rev{#2}} -\def\svnmulti@date $#1: #2-#3-#4 #5 ${\def\svnmulti@date{#2/#3/#4}} -\svnmulti@rev $Rev: 845 $\relax -\svnmulti@date $Date: 2009-04-21 13:03:08 +0100 (Tue, 21 Apr 2009) $\relax - +\def\svnmulti@version{v2.2} +\RequirePackage{svn-prov} %</package|driver> %<*driver> -\ProvidesFile{svn-multi.dtx} - [\svnmulti@date\space\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] - -\def\svnmulti@date $#1: #2-#3-#4 #5 $ {% - \def\svnmulti@today{{\year#2\month#3\day#4\today}}% - \def\svnmulti@date{#2/#3/#4}% -} -\svnmulti@date $Date: 2009-04-21 13:03:08 +0100 (Tue, 21 Apr 2009) $ +\ProvidesFileSVN{$Id: svn-multi.dtx 1448 2009-10-19 21:28:41Z martin $} + [\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] +\GetFileInfoSVN* +\let\svnmulti@date\filedate +\let\svnmulti@rev\filerev \documentclass{ltxdoc} +\def\svnmulti@today#1/#2/#3\relax{% + \begingroup + \year#1\relax + \month#2\relax + \day#3\relax + \xdef\svnmulti@today{\today} + \endgroup +} +\expandafter\svnmulti@today\svnmulti@date\relax + \usepackage{svn-multi}[\svnmulti@date] \usepackage{booktabs} \usepackage{ifpdf} @@ -277,6 +280,7 @@ %\OnlyDescription \widowpenalty=500 \clubpenalty=500 +\listfiles \begin{document} \DocInput{svn-multi.dtx}% \PrintChanges @@ -287,7 +291,7 @@ %<*package> % \fi % -% \CheckSum{2652} +% \CheckSum{2728} % % {\makeatother % \CharacterTable @@ -330,8 +334,8 @@ % support, auto-include of images, files as subgroups and table of revisions.} % \changes{v2.1}{2009/03/27}{Added automatic extraction of keywords from % Subversion 'entries' file: 'autokw' option} -% \changes{v2.1a}{2009/04/21}{Bugfix for macros which external if switches which -% might not be defined by all classes} +% \changes{v2.2}{2009/10/19}{Added \css{ifsvnmodified} and +% \css{ifsvnfilemodified} macros. Some bug fixes.} % % ^^A \GetFileInfo{svn-multi.dtx} % @@ -856,6 +860,22 @@ % macros. You can \eg say |\svnkwdef{Rev}{123}| and then typeset it with % |\svnkw{Revision}| or |\svnkw{LastChangedRev}| if you like. % +% \subsubsection*{New in version 2.2. Will change in future versions:} +% \DescribeMacro{ifsvnfilemodified}{\marg{case:~modified}\marg{case:~not +% modified}} +% \DescribeMacro*{ifsvnmodified}{\marg{case:~modified}\marg{case:~not modified}} +% This two macro can be used to check if either the current or any file was +% modified after it was last checked into the repository. At the moment (v2.2) a +% file is marked `modified' if there is either a `|*|' or `|M|' after the +% revision number, \eg `|$||Rev: 123M $|'. Such an marker is automatically added +% for exported files (`|svn export|') if there where locally modified, but can +% also be added manually. +% +% Future versions of this package might mark files as modified by use of the +% \op{autokw} option which can read this information out of the working +% directory Subversion entries. +% +% \newpage % \subsection{Accessing Date Values}\label{sec:date} % \begin{tabular}{@{}l@{\hspace{-2\macrosep}}l@{\hspace{-2\macrosep}}l@{}}\\ % \DescribeMacro*{svnyear}{}& @@ -1001,7 +1021,6 @@ % Please note that you can't use \pkg{hyperref}'s |\nolinkurl| because it won't % expand \cs{svnkw}. % -% % \subsection{Table of Revisions}\label{sec:table} % Version 2.0 introduces this new feature which allows a overview table to be % typeset which holds the version control information of all files of the @@ -1385,8 +1404,9 @@ % \subsubsection*{Package Identification} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{svn-multi} - [\svnmulti@date\space\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] +\ProvidesPackageSVN + {$Id: svn-multi.dtx 1448 2009-10-19 21:28:41Z martin $} + [\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] % \end{macrocode} % \subsubsection*{Options} @@ -1587,22 +1607,22 @@ % \begin{macro}{\svn@ifvalidrev}[1]{macro name} % Checks if the given macro (by name) is a valid revision, \ie defined and -% greater than zero. +% not equal to the init value. % \begin{macrocode} \def\svn@ifvalidrev#1{% \begingroup \@ifundefined{#1}% - {\def\svn@temp{-1}}% + {\let\svn@temp\svn@revinit}% {\expandafter\edef \expandafter\svn@temp\expandafter{\csname #1\endcsname}}% - \ifnum\svn@temp>-1\relax + \ifnum\svn@temp=\svn@revinit\relax \endgroup \expandafter - \@firstoftwo + \@secondoftwo \else \endgroup \expandafter - \@secondoftwo + \@firstoftwo \fi } % \end{macrocode} @@ -1666,7 +1686,7 @@ % \subsection{Definition of init values} % Initialisation of at least the revision to a numeric value is necessary to not % break the |\ifnum| tests later in this package. The revision is initialised to -% -1, but will be set to 0 if an unexpanded |$||Rev:$| keyword is read. This way +% -2, but will be set to 0 if an unexpanded |$||Rev:$| keyword is read. This way % it can be tested if a file had any keyword macros or not.\par % Note that there a two different macros for the document global keywords:\par % The user level |\svn|\meta{kw} macros hold the global value and are only valid @@ -1684,7 +1704,10 @@ % |\svn@g|\meta{current group}|@|\meta{kw}. % \begin{macrocode} % Init values -\def\svnrev{-1} \def\@svn@rev{-1} +\def\svn@revinit{-2} +\let\svnrev\svn@revinit \let\@svn@rev\svn@revinit +\let\ifsvnmodified\@secondoftwo +\def\@svn@modified{@secondoftwo}% \def\svndate{} \def\@svn@date{} \def\svnauthor{} \def\@svn@author{} \def\svnyear{0000} \def\@svn@year{0000} @@ -1703,7 +1726,8 @@ \let\@svng@@files\relax \def\svn@initfile{% - \gdef\svnfilerev{-1}% + \global\let\svnfilerev\svn@revinit + \global\let\ifsvnfilemodified\@secondoftwo \gdef\svnfiledate{}% \gdef\svnfileauthor{}% \gdef\svnfileyear{0000}% @@ -1719,6 +1743,8 @@ \gdef\svnfiledir{}% } \svn@initfile + +\newif\ifsvn@modified % \end{macrocode} % \subsection{Auto-Keywords} @@ -2115,6 +2141,11 @@ % \begin{macrocode} \def\@svn@updateid#1#2#3#4{% \xdef\svnfilerev{#1}% + \ifsvn@modified + \global\let\ifsvnfilemodified\@firstoftwo + \else + \global\let\ifsvnfilemodified\@secondoftwo + \fi \xdef\svnfiledate{#2}% \xdef\svnfileauthor{#3}% \xdef\svnfileurl{#4}% @@ -2127,6 +2158,7 @@ \ifx\svnfilerev\empty\else \ifnum\@svn@rev<\svnfilerev \xdef\@svn@rev{\svnfilerev}% + \xdef\@svn@modified{\ifsvnfilemodified{@firstoftwo}{@secondoftwo}}% \xdef\@svn@date{\svnfiledate}% \xdef\@svn@author{\svnfileauthor}% \xdef\@svn@year{\svnfileyear}% @@ -2167,10 +2199,10 @@ % We clear the keyword value first to reduce the risk though bad user input. % \begin{macrocode} \newcommand{\svnidlong}{% - \svnkwdef{HeadURL}{}% - \svnkwdef{LastChangedDate}{}% - \svnkwdef{LastChangedRevision}{0}% - \svnkwdef{LastChangedBy}{}% + \svnkwdef{URL}{}% + \svnkwdef{Date}{}% + \svnkwdef{Revision}{0}% + \svnkwdef{Author}{}% % \end{macrocode} % The catcodes are changed by \cs{svn@catcodes} to allow \TeX-special characters % inside the keywords. The braces |{ }| are changed to allow comments between @@ -2248,11 +2280,11 @@ % \end{macrocode} % Now the update macros for date and id are called. % \begin{macrocode} - \ifx\svnkwLastChangedDate\empty\else - \@svn@scanlongdate{\svnkwLastChangedDate}% + \ifx\svnkwDate\empty\else + \@svn@scanlongdate{\svnkwDate}% \fi - \@svn@updateid{\svnkw{LastChangedRevision}}{\svnkw{LastChangedDate}}% - {\svnkw{LastChangedBy}}{\svnkw{HeadURL}}% + \@svn@updateid{\svnkw{Revision}}{\svnkw{Date}}% + {\svnkw{Author}}{\svnkw{URL}}% \ignorespaces }% % \end{macrocode} @@ -2356,12 +2388,29 @@ % % The keywords |Author| and |Date| are just calling \cs{svnkwdef@} with a fixed % first argument. For the revision the value is checked if empty and then a 0 -% is substituted. +% is substituted. Also a temp counter is used to strip any trailing characters +% like `M' which indicate an exported and modified file. % \begin{macrocode} \def\svnkwdef@Rev#1{% \svn@ifempty{#1}% {\svnkwdef@{Rev}{0}}% - {\svnkwdef@{Rev}{#1}}% + {% + \afterassignment\svnkwdef@Rev@ + \@tempcnta=#1\relax + }% +} +\def\svnkwdef@Rev@#1\relax{% + \svnkwdef@{Rev}{\the\@tempcnta}% + \def\svn@temp{#1}% + \if M\svn@temp\relax + \global\svn@modifiedtrue + \else + \if *\svn@temp\relax + \global\svn@modifiedtrue + \else + \global\svn@modifiedfalse + \fi + \fi } \def\svnkwdef@Author#1{\svnkwdef@{Author}{#1}} \def\svnkwdef@Date#1{\svnkwdef@{Date}{#1}} @@ -2373,14 +2422,14 @@ \let\svnkwdef@Revision=\svnkwdef@Rev \let\svnkwdef@LastChangedRevision=\svnkwdef@Rev \let\svnkwdef@LastChangedBy=\svnkwdef@Author -\let\svnkwdef@LastChangedAt=\svnkwdef@Date +\let\svnkwdef@LastChangedDate=\svnkwdef@Date % \end{macrocode} % and then for reading. % \begin{macrocode} \def\svnkwRevision{\svnkwRev} \def\svnkwLastChangedRevision{\svnkwRev} \def\svnkwLastChangedBy{\svnkwAuthor} -\def\svnkwLastChangedAt{\svnkwDate} +\def\svnkwLastChangedDate{\svnkwDate} \def\svnkwURL{\svnkwHeadURL} % \end{macrocode} % So \eg |\svnkw{LastChangedRevision}| is always be the @@ -2860,6 +2909,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% {\svnfilefname}% {\svn@g}% {\svn@pg}% + {\ifsvnfilemodified{@firstoftwo}{@secondoftwo}}% }\svn@filestack}% } @@ -2867,7 +2917,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% \svn@restorefilekws@#1\empty \empty \empty \empty \empty \empty \empty \empty \empty - \empty \empty \empty \empty + \empty \empty \empty \empty \empty \svn@ifempty{#2}% {\gdef\svn@filestack{{}}}% {\gdef\svn@filestack{#2}}% @@ -2885,13 +2935,15 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% \svn@restorefilekws@@ } -\def\svn@restorefilekws@@#1#2#3#4#5#6{% +\def\svn@restorefilekws@@#1#2#3#4#5#6#7{% \gdef\svnfiletimezonehour{#1}% \gdef\svnfiletimezoneminute{#2}% \gdef\svnfileurl{#3}% \gdef\svnfilefname{#4}% \gdef\svn@g{#5}% \gdef\svn@pg{#6}% + \expandafter\global\expandafter\let + \expandafter\ifsvnfilemodified\csname#7\endcsname% } \def\svn@popfilestack{% @@ -3200,7 +3252,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% % Initialises group. % \begin{macrocode} \def\svn@initgroup#1{% - \svn@gkwset{#1}{rev}{-1}% + \svn@gkwset{#1}{rev}{\svn@revinit}% \svn@gkwset{#1}{date}{}% \svn@gkwset{#1}{author}{}% \svn@gkwset{#1}{year}{0000}% @@ -3306,7 +3358,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% % file keyword information is written. % \begin{macrocode} \def\svn@subgroup#1{% - \ifnum\svnfilerev>-1\relax + \ifnum\svnfilerev=\svn@revinit\else \expandafter\ifx\csname svn@g@#1\endcsname\relax% \expandafter\gdef\csname svn@g@#1\endcsname{1}% \svn@updategroup{#1}% @@ -4115,6 +4167,7 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% \immediate\write\svn@write{^^J% \@percentchar\space Global values:^^J% \noexpand\def\noexpand\svnrev{\@svn@rev}^^J% + \noexpand\let\noexpand\ifsvnmodified\@backslashchar\@svn@modified^^J% \noexpand\def\noexpand\svndate{\@svn@date}^^J% \noexpand\def\noexpand\svnauthor{\@svn@author}^^J% \noexpand\def\noexpand\svnyear{\@svn@year}^^J% @@ -4305,7 +4358,7 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{svnkw} - [2009/03/27 v2.1 Backward compatibility wrapper for svn-multi] + [2009/03/27 v2.1 Backward compatibility wrapper for svn-multi] \PackageWarning{svnkw}{The package 'svnkw' got renamed to 'svn-multi' and is now only a backward compatibility wrapper which loads 'svn-multi'. Please adjust your document preamble to use the new name.} diff --git a/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty b/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty index ea4351cd212..33e43faeece 100644 --- a/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty +++ b/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty @@ -26,15 +26,12 @@ %% and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl. %% \makeatletter -\def\svnmulti@version {v2.1a} -\def\svnmulti@rev $#1: #2 ${\def\svnmulti@rev{#2}} -\def\svnmulti@date $#1: #2-#3-#4 #5 ${\def\svnmulti@date{#2/#3/#4}} -\svnmulti@rev $Rev: 845 $\relax -\svnmulti@date $Date: 2009-04-21 13:03:08 +0100 (Tue, 21 Apr 2009) $\relax - +\def\svnmulti@version{v2.2} +\RequirePackage{svn-prov} \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{svn-multi} - [\svnmulti@date\space\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] +\ProvidesPackageSVN + {$Id: svn-multi.dtx 1448 2009-10-19 21:28:41Z martin $} + [\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] \RequirePackage{kvoptions} @@ -201,17 +198,17 @@ \def\svn@ifvalidrev#1{% \begingroup \@ifundefined{#1}% - {\def\svn@temp{-1}}% + {\let\svn@temp\svn@revinit}% {\expandafter\edef \expandafter\svn@temp\expandafter{\csname #1\endcsname}}% - \ifnum\svn@temp>-1\relax + \ifnum\svn@temp=\svn@revinit\relax \endgroup \expandafter - \@firstoftwo + \@secondoftwo \else \endgroup \expandafter - \@secondoftwo + \@firstoftwo \fi } @@ -246,7 +243,10 @@ \svn@popfilestack } -\def\svnrev{-1} \def\@svn@rev{-1} +\def\svn@revinit{-2} +\let\svnrev\svn@revinit \let\@svn@rev\svn@revinit +\let\ifsvnmodified\@secondoftwo +\def\@svn@modified{@secondoftwo}% \def\svndate{} \def\@svn@date{} \def\svnauthor{} \def\@svn@author{} \def\svnyear{0000} \def\@svn@year{0000} @@ -265,7 +265,8 @@ \let\@svng@@files\relax \def\svn@initfile{% - \gdef\svnfilerev{-1}% + \global\let\svnfilerev\svn@revinit + \global\let\ifsvnfilemodified\@secondoftwo \gdef\svnfiledate{}% \gdef\svnfileauthor{}% \gdef\svnfileyear{0000}% @@ -282,6 +283,8 @@ } \svn@initfile +\newif\ifsvn@modified + \begingroup \@makeother\^^L @@ -512,6 +515,11 @@ \def\@svn@updateid#1#2#3#4{% \xdef\svnfilerev{#1}% + \ifsvn@modified + \global\let\ifsvnfilemodified\@firstoftwo + \else + \global\let\ifsvnfilemodified\@secondoftwo + \fi \xdef\svnfiledate{#2}% \xdef\svnfileauthor{#3}% \xdef\svnfileurl{#4}% @@ -519,6 +527,7 @@ \ifx\svnfilerev\empty\else \ifnum\@svn@rev<\svnfilerev \xdef\@svn@rev{\svnfilerev}% + \xdef\@svn@modified{\ifsvnfilemodified{@firstoftwo}{@secondoftwo}}% \xdef\@svn@date{\svnfiledate}% \xdef\@svn@author{\svnfileauthor}% \xdef\@svn@year{\svnfileyear}% @@ -552,10 +561,10 @@ \newcommand{\svnidlong}{% - \svnkwdef{HeadURL}{}% - \svnkwdef{LastChangedDate}{}% - \svnkwdef{LastChangedRevision}{0}% - \svnkwdef{LastChangedBy}{}% + \svnkwdef{URL}{}% + \svnkwdef{Date}{}% + \svnkwdef{Revision}{0}% + \svnkwdef{Author}{}% \begingroup \if@svnmulti@verbatim \svn@catcodes @@ -596,11 +605,11 @@ \svnkwsave@read #3\relax \svnkwsave@read #4\relax \endgroup - \ifx\svnkwLastChangedDate\empty\else - \@svn@scanlongdate{\svnkwLastChangedDate}% + \ifx\svnkwDate\empty\else + \@svn@scanlongdate{\svnkwDate}% \fi - \@svn@updateid{\svnkw{LastChangedRevision}}{\svnkw{LastChangedDate}}% - {\svnkw{LastChangedBy}}{\svnkw{HeadURL}}% + \@svn@updateid{\svnkw{Revision}}{\svnkw{Date}}% + {\svnkw{Author}}{\svnkw{URL}}% \ignorespaces }% @@ -652,7 +661,23 @@ \def\svnkwdef@Rev#1{% \svn@ifempty{#1}% {\svnkwdef@{Rev}{0}}% - {\svnkwdef@{Rev}{#1}}% + {% + \afterassignment\svnkwdef@Rev@ + \@tempcnta=#1\relax + }% +} +\def\svnkwdef@Rev@#1\relax{% + \svnkwdef@{Rev}{\the\@tempcnta}% + \def\svn@temp{#1}% + \if M\svn@temp\relax + \global\svn@modifiedtrue + \else + \if *\svn@temp\relax + \global\svn@modifiedtrue + \else + \global\svn@modifiedfalse + \fi + \fi } \def\svnkwdef@Author#1{\svnkwdef@{Author}{#1}} \def\svnkwdef@Date#1{\svnkwdef@{Date}{#1}} @@ -660,11 +685,11 @@ \let\svnkwdef@Revision=\svnkwdef@Rev \let\svnkwdef@LastChangedRevision=\svnkwdef@Rev \let\svnkwdef@LastChangedBy=\svnkwdef@Author -\let\svnkwdef@LastChangedAt=\svnkwdef@Date +\let\svnkwdef@LastChangedDate=\svnkwdef@Date \def\svnkwRevision{\svnkwRev} \def\svnkwLastChangedRevision{\svnkwRev} \def\svnkwLastChangedBy{\svnkwAuthor} -\def\svnkwLastChangedAt{\svnkwDate} +\def\svnkwLastChangedDate{\svnkwDate} \def\svnkwURL{\svnkwHeadURL} \svnkwdef{Rev}{0} @@ -920,6 +945,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% {\svnfilefname}% {\svn@g}% {\svn@pg}% + {\ifsvnfilemodified{@firstoftwo}{@secondoftwo}}% }\svn@filestack}% } @@ -927,7 +953,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% \svn@restorefilekws@#1\empty \empty \empty \empty \empty \empty \empty \empty \empty - \empty \empty \empty \empty + \empty \empty \empty \empty \empty \svn@ifempty{#2}% {\gdef\svn@filestack{{}}}% {\gdef\svn@filestack{#2}}% @@ -945,13 +971,15 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% \svn@restorefilekws@@ } -\def\svn@restorefilekws@@#1#2#3#4#5#6{% +\def\svn@restorefilekws@@#1#2#3#4#5#6#7{% \gdef\svnfiletimezonehour{#1}% \gdef\svnfiletimezoneminute{#2}% \gdef\svnfileurl{#3}% \gdef\svnfilefname{#4}% \gdef\svn@g{#5}% \gdef\svn@pg{#6}% + \expandafter\global\expandafter\let + \expandafter\ifsvnfilemodified\csname#7\endcsname% } \def\svn@popfilestack{% @@ -1136,7 +1164,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% } \def\svn@initgroup#1{% - \svn@gkwset{#1}{rev}{-1}% + \svn@gkwset{#1}{rev}{\svn@revinit}% \svn@gkwset{#1}{date}{}% \svn@gkwset{#1}{author}{}% \svn@gkwset{#1}{year}{0000}% @@ -1194,7 +1222,7 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% } \def\svn@subgroup#1{% - \ifnum\svnfilerev>-1\relax + \ifnum\svnfilerev=\svn@revinit\else \expandafter\ifx\csname svn@g@#1\endcsname\relax% \expandafter\gdef\csname svn@g@#1\endcsname{1}% \svn@updategroup{#1}% @@ -1634,6 +1662,7 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% \immediate\write\svn@write{^^J% \@percentchar\space Global values:^^J% \noexpand\def\noexpand\svnrev{\@svn@rev}^^J% + \noexpand\let\noexpand\ifsvnmodified\@backslashchar\@svn@modified^^J% \noexpand\def\noexpand\svndate{\@svn@date}^^J% \noexpand\def\noexpand\svnauthor{\@svn@author}^^J% \noexpand\def\noexpand\svnyear{\@svn@year}^^J% diff --git a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty b/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty deleted file mode 100644 index b3aa179102a..00000000000 --- a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty +++ /dev/null @@ -1,38 +0,0 @@ -%% -%% This is file `svnkw.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% svn-multi.dtx (with options: `wrapper') -%% -%% This is a generated file. -%% -%% Copyright (C) 2006-2009 by Martin Scharrer <martin@scharrer-online.de> -%% -%% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This work has the LPPL maintenance status `maintained'. -%% -%% The Current Maintainer of this work is Martin Scharrer. -%% -%% This work consists of the files svn-multi.dtx, svn-multi-pl.dtx, svn-multi.ins -%% and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl. -%% -\makeatletter -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{svnkw} - [2009/03/27 v2.1 Backward compatibility wrapper for svn-multi] -\PackageWarning{svnkw}{The package 'svnkw' got renamed to 'svn-multi' and is now -only a backward compatibility wrapper which loads 'svn-multi'. Please adjust -your document preamble to use the new name.} -\RequirePackage{svn-multi} -\endinput -%% -%% End of file `svnkw.sty'. |