[latex3-commits] [git/LaTeX3-latex3-latex2e] versioning: New version and more tests; some more documentation needed (bb3041a)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Feb 28 00:50:22 CET 2018


Repository : https://github.com/latex3/latex2e
On branch  : versioning
Link       : https://github.com/latex3/latex2e/commit/bb3041ab7c12f8a1e14dfc16338acedfa52cca83

>---------------------------------------------------------------

commit bb3041ab7c12f8a1e14dfc16338acedfa52cca83
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Feb 28 00:50:22 2018 +0100

    New version and more tests; some more documentation needed


>---------------------------------------------------------------

bb3041ab7c12f8a1e14dfc16338acedfa52cca83
 base/ltclass.dtx                           |   51 ++++++++-
 base/testfiles/tlb-rollback-001.luatex.tlg |   60 ++++++++--
 base/testfiles/tlb-rollback-001.lvt        |    9 +-
 base/testfiles/tlb-rollback-001.tlg        |   60 ++++++++--
 base/testfiles/tlb-rollback-002.luatex.tlg |    1 -
 base/testfiles/tlb-rollback-002.lvt        |    1 +
 base/testfiles/tlb-rollback-002.tlg        |    1 -
 base/testfiles/tlb-rollback-003.luatex.tlg |  170 ++++++++++++++++++++++------
 base/testfiles/tlb-rollback-003.lvt        |   15 ++-
 base/testfiles/tlb-rollback-003.tlg        |  170 ++++++++++++++++++++++------
 10 files changed, 441 insertions(+), 97 deletions(-)

diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index b17e26e..660bc7e 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -2080,7 +2080,10 @@
 %    \begin{macrocode}
       \ifnum \pkgcls at targetdate=\z@
         \pkgcls at targetdate\@ne
+        \def\pkgcls at innerdate{\maxdimen}%
         \pkgcls at parse@date at arg@version#2%
+      \else
+        \edef\pkgcls at innerdate{\the\pkgcls at targetdate}%
       \fi
       \let\pkgcls at mindate\@empty
     \else
@@ -2093,6 +2096,7 @@
 %    \begin{macrocode}
       \requestedLaTeXdate\relax
       \let\pkgcls at targetlabel\@empty
