texlive[71599] Build/source/texk/web2c/tests/fix-changefile-lines.py:

commits+ascherer at tug.org commits+ascherer at tug.org
Sun Jun 23 20:16:50 CEST 2024


Revision: 71599
          https://tug.org/svn/texlive?view=revision&revision=71599
Author:   ascherer
Date:     2024-06-23 20:16:50 +0200 (Sun, 23 Jun 2024)
Log Message:
-----------
Catch spurious @y.

The author of the change most likely mistyped @y for @z.

Note that we can not catch an @x in place of @z at this time. The f-c-l
script starts a change hunk whenever it encounters @x. Only a second @x
triggers an error---in slight deviation from CWEB's behavior.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py

Modified: trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py
===================================================================
--- trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-23 15:27:20 UTC (rev 71598)
+++ trunk/Build/source/texk/web2c/tests/fix-changefile-lines.py	2024-06-23 18:16:50 UTC (rev 71599)
@@ -122,6 +122,9 @@
 
         while self._pos < len(self._lines):
             line = self._lines[self._pos]
+            if line.startswith("@y"):
+                eprint(f"! Where is the matching @z?. (l. {self._pos+1} of change file)")
+                sys.exit(1)
             if line.startswith("@x"):
                 self._chunk_start = self._pos
                 while True:
@@ -134,6 +137,7 @@
                         self._match_lines = self._lines[
                             self._chunk_start + 1 : self._pos
                         ]
+                        self._pos += 1
                         return True
                     elif line.startswith("@x") or line.startswith("@z"):
                         eprint(f"! Where is the matching @y?. (l. {self._pos+1} of change file)")



More information about the tex-live-commits mailing list.