Skip to content

Commit

Permalink
Throw an error when a date 0000/00/00 is misused in \IncludeInRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
PhelypeOleinik committed Aug 10, 2021
1 parent 299bc13 commit 11c512f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions base/changes.txt
Expand Up @@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================

2021-08-10 Phelype Oleinik <phelype.oleinik@latex-project.org>

* ltvers.dtx (section{Version Identification}):
Throw an error when a date 0000/00/00 is misused in \IncludeInRelease.

2021-08-09 Phelype Oleinik <phelype.oleinik@latex-project.org>

* ltcmd.dtx (subsubsection{Copying a command and its internal structure}):
Expand Down
12 changes: 11 additions & 1 deletion base/ltvers.dtx
Expand Up @@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
[2021/04/16 v1.1g LaTeX Kernel (Version Info)]
[2021/08/10 v1.1h LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
Expand Down Expand Up @@ -230,6 +230,7 @@
% \changes{v1.0o}{2015/01/19}{Optional argument}
% \changes{v1.0q}{2015/02/19}{Swap argument order}
% \changes{v1.1f}{2021/03/18}{Add support for usage in \cs{NewModuleRelease}}
% \changes{v1.1h}{2021/08/10}{Add error to aid debugging}
%
% \begin{macrocode}
%<*2ekernel|latexrelease>
Expand Down Expand Up @@ -257,6 +258,15 @@
{\@IncludeInRelease{#1}[#1]}}}
\def\finish@module@release#1#2#3{%
\toks@{[#1] #3}%
\begingroup
\edef\x{\detokenize\expandafter{\new@modulename}}%
\edef\y{\detokenize{#2}}%
\expandafter\endgroup
\ifx\x\y \else
\@latex@error{\noexpand\IncludeInRelease dated #1 in a module is not
allowed.\MessageBreak Use a date at least equal to \new@moduledate
\space for complete rollback}\@ehd
\fi
\ifnum\expandafter\@parse@version\new@moduledate//00\@nil
>\expandafter\@parse@version\fmtversion//00\@nil
\GenericInfo{}{Applying: \the\toks@}%
Expand Down

0 comments on commit 11c512f

Please sign in to comment.