+      \def\pkgcls at innerdate{\maxdimen}%
       \def\pkgcls at mindate{#1}%
 %    \end{macrocode}
 %    If the min-date is after the requested rollback date (if there is
@@ -2136,7 +2140,7 @@
 %    but this is not enforced and through this argument one can
 %    overwrite it.
 %    \begin{macrocode}
-\providecommand\DeclareOldRelease[3]{%
+\def\DeclareOldRelease#1#2#3{%
   \ifnum\pkgcls at targetdate>\z@  % some sort of rollback request
 %<*tracerollback>
     \pkgcls at debug{---\string\DeclareOldRelease:}%
@@ -2145,6 +2149,24 @@
     \pkgcls at debug{\@spaces 3: #3}%
 %</tracerollback>
 %    \end{macrocode}
+    \ifx\@nil#2\@nil
+      \ifnum\pkgcls at targetdate=\@ne  % named request
+        \def\reserved at a{#1}%
+        \ifx\pkgcls at targetlabel\reserved at a
+          \pkgcls at use@this at release{#3}{}%
+%<*tracerollback>
+        \else
+          \pkgcls at debug{Label doesn't match}%
+%</tracerollback>
+        \fi
+%<*tracerollback>
+      \else
+        \pkgcls at debug{Date request: ignored}%
+%</tracerollback>
+      \fi
+    \else
+%    \begin{macrocode}
+%    \end{macrocode}
 %    If the value of |\pkgcls at targetdate| is greater than 1 (or in
 %    reality greater than something like 19930101) we are dealing with a
 %    rollback request to a specific date.
@@ -2201,6 +2223,7 @@
 %</tracerollback>
       \fi
     \fi
+    \fi
   \fi
 }
 %    \end{macrocode}
@@ -2309,7 +2332,7 @@
 %    A special release: one that can be only
 %    selected via a name, typical use case is a ``beta'' release.
 %    \begin{macrocode}
-\providecommand\DeclareSpecialRelease[2]{%
+\def\DeclareSpecialRelease#1#2{%
   \ifnum\pkgcls at targetdate=\@ne  % named request
 %<*tracerollback>
     \pkgcls at debug{---DeclareSpecialRelease}%
@@ -2324,6 +2347,10 @@
       \pkgcls at debug{Label doesn't match}%
 %</tracerollback>
     \fi
+%<*tracerollback>
+  \else
+    \pkgcls at debug{Date request: ignored}%
+%</tracerollback>
   \fi
 }
 %    \end{macrocode}
@@ -2333,7 +2360,7 @@
 %    This declares the date (and possible name) of the current version
 %    of a package or class.
 %    \begin{macrocode}
-\providecommand\DeclareCurrentRelease[2]{%
+\def\DeclareCurrentRelease#1#2{%
 %    \end{macrocode}
 %    First we test if |\pkgcls at targetdate| is greater than zero,
 %    otherwise this code is bypassed (as there is no rollback request).
@@ -2396,6 +2423,24 @@
 %    \end{macrocode}
 %  \end{macro}
 %
+%
+
+%  \begin{macro}{\IfTargetDateBefore}
+%    
+%    \begin{macrocode}
+\long\def\IfTargetDateBefore#1{%
+  \ifnum\pkgcls at innerdate <%
+        \expandafter\@parse at version\expandafter0#1//00\@nil
+    \typeout{Exclude code introduced on #1}%
+    \expandafter\@firstoftwo
+  \else
+    \typeout{Include code introduced on #1}%
+    \expandafter\@secondoftwo
+  \fi
+}
+%    \end{macrocode}
+%  \end{macro}
+%
 %    \begin{macrocode}
 %</2ekernel|latexreleasefirst>
 %    \end{macrocode}
diff --git a/base/testfiles/tlb-rollback-001.luatex.tlg b/base/testfiles/tlb-rollback-001.luatex.tlg
index 9815b68..b1dd808 100644
--- a/base/testfiles/tlb-rollback-001.luatex.tlg
+++ b/base/testfiles/tlb-rollback-001.luatex.tlg
@@ -156,7 +156,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-01.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -183,7 +184,36 @@ Rollback for package 'testpkg' requested -> date 2018-10-02.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
+))
+--- File loaded request (\usepackage or ...)
+    1: testpkg
+    2: dvips
+    3: =2018-10-10
+    4: sty
+(testpkg.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-2014-01-01
+New candidate: testpkg-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018-10-01
+    3: testpkg-2018-10-01
+New candidate: testpkg-2018-10-01
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use testpkg-2018-10-01
+Rollback for package 'testpkg' requested -> date 2018-10-10.
+         Best approximation is the release introduced on 2018-10-01.
+(testpkg-2018-10-01.sty
+Package: testpkg 2018-10-01 v2.5 test package
+ -> option dvips executed
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -232,7 +262,8 @@ Rollback for package 'testpkg' requested -> version 'v2'.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -257,7 +288,6 @@ Result: use current version
 Rollback for package 'testpkg' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg! 
 )
 --- File loaded request (\usepackage or ...)
@@ -315,7 +345,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -341,7 +372,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -376,7 +408,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 LaTeX Warning: You have requested, on input line ..., version
                `2019-01-01' of package testpkg,
@@ -413,7 +446,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 LaTeX Warning: You have requested, on input line ..., version
                but only version
@@ -491,7 +525,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-01.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -518,7 +553,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-02.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -567,7 +603,8 @@ Rollback for package 'testpkg' requested -> version 'v2'.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -592,7 +629,6 @@ Result: use current version
 Rollback for package 'testpkg' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg! 
 )
 --- File loaded request (\usepackage or ...)
diff --git a/base/testfiles/tlb-rollback-001.lvt b/base/testfiles/tlb-rollback-001.lvt
index 3585528..98a2f79 100644
--- a/base/testfiles/tlb-rollback-001.lvt
+++ b/base/testfiles/tlb-rollback-001.lvt
@@ -36,7 +36,9 @@
 \ProvidesPackage{testpkg}[2018-10-01 v2.5 test package]
 \DeclareOption{dvips}{\typeout{ -> option dvips executed}}
 \ProcessOptions
-\typeout{This is testpkg 2018-10-01!}
+\IfTargetDateBefore{2018-10-05} % one patch after 5 days
+  {\typeout{This is testpkg 2018-10-01 patchlevel 0!}}
+  {\typeout{This is testpkg 2018-10-01 patchlevel 1!}}
 \end{filecontents}
 
 % ======================================================
@@ -59,6 +61,7 @@
 
 \def\ForgetAboutTestpkg{%
   \expandafter\let\csname ver at testpkg.sty\endcsname\relax
+  \expandafter\let\csname opt at testpkg.sty\endcsname\relax
 }
 
 %%% TESTS %%%%
@@ -95,6 +98,10 @@
 \ForgetAboutTestpkg
 \usepackage[dvips]{testpkg}[=2018-10-02]
 
+% and a few more days off
+\ForgetAboutTestpkg
+\usepackage[dvips]{testpkg}[=2018-10-10]
+
 % kind of current
 \ForgetAboutTestpkg
 \usepackage[dvips]{testpkg}[=2019-07-10]
diff --git a/base/testfiles/tlb-rollback-001.tlg b/base/testfiles/tlb-rollback-001.tlg
index 32bef76..4731894 100644
--- a/base/testfiles/tlb-rollback-001.tlg
+++ b/base/testfiles/tlb-rollback-001.tlg
@@ -156,7 +156,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-01.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -183,7 +184,36 @@ Rollback for package 'testpkg' requested -> date 2018-10-02.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
+))
+--- File loaded request (\usepackage or ...)
+    1: testpkg
+    2: dvips
+    3: =2018-10-10
+    4: sty
+(testpkg.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-2014-01-01
+New candidate: testpkg-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018-10-01
+    3: testpkg-2018-10-01
+New candidate: testpkg-2018-10-01
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use testpkg-2018-10-01
+Rollback for package 'testpkg' requested -> date 2018-10-10.
+         Best approximation is the release introduced on 2018-10-01.
+(testpkg-2018-10-01.sty
+Package: testpkg 2018-10-01 v2.5 test package
+ -> option dvips executed
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -232,7 +262,8 @@ Rollback for package 'testpkg' requested -> version 'v2'.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -257,7 +288,6 @@ Result: use current version
 Rollback for package 'testpkg' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg! 
 )
 --- File loaded request (\usepackage or ...)
@@ -315,7 +345,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -341,7 +372,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -376,7 +408,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 LaTeX Warning: You have requested, on input line ..., version
                `2019-01-01' of package testpkg,
@@ -413,7 +446,8 @@ Rollback for package 'testpkg' requested -> date 2018-12-24.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 LaTeX Warning: You have requested, on input line ..., version
                but only version
@@ -491,7 +525,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-01.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -518,7 +553,8 @@ Rollback for package 'testpkg' requested -> date 2018-10-02.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Exclude code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 0!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -567,7 +603,8 @@ Rollback for package 'testpkg' requested -> version 'v2'.
 (testpkg-2018-10-01.sty
 Package: testpkg 2018-10-01 v2.5 test package
  -> option dvips executed
-This is testpkg 2018-10-01!
+Include code introduced on 2018-10-05
+This is testpkg 2018-10-01 patchlevel 1!
 ))
 --- File loaded request (\usepackage or ...)
     1: testpkg
@@ -592,7 +629,6 @@ Result: use current version
 Rollback for package 'testpkg' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg! 
 )
 --- File loaded request (\usepackage or ...)
diff --git a/base/testfiles/tlb-rollback-002.luatex.tlg b/base/testfiles/tlb-rollback-002.luatex.tlg
index d4a1fcc..7d7b8d4 100644
--- a/base/testfiles/tlb-rollback-002.luatex.tlg
+++ b/base/testfiles/tlb-rollback-002.luatex.tlg
@@ -129,6 +129,5 @@ Result: use current version
 Rollback for package 'testpkg-rb002' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg-rb002 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg-rb002! 
 )
diff --git a/base/testfiles/tlb-rollback-002.lvt b/base/testfiles/tlb-rollback-002.lvt
index f613d04..ccdd605 100644
--- a/base/testfiles/tlb-rollback-002.lvt
+++ b/base/testfiles/tlb-rollback-002.lvt
@@ -57,6 +57,7 @@
 
 \def\ForgetAboutTestpkg{%
   \expandafter\let\csname ver at testpkg-rb002.sty\endcsname\relax
+  \expandafter\let\csname opt at testpkg-rb002.sty\endcsname\relax
 }
 
 \OMIT
diff --git a/base/testfiles/tlb-rollback-002.tlg b/base/testfiles/tlb-rollback-002.tlg
index 5efb20b..e17a1dc 100644
--- a/base/testfiles/tlb-rollback-002.tlg
+++ b/base/testfiles/tlb-rollback-002.tlg
@@ -129,6 +129,5 @@ Result: use current version
 Rollback for package 'testpkg-rb002' requested -> version 'v3'.
          This corresponds to the release introduced on 2019-07-01.
 Package: testpkg-rb002 2019-07-21 v3.5 test package
- -> option dvips executed
 This is the current testpkg-rb002! 
 )
diff --git a/base/testfiles/tlb-rollback-003.luatex.tlg b/base/testfiles/tlb-rollback-003.luatex.tlg
index ef28113..b89be3c 100644
--- a/base/testfiles/tlb-rollback-003.luatex.tlg
+++ b/base/testfiles/tlb-rollback-003.luatex.tlg
@@ -28,7 +28,8 @@ Don't change this file in any respect.
 (testpkg-rb003.sty
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -38,7 +39,8 @@ This is the current testpkg-rb003!
 (testpkg-rb003.sty
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -61,13 +63,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -81,7 +85,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -112,13 +117,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -133,7 +140,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -164,13 +172,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -185,7 +195,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -276,9 +287,10 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Result: use testpkg-rb003-beta
 Rollback for package 'testpkg-rb003' requested -> version 'beta'.
          This corresponds to a special release.
@@ -308,13 +320,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Result: use testpkg-rb003-beta
 Rollback for package 'testpkg-rb003' requested -> version 'beta4'.
          This corresponds to a special release.
@@ -344,6 +358,16 @@ New candidate: testpkg-rb003-2018-10-01
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
 ---DeclareCurrentRelease
  1: v3
  2: 2019-07-01
@@ -355,3 +379,85 @@ Package: testpkg-rb003 2018-10-02 v2.6 test package
  -> option dvips executed
 This is testpkg-rb003 2018-10-02!
 ))
+--- File loaded request (\usepackage or ...)
+    1: testpkg-rb003
+    2: 
+    3: =2019-07-05
+    4: sty
+(testpkg-rb003.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-rb003-2014-01-01
+New candidate: testpkg-rb003-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018/10-01
+    3: testpkg-rb003-2018-10-01
+New candidate: testpkg-rb003-2018-10-01
+---\DeclareOldRelease:
+    1: 
+    2: 2018/10-02
+    3: testpkg-rb003-2018-10-02
+New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use current version
+Rollback for package 'testpkg-rb003' requested -> date 2019-07-05.
+         Best approximation is the release introduced on 2019-07-01.
+Package: testpkg-rb003 2019-07-21 v3.5 test package
+Exclude code introduced on 2019-07-21
+This is the current testpkg-rb003! 
+)
+--- File loaded request (\usepackage or ...)
+    1: testpkg-rb003
+    2: 
+    3: =2019-07-21
+    4: sty
+(testpkg-rb003.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-rb003-2014-01-01
+New candidate: testpkg-rb003-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018/10-01
+    3: testpkg-rb003-2018-10-01
+New candidate: testpkg-rb003-2018-10-01
+---\DeclareOldRelease:
+    1: 
+    2: 2018/10-02
+    3: testpkg-rb003-2018-10-02
+New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use current version
+Rollback for package 'testpkg-rb003' requested -> date 2019-07-21.
+         Best approximation is the release introduced on 2019-07-01.
+Package: testpkg-rb003 2019-07-21 v3.5 test package
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
+)
diff --git a/base/testfiles/tlb-rollback-003.lvt b/base/testfiles/tlb-rollback-003.lvt
index 807a168..6205065 100644
--- a/base/testfiles/tlb-rollback-003.lvt
+++ b/base/testfiles/tlb-rollback-003.lvt
@@ -25,8 +25,8 @@
 \DeclareOldRelease{v1}{2014-01-01}{testpkg-rb003-2014-01-01}
 \DeclareOldRelease{v2}{2018/10-01}{testpkg-rb003-2018-10-01}
 \DeclareOldRelease{}  {2018/10-02}{testpkg-rb003-2018-10-02}  % a minor update
-\DeclareSpecialRelease{beta}{testpkg-rb003-beta}
-\DeclareSpecialRelease{beta4}{testpkg-rb003-beta}
+\DeclareOldRelease{beta}{}{testpkg-rb003-beta}
+\DeclareOldRelease{beta4}{}{testpkg-rb003-beta}
 \DeclareCurrentRelease{v3}{2019-07-01}
 
 \ProvidesPackage{testpkg-rb003}[2019-07-21 v3.5 test package] % this has a
@@ -35,7 +35,9 @@
                                                         % different date
 \DeclareOption{dvips}{\typeout{ -> option dvips executed}}
 \ProcessOptions
-\typeout{This is the current testpkg-rb003! }
+\IfTargetDateBefore{2019-07-21}
+  {\typeout{This is the current testpkg-rb003! }}
+  {\typeout{This is the current testpkg-rb003 patch 1! }}
 \end{filecontents}
 
 \begin{filecontents}{testpkg-rb003-2014-01-01.sty}
@@ -84,6 +86,7 @@
 
 \def\ForgetAboutTestpkg{%
   \expandafter\let\csname ver at testpkg-rb003.sty\endcsname\relax
+  \expandafter\let\csname opt at testpkg-rb003.sty\endcsname\relax
 }
 
 %%% TESTS %%%%
@@ -120,5 +123,11 @@
 \ForgetAboutTestpkg
 \usepackage[dvips]{testpkg-rb003}[=2018-10-05]
 
+\ForgetAboutTestpkg
+\usepackage{testpkg-rb003}[=2019-07-05]
+
+\ForgetAboutTestpkg
+\usepackage{testpkg-rb003}[=2019-07-21]
+
 \END
 
diff --git a/base/testfiles/tlb-rollback-003.tlg b/base/testfiles/tlb-rollback-003.tlg
index 06d9d43..eefb2e5 100644
--- a/base/testfiles/tlb-rollback-003.tlg
+++ b/base/testfiles/tlb-rollback-003.tlg
@@ -28,7 +28,8 @@ Don't change this file in any respect.
 (testpkg-rb003.sty
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -38,7 +39,8 @@ This is the current testpkg-rb003!
 (testpkg-rb003.sty
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -61,13 +63,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -81,7 +85,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -112,13 +117,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -132,7 +139,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -163,13 +171,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
 ---DeclareCurrentRelease
  1: v3
@@ -183,7 +193,8 @@ Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
 Package: testpkg-rb003 2019-07-21 v3.5 test package
  -> option dvips executed
-This is the current testpkg-rb003! 
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
 )
 --- File loaded request (\usepackage or ...)
     1: testpkg-rb003
@@ -272,9 +283,10 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Result: use testpkg-rb003-beta
 Rollback for package 'testpkg-rb003' requested -> version 'beta'.
          This corresponds to a special release.
@@ -304,13 +316,15 @@ Label doesn't match
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 Label doesn't match
----DeclareSpecialRelease
- 1: beta
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
 Label doesn't match
----DeclareSpecialRelease
- 1: beta4
- 2: testpkg-rb003-beta
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
 Result: use testpkg-rb003-beta
 Rollback for package 'testpkg-rb003' requested -> version 'beta4'.
          This corresponds to a special release.
@@ -340,6 +354,16 @@ New candidate: testpkg-rb003-2018-10-01
     2: 2018/10-02
     3: testpkg-rb003-2018-10-02
 New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
 ---DeclareCurrentRelease
  1: v3
  2: 2019-07-01
@@ -351,3 +375,85 @@ Package: testpkg-rb003 2018-10-02 v2.6 test package
  -> option dvips executed
 This is testpkg-rb003 2018-10-02!
 ))
+--- File loaded request (\usepackage or ...)
+    1: testpkg-rb003
+    2: 
+    3: =2019-07-05
+    4: sty
+(testpkg-rb003.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-rb003-2014-01-01
+New candidate: testpkg-rb003-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018/10-01
+    3: testpkg-rb003-2018-10-01
+New candidate: testpkg-rb003-2018-10-01
+---\DeclareOldRelease:
+    1: 
+    2: 2018/10-02
+    3: testpkg-rb003-2018-10-02
+New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use current version
+Rollback for package 'testpkg-rb003' requested -> date 2019-07-05.
+         Best approximation is the release introduced on 2019-07-01.
+Package: testpkg-rb003 2019-07-21 v3.5 test package
+Exclude code introduced on 2019-07-21
+This is the current testpkg-rb003! 
+)
+--- File loaded request (\usepackage or ...)
+    1: testpkg-rb003
+    2: 
+    3: =2019-07-21
+    4: sty
+(testpkg-rb003.sty
+---\DeclareOldRelease:
+    1: v1
+    2: 2014-01-01
+    3: testpkg-rb003-2014-01-01
+New candidate: testpkg-rb003-2014-01-01
+---\DeclareOldRelease:
+    1: v2
+    2: 2018/10-01
+    3: testpkg-rb003-2018-10-01
+New candidate: testpkg-rb003-2018-10-01
+---\DeclareOldRelease:
+    1: 
+    2: 2018/10-02
+    3: testpkg-rb003-2018-10-02
+New candidate: testpkg-rb003-2018-10-02
+---\DeclareOldRelease:
+    1: beta
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---\DeclareOldRelease:
+    1: beta4
+    2: 
+    3: testpkg-rb003-beta
+Date request: ignored
+---DeclareCurrentRelease
+ 1: v3
+ 2: 2019-07-01
+Result: use current version
+Rollback for package 'testpkg-rb003' requested -> date 2019-07-21.
+         Best approximation is the release introduced on 2019-07-01.
+Package: testpkg-rb003 2019-07-21 v3.5 test package
+Include code introduced on 2019-07-21
+This is the current testpkg-rb003 patch 1! 
+)





More information about the latex3-commits mailing list